ansys.materials.manager._models._common.constant#

Module Contents#

Classes#

Constant

Represents a constant property value in a solver.

Attributes#

TYPE_CHECKING

ansys.materials.manager._models._common.constant.TYPE_CHECKING = False#
class ansys.materials.manager._models._common.constant.Constant(name: str, value: float)#

Bases: ansys.materials.manager._models._common._base._BaseModel

Represents a constant property value in a solver.

Create a constant property value.

This property is created in the default unit system of the solver. Ensure that you provide the value in the correct units.

Parameters:
name: str

Name of the property to model as a constant.

value: float

Value of the constant property.

property name: str#

Name of the quantity modeled by the constant.

property value: float#

Constant value of the quantity.

applicable_packages: SupportedPackage.MAPDL | SupportedPackage.FLUENT#
write_model(material: ansys.materials.manager.material.Material, pyansys_session: Any) None#

Write this model to MAPDL.

This method should make some effort to validate the model state before writing.

Parameters:
material: Material

Material object to associate with this model.

pyansys_session: Any

Configured instance of the PyAnsys session.

validate_model() Tuple[bool, List[str]]#

Perform pre-flight validation of the model setup.

Returns:
Tuple

First element is Boolean. True if validation is successful. If False, the second element contains a list of strings with more information.