RASolidMaterial#

class ansys.rocky.app.ra_solid_material.RASolidMaterial(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 materials in a project.

Retrieve individual materials from the RAStudy or the RAMaterialCollection via:

material_1 = study.GetElement('Default Particles')
material_2 = material_collection.GetMaterial('Default Boundaries')
material_3 = material_collection[2]

Overview#

GetUseBulkDensity

Get the value of “Use Bulk Density”.

SetUseBulkDensity

Set the value of “Use Bulk Density”.

GetBulkDensity

Get the value of “Bulk Density”.

SetBulkDensity

Set the value of “Bulk Density”.

GetBulkSolidFraction

Get the value of “Bulk Solid Fraction”.

SetBulkSolidFraction

Set the value of “Bulk Solid Fraction”.

GetCurrentDensity

Get the value of “Current Density”.

SetCurrentDensity

Set the value of “Current Density”.

GetDensity

Get the value of “Density”.

SetDensity

Set the value of “Density”.

GetYoungsModulus

Get the value of “Youngs Modulus”.

SetYoungsModulus

Set the value of “Youngs Modulus”.

GetName

Get the value of “Name”.

SetName

Set the value of “Name”.

GetPoissonRatio

Get the value of “Poisson Ratio”.

SetPoissonRatio

Set the value of “Poisson Ratio”.

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_solid_material import RASolidMaterial

Method detail#

classmethod RASolidMaterial.GetWrappedClass()#
classmethod RASolidMaterial.GetClassName() str#
RASolidMaterial.GetUseBulkDensity() bool#

Get the value of “Use Bulk Density”.

RASolidMaterial.SetUseBulkDensity(value: bool) None#

Set the value of “Use Bulk Density”.

Parameters:

value – The value to set.

RASolidMaterial.GetBulkDensity(unit: str | None = None) float#

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

RASolidMaterial.SetBulkDensity(value: str | float, unit: str | None = 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”.

RASolidMaterial.GetBulkSolidFraction() float#

Get the value of “Bulk Solid Fraction”.

RASolidMaterial.SetBulkSolidFraction(value: str | float) None#

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.

RASolidMaterial.GetCurrentDensity(unit: str | None = None) float#

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

RASolidMaterial.SetCurrentDensity(value: str | float, unit: str | None = 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”.

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

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

RASolidMaterial.GetYoungsModulus(unit: str | None = None) float#

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

RASolidMaterial.SetYoungsModulus(value: str | float, unit: str | None = 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”.

RASolidMaterial.GetName() str#

Get the value of “Name”.

RASolidMaterial.SetName(value: str) None#

Set the value of “Name”.

Parameters:

value – The value to set.

RASolidMaterial.GetPoissonRatio(unit: str | None = None) float#

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

RASolidMaterial.SetPoissonRatio(value: str | float, unit: str | None = 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 “-“.

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

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

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

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