class RASolidMaterial
Rocky PrePost Scripting wrapper for individual materials in a project. Retrieve individual materials from theRAStudy or the RAMaterialCollection via:
GetBulkDensity(unit: str | None = None)
Get the value of “Bulk Density”.- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “kg/m3”.
GetBulkSolidFraction()
Get the value of “Bulk Solid Fraction”.GetCurrentDensity(unit: str | None = None)
Get the value of “Current Density”.- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “kg/m3”.
GetDensity(unit: str | None = None)
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”.
GetModuleProperties()
Get the names of the module properties.- Return type: tuple(ModulePropertyIdentifier)
GetModuleProperty(property_name: str | ModulePropertyIdentifier, unit: str | None = None)
Get the value of a module property.- Parameters:
- property_name (Union *[*str , ModulePropertyIdentifier ]) – The name of the module property to get.
- unit (str) – The unit for value, just for scalar properties. If no unit is provided, the returned value will be in the unit that was set before (via SetModuleProperty()).
- Return type:
float, bool, str or
RAModulePropertyList - Returns:
- For basic module properties like numbers and booleans, the returned value is a basic Python type (float, bool, or string)
- For input files, the returned value is the string of the full path to the file
- For properties that are lists of other properties, the returned value is a
:
RAModulePropertyList.
GetPoissonRatio(unit: str | None = None)
Get the value of “Poisson Ratio”.- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
GetSpecificHeat(unit: str | None = None)
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”.
GetThermalConductivity(unit: str | None = None)
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”.
GetUseBulkDensity()
Get the value of “Use Bulk Density”.GetValidOptionsForModuleProperty(property_name)
Get all valid options only for properties that have a list of possible options.- Parameters: property_name (str) – The name of the module property.
- Return type: List[str]
GetYoungsModulus(unit: str | None = None)
Get the value of “Youngs Modulus”.- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “N/m2”.
SetBulkDensity(value: str | float, unit: str | None = None)
Set the value of “Bulk 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”.
SetBulkSolidFraction(value: str | float)
Set the value of “Bulk Solid Fraction”.- Parameters: value – The value to set. This value can be an expression with input variables or float type.
SetCurrentDensity(value: str | float, unit: str | None = None)
Set the value of “Current 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”.
SetDensity(value: str | float, unit: str | 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”.
SetModuleProperty(property_name: str | ModulePropertyIdentifier, value: float | bool | str, unit: str | None = None)
Set the value of a module property.- Parameters:
- property_name (Union *[*str , ModulePropertyIdentifier ]) – The name of the module property to set.
- value (float , bool or str) – The value to set. If the property_name references to an enum property then value must be an str value.
- unit (str) – The unit for value, just for scalar properties. If no unit is provided, value is assumed to be the unit was set before.
SetPoissonRatio(value: str | float, unit: str | None = None)
Set the value of “Poisson Ratio”.- 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 “-“.
SetSpecificHeat(value: str | float, unit: str | 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”.
SetThermalConductivity(value: str | float, unit: str | 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”.
SetUseBulkDensity(value: bool)
Set the value of “Use Bulk Density”.- Parameters: value – The value to set.
SetYoungsModulus(value: str | float, unit: str | None = None)
Set the value of “Youngs Modulus”.- 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 “N/m2”.