RAFluidMaterial#

class ansys.rocky.app.ra_fluid_material.RAFluidMaterial(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem, ansys.rocky.app.ra_addins.ElementWithAddins

Rocky PrePost Scripting wrapper for individual fluid materials in a project.

Retrieve individual materials from the RAStudy or the RAMaterialCollection via:

material_1 = study.GetElement('fluid material 1')
material_2 = material_collection.GetMaterial('fluid material 2')
material_3 = material_collection[2]

Overview#

GetNewtonianRheologicalModel

GetHerschelBulkleyRheologicalModel

GetRheologicalModel

GetRheologicalModelType

Get “Rheological Model Type” as a string.

SetRheologicalModelType

Set the value of “Rheological Model Type”.

GetValidRheologicalModelTypeValues

Get a list of all possible values for “Rheological Model Type”.

GetViscosity

SetViscosity

GetDensity

Get the value of “Density”.

SetDensity

Set the value of “Density”.

GetName

Get the value of “Name”.

SetName

Set the value of “Name”.

GetSpecificHeat

Get the value of “Specific Heat”.

SetSpecificHeat

Set the value of “Specific Heat”.

GetThermalConductivity

Get the value of “Thermal Conductivity”.

SetThermalConductivity

Set the value of “Thermal Conductivity”.

Import detail#

from ansys.rocky.app.ra_fluid_material import RAFluidMaterial

Method detail#

classmethod RAFluidMaterial.GetWrappedClass() → type[rocky30.models.material.fluid_material.FluidMaterial]#
classmethod RAFluidMaterial.GetClassName() → str#
RAFluidMaterial.GetNewtonianRheologicalModel() → RANewtonianRheologicalModel#
RAFluidMaterial.GetHerschelBulkleyRheologicalModel() → RAHerschelBulkleyRheologicalModel#
RAFluidMaterial.GetRheologicalModel() → object#
RAFluidMaterial.GetRheologicalModelType() → str#

Get “Rheological Model Type” as a string.

Returns:

The returned value will be one of [‘newtonian’, ‘herschel_bulkley_papanastasiou’].

RAFluidMaterial.SetRheologicalModelType(value: str) → None#

Set the value of “Rheological Model Type”.

Parameters:

value – The value to set. Must be one of [‘newtonian’, ‘herschel_bulkley_papanastasiou’].

Raises:

RockyApiError – If value is not a valid “Rheological Model Type” option.

RAFluidMaterial.GetValidRheologicalModelTypeValues() → list[str]#

Get a list of all possible values for “Rheological Model Type”.

Returns:

The returned list is [‘newtonian’, ‘herschel_bulkley_papanastasiou’].

RAFluidMaterial.GetViscosity(unit: str | None = None) → float#
RAFluidMaterial.SetViscosity(value: str | float, unit: str | None = None) → None#
RAFluidMaterial.GetDensity(unit: str | None = None) → float#

Get the value of “Density”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “kg/m3”.

RAFluidMaterial.SetDensity(value: str | float, unit: str | None = None) → None#

Set the value of “Density”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “kg/m3”.

RAFluidMaterial.GetName() → str#

Get the value of “Name”.

RAFluidMaterial.SetName(value: str) → None#

Set the value of “Name”.

Parameters:

value – The value to set.

RAFluidMaterial.GetSpecificHeat(unit: str | None = None) → float#

Get the value of “Specific Heat”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/kg.K”.

RAFluidMaterial.SetSpecificHeat(value: str | float, unit: str | None = None) → None#

Set the value of “Specific Heat”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “J/kg.K”.

RAFluidMaterial.GetThermalConductivity(unit: str | None = None) → float#

Get the value of “Thermal Conductivity”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “W/m.K”.

RAFluidMaterial.SetThermalConductivity(value: str | float, unit: str | None = None) → None#

Set the value of “Thermal Conductivity”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “W/m.K”.