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#

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”.

GetViscosity

Get the value of “Viscosity”.

SetViscosity

Set the value of “Viscosity”.

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.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”.

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

Get the value of “Viscosity”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “Pa.s”.

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

Set the value of “Viscosity”.

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 “Pa.s”.