ansys.materials.manager._models._common.piecewise_linear
#
Module Contents#
Classes#
Provides the piecewise linear model for a property. |
Attributes#
- ansys.materials.manager._models._common.piecewise_linear.TYPE_CHECKING = False#
- class ansys.materials.manager._models._common.piecewise_linear.PiecewiseLinear(name: str, x: numpy.ndarray, y: numpy.ndarray)#
Bases:
ansys.materials.manager._models._common._base._BaseModel
Provides the piecewise linear model for a property.
This class represents a property as a series of sample points between which the value is interpolated.
Create a piecewise linear model for a property.
Ensure that the two arrays
x
andy
are both one dimensional and have the same number of elements.This property is created in the default unit system of the solver. Ensure that you provide values in the correct units.
- Parameters:
- name: str
Name of the property to model as a constant.
- x: np.ndarray
Values of the independent variable over which to model the property. Ensure that these values cover the range of interest for the simulation.
- y: np.ndarray
Values of the property sampled at the points represented by the
x
array.
- property x: numpy.ndarray#
Values of the
x
array.
- property y: numpy.ndarray#
Values of the
y
array.
- applicable_packages: SupportedPackage.MAPDL | SupportedPackage.FLUENT#
- write_model(material: ansys.materials.manager.material.Material, pyansys_session: Any) None #
Write the 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.