model
ExperimentsType
module-attribute
ExperimentsType = Union[
Experiment, List[Experiment], Dict[str, Experiment], str, List[str]
]
CalibrationModel
Bases: IOModel
Calibration manager for the micromechanical model.
calibrate
calibrate(
x0: Dict[str | CalibrationKey, float] | None = None,
*,
experiments: ExperimentsType | None = None,
includes: List[str | CalibrationKey] | None = None,
include_additions: List[str | CalibrationKey] | None = None,
excludes: List[str | CalibrationKey] | None = None,
experiment_specific_parameters: List[str] | None = None,
fitness: Union["FitnessBase", Type["FitnessBase"], str, None] = None,
method: str = "PYCMA-CMAES",
bounds: Dict[str | CalibrationKey, Tuple[float, float]] | None = None,
stds: Dict[str | CalibrationKey, float] | None = None,
save_to: str | None = None,
save_to_kwargs: Dict | None = None,
**kwargs: Unpack[CalibrationFitnessAndOptimizationOptions]
) -> Tuple[Dict[str, float], OptimizerResult]
Calibrate the model parameters to the experiments.
| PARAMETER | DESCRIPTION |
|---|---|
x0
|
Initial guess for the parameters
TYPE:
|
experiments
|
Experiments to evaluate the fitness, by default None which means all experiments in the manager
TYPE:
|
includes
|
Parameters to include in the calibration, by default None which means all parameters
TYPE:
|
include_additions
|
Additional parameters to include in the calibration, by default None
TYPE:
|
excludes
|
Parameters to exclude from the calibration, by default None
TYPE:
|
experiment_specific_parameters
|
Optimization parameters that are specific to each experiment, by default None
TYPE:
|
lognormal_parameters
|
Parameters to be distributed in the lognormal space
TYPE:
|
fitness
|
Custom fitness object or class or the full name of the class, by default None
TYPE:
|
method
|
Optimization method, by default "PYCMA-CMAES"
TYPE:
|
bounds
|
Bounds for the parameters, by default None
TYPE:
|
stds
|
Standard deviations for the parameters, by default None
TYPE:
|
save_to
|
Save the calibration results to a file, by default None
TYPE:
|
save_to_kwargs
|
Extra keyword arguments for the save_to method, by default None
TYPE:
|
kwargs
|
Fitness or optimizer keyword arguments, if the fitness has attributes with the same name, the value will be set to the attribute, and other arguments will be passed to the optimizer
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[Dict[str, float], OptimizerResult]
|
Optimized parameters and the optimization result |
fitness
fitness(
x0: Dict[str | CalibrationKey, float] | None = None,
*,
experiments: ExperimentsType | None = None,
fitness: Union["FitnessBase", Type["FitnessBase"], str, None] = None,
**kwargs: Unpack[CalibrationFitnessAndOptimizationOptions]
) -> float
Calculate the fitness of the model to the experiments.
| PARAMETER | DESCRIPTION |
|---|---|
x0
|
Parameters to set before calculating the fitness, by default None
TYPE:
|
experiments
|
Experiments to evaluate the fitness, by default None which means all experiments in the manager
TYPE:
|
fitness
|
Custom fitness object or class or the full name of the class, by default None
TYPE:
|
kwargs
|
Additional keyword arguments to pass to the fitness object
TYPE:
|
select_parameters
select_parameters(
x0: Dict[str | CalibrationKey, float] | None = None,
*,
includes: List[str | CalibrationKey] | None = None,
include_additions: List[str | CalibrationKey] | None = None,
excludes: List[str | CalibrationKey] | None = None,
experiments: ExperimentsType | None = None,
experiment_specific_parameters: List[str] | None = None,
bounds: Dict[str | CalibrationKey, Tuple[float, float]] | None = None,
stds: Dict[str | CalibrationKey, float] | None = None,
lognormal_parameters: List[str | CalibrationKey] = None
) -> Tuple[List[str | CalibrationKey], Dict, Dict, Dict]
Select the parameters for the calibration.
| PARAMETER | DESCRIPTION |
|---|---|
x0
|
Initial guess for the parameters
TYPE:
|
experiments
|
Experiments to evaluate the fitness, by default None which means all experiments in the manager
TYPE:
|
includes
|
Parameters to include in the calibration, by default None which means all parameters
TYPE:
|
include_additions
|
Additional parameters to include in the calibration, by default None
TYPE:
|
excludes
|
Parameters to exclude from the calibration, by default None
TYPE:
|
experiment_specific_parameters
|
Optimization parameters that are specific to each experiment, by default None
TYPE:
|
bounds
|
Bounds for the parameters, by default None
TYPE:
|
stds
|
Standard deviations for the parameters, by default None
TYPE:
|
lognormal_parameters
|
Parameters to be distributed in the lognormal space
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tuple[List[str | CalibrationKey], Dict, Dict, Dict]
|
The keys, initial values, bounds, and standard deviations of the parameters |
ContactModel
Bases: ModelBase
Contact manager for the micromechanical model.
plotContactYieldSurface
plotContactYieldSurface(
xscale: float = 1.0,
yscale: float = 1.0,
*,
type: Literal["contour", "surface", "trisurf", "wireframe"] = "contour",
experiments: ExperimentsType | None = None,
simulate_experiment_kwargs: dict | None = None,
xmin: float | None = None,
xmax: float | None = None,
xnum: int = 500,
ymin: float | None = None,
ymax: float | None = None,
ynum: int = 500,
relative: bool = False,
no_contours_error: Literal["ignore", "warn", "raise"] = "warn",
plot_force_state: bool = False,
force_state_scatter_kwargs: dict | None = None,
force_state_line_kwargs: dict | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
label: str = "Step: {step}, idx: {idx}",
data: Union[SVExporter, "YieldFunction", None] = None,
data_get_kwargs: Dict[str, Any] | None = None,
on: Plottable | None = None,
same_axes: bool = False,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot yield surface for the contact law.
Notes
The following placeholders are supported for arguments label, kwargs, and line_kwargs:
- material parameters (
model.parameters) {step}for the step index{idx},{beta}and{gamma}for contact variables
| PARAMETER | DESCRIPTION |
|---|---|
xscale
|
Scale for x-axis, by default 1.0.
TYPE:
|
yscale
|
Scale for y-axis, by default 1.0.
TYPE:
|
type
|
Type of the plot, by default "contour"
TYPE:
|
xmin
|
Minimum x value, by default None which means the minimum value in the data
TYPE:
|
xmax
|
Maximum x value, by default None which means the maximum value in the data
TYPE:
|
xnum
|
Number of x values, by default 500
TYPE:
|
ymin
|
Minimum y value, by default None which means the minimum value in the data
TYPE:
|
ymax
|
Maximum y value, by default None which means the maximum value in the data
TYPE:
|
ynum
|
Number of y values, by default 500
TYPE:
|
relative
|
Whether the minimum and maximum values are relative to the data, by default False
TYPE:
|
no_contours_error
|
Whether to raise an error if no contours are found, by default "warn"
TYPE:
|
plot_force_state
|
Whether to plot the current force state with scatter, by default False
TYPE:
|
force_state_scatter_kwargs
|
Keyword arguments for plotting the force state scatter, by default color and edgecolors are set to the color of the corresponding yield surface
TYPE:
|
force_state_line_kwargs
|
Keyword arguments for plotting the force state line, by default None
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
An integer or a slice indicates index of the step.
TYPE:
|
idx
|
An integer or a slice indicates index of the integration point for contact variables.
TYPE:
|
label
|
Format string for the label in the legend, by default "Step: {step}, idx: {idx}"
TYPE:
|
data
|
State variables to plot, if not specified, the simulation will be run, by default None
TYPE:
|
data_get_kwargs
|
Extra keyword arguments for the
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
same_axes
|
Whether to use the same axes for all lines, by default False
TYPE:
|
ncols
|
Number of columns in the figure grid, by default 2
TYPE:
|
backend
|
Backend to use, by default None which means the backend set in the environment variable
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
line_kwargs
|
Line-specific keyword arguments, by default None
TYPE:
|
props
|
Properties passed to the
TYPE:
|
bokeh_show
|
Whether to show the figure in the browser, by default False
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure | GridPlot
|
The matplotlib figure or bokeh gridplot |
IOModel
Bases: IntegrationModel, LoadModel, MaterialModel, ContactModel
Simulation manager for the micromechanical model.
io
property
io: Union[MicromechanicalModelIO, ElastoplasticModelIO]
Get the IO object for the manager.
fromJson
classmethod
Load the model from a JSON file or a JSON string.
fromToml
classmethod
Load the model from a TOML file or a TOML string.
fromYaml
classmethod
Load the model from a YAML file or a YAML string.
IntegrationModel
Bases: ModelBase
Integration manager for the micromechanical model.
argbeta
The indices of the azimuthal angles of the integration points in the y-z plane.
| PARAMETER | DESCRIPTION |
|---|---|
unit
|
The unit of the angles, by default "deg"
TYPE:
|
lb
|
The lower bound of the angles, by default 0.0
TYPE:
|
ub
|
The upper bound of the angles, by default 180.0
TYPE:
|
arggamma
The indices of the azimuthal angles of the integration points x-axis.
| PARAMETER | DESCRIPTION |
|---|---|
unit
|
The unit of the angles, by default "deg"
TYPE:
|
lb
|
The lower bound of the angles, by default 0.0
TYPE:
|
ub
|
The upper bound of the angles, by default 180.0
TYPE:
|
beta
beta(
*,
unit: Literal["rad", "deg"] = "deg",
lb: float = 0.0,
ub: float = 180.0,
func: Callable = None
) -> ndarray
The azimuthal angles of the integration points in the y-z plane, an array of shape (n,).
| PARAMETER | DESCRIPTION |
|---|---|
unit
|
The unit of the angles, by default "deg"
TYPE:
|
lb
|
The lower bound of the angles, by default 0.0
TYPE:
|
ub
|
The upper bound of the angles, by default 180.0
TYPE:
|
func
|
The function to apply to the angles, by default None
TYPE:
|
gamma
gamma(
*,
unit: Literal["rad", "deg"] = "deg",
lb: float = 0.0,
ub: float = 180.0,
func: Callable = None
) -> ndarray
The azimuthal angles of the integration points x-axis, an array of shape (n,).
| PARAMETER | DESCRIPTION |
|---|---|
unit
|
The unit of the angles, by default "deg"
TYPE:
|
lb
|
The lower bound of the angles, by default 0.0
TYPE:
|
ub
|
The upper bound of the angles, by default 180.0
TYPE:
|
func
|
The function to apply to the angles, by default None
TYPE:
|
indexOf
indexOf(
*,
beta: float | ndarray | Iterable[float] = None,
gamma: float | ndarray | Iterable[float] = None,
beta_apply: Callable = None,
gamma_apply: Callable = None,
union: bool = False,
tol: float = 0.5,
unit: Literal["rad", "deg"] = "deg",
sort: (
Literal["beta", "gamma", "idx"] | List[Literal["beta", "gamma"]]
) = None,
drop_duplicates: bool = False
) -> ndarray
The contact indices for the given beta and gamma.
| PARAMETER | DESCRIPTION |
|---|---|
beta
|
The angle between the projection of the azimuth on the YZ plane and the Y axis
TYPE:
|
gamma
|
The angle between the azimuth and the X axis
TYPE:
|
beta_apply
|
The function to apply to the beta angles, by default None
TYPE:
|
gamma_apply
|
The function to apply to the gamma angles, by default None
TYPE:
|
union
|
If true, return the union of beta and gamma indices, else return the intersection, by default False
TYPE:
|
tol
|
The tolerance for the comparison of the angles, by default 0.5
TYPE:
|
unit
|
The unit of the angles, by default "deg"
TYPE:
|
sort
|
Sort the indices by beta, gamma or idx, by default None
TYPE:
|
drop_duplicates
|
Drop the duplicated beta and (or) gamma, by default False
TYPE:
|
integrationplot
Plot the integration points.
loadIntegrationPoints
Load integration points.
setAnisotropicParameters
setAnisotropicParameters(
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
**kwargs
)
Set the anisotropic parameters.
| PARAMETER | DESCRIPTION |
|---|---|
type
|
The type of the anisotropic parameter.
TYPE:
|
evolution
|
The evolution type of the anisotropic parameter.
TYPE:
|
coefs
|
The coefficients of the anisotropic parameter.
TYPE:
|
kwargs
|
More coefficients of the anisotropic parameter.
DEFAULT:
|
setBazantOh37
Set the BazantOh37 integration points.
| PARAMETER | DESCRIPTION |
|---|---|
full
|
Full 37*2 integration points.
TYPE:
|
setBazantOh61
Set the BazantOh61 integration points.
| PARAMETER | DESCRIPTION |
|---|---|
full
|
Full 61*2 integration points.
TYPE:
|
setIntegrationParameters
Set the parameters.
| PARAMETER | DESCRIPTION |
|---|---|
npv
|
number of contacts per unit volume
TYPE:
|
radius
|
particle radius
TYPE:
|
setIntegrationType
Set the integration type.
| PARAMETER | DESCRIPTION |
|---|---|
type
|
The integration type.
TYPE:
|
full
|
Full integration points for symmetric types.
TYPE:
|
setNPVFromNormalizedPackingDensity
Set the number of contacts per unit volume from the normalized packing density with the following equation:
| PARAMETER | DESCRIPTION |
|---|---|
rho
|
normalized packing density
TYPE:
|
LoadModel
Bases: ModelBase
Load manager for the micromechanical model.
addConfinementPhase
Add a confinement load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
addConstantStressRatioPhase
addConstantStressRatioPhase(
sig3_min: float, sig3_max: float, eta: float, steps: int, axis: int = 1
)
Add a constant stress ratio load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sig3_min
|
Minimum value of minimum principal stress.
TYPE:
|
sig3_max
|
Maximum value of minimum principal stress.
TYPE:
|
eta
|
Constant stress ratio.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addDrainedTriaxialPhase
Add a drained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addIsotropicPhase
Add an isotropic load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addLoadPhase
addLoadPhase(phase: LoadPhase)
Add a load phase.
| PARAMETER | DESCRIPTION |
|---|---|
phase
|
The load phase.
TYPE:
|
addTrueTriaxialPhase
addTrueTriaxialPhase(
sig3: float,
b: float,
eps1: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
)
Add a true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
sig3
|
Minimum principal stress.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addTrueTriaxialWithConstantShearPhase
addTrueTriaxialWithConstantShearPhase(
p: float, b: float, steps: int, axis1: int = 1, axis2: int = 2
)
Add a true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
p
|
Mean stress.
TYPE:
|
b
|
Intermediate principal stress.
TYPE:
|
steps
|
Number of steps.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTriaxialPhase
Add an undrained triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default False
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTriaxialWithoutShearPhase
addUndrainedTriaxialWithoutShearPhase(
eps1: float, steps: int, axis: int = 1, no_epsv: bool = False
)
Add an undrained triaxial load phase without controlling the shear strain.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
axis
|
Loading axis, by default 1
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default False
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTrueTriaxialPhase
addUndrainedTrueTriaxialPhase(
eps1: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhase
Add an undrained true triaxial load phase.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
eps1
|
Maximum strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
addUndrainedTrueTriaxialWithAxialStrainPhase
addUndrainedTrueTriaxialWithAxialStrainPhase(
epsa: float,
b: float,
steps: int,
axis1: int = 1,
axis2: int = 2,
no_epsv: bool = True,
) -> LoadPhase
Add an undrained true triaxial load phase with axial strain control.
| PARAMETER | DESCRIPTION |
|---|---|
steps
|
Number of steps.
TYPE:
|
epsa
|
Axial strain.
TYPE:
|
b
|
Intermediate stress ratio.
TYPE:
|
axis1
|
Major axis, by default 1
TYPE:
|
axis2
|
Intermediate axis, by default 2
TYPE:
|
no_epsv
|
Whether to control the intermediate principal stress without generating volumetric strain, this is useful when the material fabric is non-coaxial with the principal stress, by default True
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LoadPhase
|
The load phase. |
MaterialModel
Bases: ModelBase
Material manager for the micromechanical model.
setMaterialAnisotropicParameters
setMaterialAnisotropicParameters(
key: str,
type: AvailableFabricTypes = "chang1990-ext",
evolution: AvailableFabricEvolutionTypes = "li2012",
coefs: Dict[str, float] = None,
**kwargs
)
Set the anisotropic parameters for a material property.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
The name of the material property.
TYPE:
|
type
|
The type of the anisotropic parameter.
TYPE:
|
evolution
|
The evolution type of the anisotropic parameter.
TYPE:
|
coefs
|
The coefficients of the anisotropic parameter.
TYPE:
|
kwargs
|
More coefficients of the anisotropic parameter.
DEFAULT:
|
Model
Bases: VisualizationModel
A micromechanical model manager.
Notes
The main calculation of the micromechanical model is done in the model attribute, which is an instance of the
pure Python/numba/C++ micromechanical model, depending on the backend. Setting the following environment
variables to change the backend:
MICROMECHANICAL_BACKEND=cpp: use the C++ backendMICROMECHANICAL_BACKEND=python;NUMBA_DISABLE_JIT=1: use the pure Python backendMICROMECHANICAL_BACKEND=python;NUMBA_DISABLE_JIT=0: use the numba backend
For the cpp and numba backends, the environment variable MICROMECHANICAL_PRECISION can be set to
single or double to change the precision, the default is double
Examples:
Create the micromechanical model object:
Set up the loading phases:
>>> model.addIsotropicPhase(sigc=-100, steps=100)
>>> model.addDrainedTriaxialPhase(sigc=-100, eps1=-0.3, steps=100)
Set up the plastic method for the local contact law:
Set up integration points:
>>> model.setIntegrationParameters(npv=1e9, radius=0.65e-3)
>>> model.setAnisotropicParameters(type="chang1990-ext", evolution="wan2004", chi=0)
Set up material parameters:
Evaluate the model:
sv is a micromechanical.SVExporter object, which can be used to get the state variables, plot the results,
and export the results to a file.
>>> sv.to_csv("data.csv")
Saving state variables to DataFrame
>>> p, q, epsa, epsv = sv.get("-p"), sv.q, 100 * sv["epsa"], sv["100 * epsv"] # the tensile stress is positive
>>> model.plot("-p", "q", data=sv) # if data is omitted, model.run() will be called
<Figure size ... with 1 Axes>
__init__
__init__(
*model_types: Union[
MicromechanicalBase,
type,
str | PathLike,
AvailableModels,
AvailableMicromechanicalModels,
AvailableContactModels,
],
args: tuple = (),
kwargs: dict = None,
no_stop: bool = False,
backend: Literal["python", "cpp"] = backend,
**options
)
Constructor for the micromechanical model manager base class.
| PARAMETER | DESCRIPTION |
|---|---|
model_types
|
The micromechanical model to use. If no positional arguments are provided, the model will not be initialized. If one positional argument is provided, it should be:
If two positional arguments are provided, they should be:
In C++ backend, the micromechanical model type and contact law type can be a string of the file path to the compiled shared library. For example, the following usages are valid:
TYPE:
|
args
|
The positional arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
kwargs
|
The keyword arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
no_stop
|
Whether to stop the calculation when an error occurs.
TYPE:
|
backend
|
The backend to use, default is the configured backend.
TYPE:
|
options
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
ModelBase
Base class for micromechanical model managers.
best_fit_strain_averaging
class-attribute
instance-attribute
best_fit_strain_averaging: bool = property(
fget=lambda self: self.model.options.best_fit_strain_averaging,
fset=lambda self, value: setattr(
self.model.options, "best_fit_strain_averaging", value
),
doc="Whether to use the best-fit strain averaging",
)
cache
class-attribute
instance-attribute
cache: bool = property(
fget=lambda self: self.model.options.cache,
fset=lambda self, value: setattr(self.model.options, "cache", value),
doc="Whether to Cache state variables",
)
cache_precision
class-attribute
instance-attribute
cache_precision: int = property(
fget=lambda self: self.model.options.cache_precision,
fset=lambda self, value: setattr(
self.model.options, "cache_precision", value
),
doc="Cache state variables precision",
)
caches
class-attribute
instance-attribute
The caches.
check_stiffness_matrix_symmetry
class-attribute
instance-attribute
check_stiffness_matrix_symmetry: bool = property(
fget=lambda self: self.model.options.check_stiffness_matrix_symmetry,
fset=lambda self, value: setattr(
self.model.options, "check_stiffness_matrix_symmetry", value
),
doc="Whether to check the symmetry of the stiffness matrix",
)
contact
property
writable
The contact law.
contact_associated_flow_rule
class-attribute
instance-attribute
contact_associated_flow_rule: bool = property(
fget=lambda self: self.model.options.contact_associated_flow_rule,
fset=lambda self, value: setattr(
self.model.options, "contact_associated_flow_rule", value
),
doc="Whether to use associated flow rule for contact law",
)
contact_check_convergence
class-attribute
instance-attribute
contact_check_convergence: bool = property(
fget=lambda self: self.model.options.contact_check_convergence,
fset=lambda self, value: setattr(
self.model.options, "contact_check_convergence", value
),
doc="Check the convergence of contact",
)
contact_check_plastic_multiplier
class-attribute
instance-attribute
contact_check_plastic_multiplier: bool = property(
fget=lambda self: self.model.options.contact_check_plastic_multiplier,
fset=lambda self, value: setattr(
self.model.options, "contact_check_plastic_multiplier", value
),
doc="Whether to check the sign of plastic multiplier",
)
contact_default_potential_function_derivative
class-attribute
instance-attribute
contact_default_potential_function_derivative: bool = property(
fget=lambda self: self.model.options.contact_default_potential_function_derivative,
fset=lambda self, value: setattr(
self.model.options,
"contact_default_potential_function_derivative",
value,
),
doc="Whether to use the default potential function derivative for contact laws",
)
contact_default_yield_function_derivative
class-attribute
instance-attribute
contact_default_yield_function_derivative: bool = property(
fget=lambda self: self.model.options.contact_default_yield_function_derivative,
fset=lambda self, value: setattr(
self.model.options, "contact_default_yield_function_derivative", value
),
doc="Whether to use the default yield function derivative for contact laws",
)
contact_ensure_force_state_on_yield_surface
class-attribute
instance-attribute
contact_ensure_force_state_on_yield_surface: bool = property(
fget=lambda self: self.model.options.contact_ensure_force_state_on_yield_surface,
fset=lambda self, value: setattr(
self.model.options, "contact_ensure_force_state_on_yield_surface", value
),
doc="Whether to ensure the force state is on the yield surface",
)
contact_max_iterations
class-attribute
instance-attribute
contact_max_iterations: int = property(
fget=lambda self: self.model.options.contact_max_iterations,
fset=lambda self, value: setattr(
self.model.options, "contact_max_iterations", value
),
doc="Maximum number of iterations, only for CPA or CPPM",
)
contact_min_normal_force
class-attribute
instance-attribute
contact_min_normal_force: float = property(
fget=lambda self: self.model.options.contact_min_normal_force,
fset=lambda self, value: setattr(
self.model.options, "contact_min_normal_force", value
),
doc="The minimum normal force",
)
contact_plastic_method_multiplier
class-attribute
instance-attribute
contact_plastic_method_multiplier: float = property(
fget=lambda self: self.model.options.contact_plastic_method_multiplier,
fset=lambda self, value: setattr(
self.model.options, "contact_plastic_method_multiplier", value
),
doc="Multiplier for the contact plastic method",
)
contact_sanisand_constant_hardening_parameter
class-attribute
instance-attribute
contact_sanisand_constant_hardening_parameter: bool = property(
fget=lambda self: self.model.options.contact_sanisand_constant_hardening_parameter,
fset=lambda self, value: setattr(
self.model.options,
"contact_sanisand_constant_hardening_parameter",
value,
),
doc="Whether to use constant hardening parameter h for the SANISAND contact law",
)
contact_sanisand_maintain_yield_surface
class-attribute
instance-attribute
contact_sanisand_maintain_yield_surface: bool = property(
fget=lambda self: self.model.options.contact_sanisand_maintain_yield_surface,
fset=lambda self, value: setattr(
self.model.options, "contact_sanisand_maintain_yield_surface", value
),
doc="Whether to maintain yield surface for the SANISAND contact law",
)
contact_save_stiffness
class-attribute
instance-attribute
contact_save_stiffness: bool = property(
fget=lambda self: self.model.options.contact_save_stiffness,
fset=lambda self, value: setattr(
self.model.options, "contact_save_stiffness", value
),
doc="Whether to save contact stiffness in the state variables",
)
contact_simsand_hardening_use_plastic_displacement
class-attribute
instance-attribute
contact_simsand_hardening_use_plastic_displacement: bool = property(
fget=lambda self: self.model.options.contact_simsand_hardening_use_plastic_displacement,
fset=lambda self, value: setattr(
self.model.options,
"contact_simsand_hardening_use_plastic_displacement",
value,
),
doc="Whether to use plastic displacement in OSIMSAND/SIMSAND contact laws in the hardening law",
)
contact_simsand_use_plastic_displacement
class-attribute
instance-attribute
contact_simsand_use_plastic_displacement: bool = property(
fget=lambda self: self.model.options.contact_simsand_use_plastic_displacement,
fset=lambda self, value: setattr(
self.model.options, "contact_simsand_use_plastic_displacement", value
),
doc="Whether to use plastic displacement in OSIMSAND/SIMSAND contact laws",
)
contact_substepping
class-attribute
instance-attribute
contact_substepping: float = property(
fget=lambda self: self.model.options.contact_substepping,
fset=lambda self, value: setattr(
self.model.options, "contact_substepping", value
),
doc="Whether to use substepping strategy for the contact law",
)
contact_substepping_max_increment
class-attribute
instance-attribute
contact_substepping_max_increment: float = property(
fget=lambda self: self.model.options.contact_substepping_max_increment,
fset=lambda self, value: setattr(
self.model.options, "contact_substepping_max_increment", value
),
doc="Maximum stress ratio in one increment",
)
contact_substepping_separate_normal_shear_displacements
class-attribute
instance-attribute
contact_substepping_separate_normal_shear_displacements: bool = property(
fget=lambda self: self.model.options.contact_substepping_separate_normal_shear_displacements,
fset=lambda self, value: setattr(
self.model.options,
"contact_substepping_separate_normal_shear_displacements",
value,
),
doc="Whether to separate normal and shear displacement in contact substepping",
)
contact_tensile_stiffness_ratio
class-attribute
instance-attribute
contact_tensile_stiffness_ratio: float = property(
fget=lambda self: self.model.options.contact_tensile_stiffness_ratio,
fset=lambda self, value: setattr(
self.model.options, "contact_tensile_stiffness_ratio", value
),
doc="Ratio of tensile stiffness to compressive stiffness",
)
contact_tolerance
class-attribute
instance-attribute
contact_tolerance: float = property(
fget=lambda self: self.model.options.contact_tolerance,
fset=lambda self, value: setattr(
self.model.options, "contact_tolerance", value
),
doc="Contact tolerance",
)
dataset_dirs
class-attribute
instance-attribute
dataset_dirs: List[Path] = list(
set(
[
(Path(d).absolute())
for d in (
config.dataset_dirs + [Path(__file__).parents[1] / "datasets"]
)
]
)
)
directories to search for datasets
debug
class-attribute
instance-attribute
debug: bool = property(
fget=lambda self: self.model.options.debug,
fset=lambda self, value: setattr(self.model.options, "debug", value),
doc="Debug mode",
)
disp_steps
class-attribute
instance-attribute
disp_steps: int = property(
fget=lambda self: self.model.options.disp_steps,
fset=lambda self, value: setattr(self.model.options, "disp_steps", value),
doc="Display the information per steps",
)
elastic_fabric_anisotropy_scale
class-attribute
instance-attribute
elastic_fabric_anisotropy_scale: float = property(
fget=lambda self: self.model.options.elastic_fabric_anisotropy_scale,
fset=lambda self, value: setattr(
self.model.options, "elastic_fabric_anisotropy_scale", value
),
doc="Scale factor for fabric anisotropy in elastic stiffness",
)
elastic_stiffness_stress_dependence
class-attribute
instance-attribute
elastic_stiffness_stress_dependence: bool = property(
fget=lambda self: self.model.options.elastic_stiffness_stress_dependence,
fset=lambda self, value: setattr(
self.model.options, "elastic_stiffness_stress_dependence", value
),
doc="Whether to use the stress dependent elastic stiffness",
)
elastic_stiffness_stress_dependence_min_mean_stress_ratio
class-attribute
instance-attribute
elastic_stiffness_stress_dependence_min_mean_stress_ratio: float = property(
fget=lambda self: self.model.options.elastic_stiffness_stress_dependence_min_mean_stress_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastic_stiffness_stress_dependence_min_mean_stress_ratio",
value,
),
doc="Minimum mean stress ratio for stress dependent elastic stiffness, below which the elastic stiffness does not depend on the stress",
)
elastic_stiffness_stress_dependence_use_anisotropic_mean_stress
class-attribute
instance-attribute
elastic_stiffness_stress_dependence_use_anisotropic_mean_stress: bool = (
property(
fget=lambda self: self.model.options.elastic_stiffness_stress_dependence_use_anisotropic_mean_stress,
fset=lambda self, value: setattr(
self.model.options,
"elastic_stiffness_stress_dependence_use_anisotropic_mean_stress",
value,
),
doc="Whether to use anisotropic mean stress in stress dependent elastic stiffness",
)
)
elastic_stiffness_void_ratio_dependence
class-attribute
instance-attribute
elastic_stiffness_void_ratio_dependence: bool = property(
fget=lambda self: self.model.options.elastic_stiffness_void_ratio_dependence,
fset=lambda self, value: setattr(
self.model.options, "elastic_stiffness_void_ratio_dependence", value
),
doc="Whether to use the void ratio dependent elastic stiffness",
)
elastic_stiffness_void_ratio_dependence_initial
class-attribute
instance-attribute
elastic_stiffness_void_ratio_dependence_initial: bool = property(
fget=lambda self: self.model.options.elastic_stiffness_void_ratio_dependence_initial,
fset=lambda self, value: setattr(
self.model.options,
"elastic_stiffness_void_ratio_dependence_initial",
value,
),
doc="Whether to use the initial void ratio for void ratio dependent elastic stiffness",
)
elastoplastic_associated_flow_rule
class-attribute
instance-attribute
elastoplastic_associated_flow_rule: bool = property(
fget=lambda self: self.model.options.elastoplastic_associated_flow_rule,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_associated_flow_rule", value
),
doc="Whether to use associated flow rule for plastic correction",
)
elastoplastic_cache_state_variables
class-attribute
instance-attribute
elastoplastic_cache_state_variables: bool = property(
fget=lambda self: self.model.options.elastoplastic_cache_state_variables,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_cache_state_variables", value
),
doc="Whether to cache state variables for elastoplastic models",
)
elastoplastic_check_convergence
class-attribute
instance-attribute
elastoplastic_check_convergence: bool = property(
fget=lambda self: self.model.options.elastoplastic_check_convergence,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_check_convergence", value
),
doc="Whether to check the converge for plastic correction",
)
elastoplastic_check_stiffness_matrix_non_singularity
class-attribute
instance-attribute
elastoplastic_check_stiffness_matrix_non_singularity: bool = property(
fget=lambda self: self.model.options.elastoplastic_check_stiffness_matrix_non_singularity,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_check_stiffness_matrix_non_singularity",
value,
),
doc="Whether to check the non-singularity of the elastoplastic stiffness matrix",
)
elastoplastic_check_stiffness_matrix_positive_definite
class-attribute
instance-attribute
elastoplastic_check_stiffness_matrix_positive_definite: bool = property(
fget=lambda self: self.model.options.elastoplastic_check_stiffness_matrix_positive_definite,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_check_stiffness_matrix_positive_definite",
value,
),
doc="Whether to check the positive definiteness of the elastoplastic stiffness matrix",
)
elastoplastic_combined_stress_tensor_dilatancy_type
class-attribute
instance-attribute
elastoplastic_combined_stress_tensor_dilatancy_type: Literal[
"anisotropic",
"isotropic",
"linear",
"quadratic",
"exponential",
"potential",
] = property(
fget=lambda self: self.model.options.elastoplastic_combined_stress_tensor_dilatancy_type,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_combined_stress_tensor_dilatancy_type",
value,
),
doc='Type of the combined stress tensor in dilatancy for elastoplastic models, "anisotropic", "isotropic", "linear", "quadratic", "exponential", or "potential"',
)
elastoplastic_combined_stress_tensor_evolution_ratio
class-attribute
instance-attribute
elastoplastic_combined_stress_tensor_evolution_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_combined_stress_tensor_evolution_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_combined_stress_tensor_evolution_ratio",
value,
),
doc="Ratio for the evolution of the combined stress tensor in elastoplastic models",
)
elastoplastic_combined_stress_tensor_fav_ratio
class-attribute
instance-attribute
elastoplastic_combined_stress_tensor_fav_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_combined_stress_tensor_fav_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_combined_stress_tensor_fav_ratio",
value,
),
doc="Ratio for the fabric anisotropy variable in the combined stress tensor for elastoplastic models",
)
elastoplastic_combined_stress_tensor_scale
class-attribute
instance-attribute
elastoplastic_combined_stress_tensor_scale: float = property(
fget=lambda self: self.model.options.elastoplastic_combined_stress_tensor_scale,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_combined_stress_tensor_scale", value
),
doc="Scale for effect of fabric anisotropy in the combined stress tensor for elastoplastic models",
)
elastoplastic_combined_stress_tensor_type
class-attribute
instance-attribute
elastoplastic_combined_stress_tensor_type: Literal[
"anisotropic",
"isotropic",
"linear",
"quadratic",
"exponential",
"potential",
] = property(
fget=lambda self: self.model.options.elastoplastic_combined_stress_tensor_type,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_combined_stress_tensor_type", value
),
doc='Type of the combined stress tensor for elastoplastic models, "anisotropic", "isotropic", "linear", "quadratic", "exponential", or "potential"',
)
elastoplastic_critical_state_line_shape
class-attribute
instance-attribute
elastoplastic_critical_state_line_shape: Literal[
"linear", "logarithmic", "exponential"
] = property(
fget=lambda self: self.model.options.elastoplastic_critical_state_line_shape,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_critical_state_line_shape", value
),
doc="Shape of critical state line, `linear`, `logarithmic` or `exponential`",
)
elastoplastic_critical_state_line_use_anisotropic_mean_stress
class-attribute
instance-attribute
elastoplastic_critical_state_line_use_anisotropic_mean_stress: bool = property(
fget=lambda self: self.model.options.elastoplastic_critical_state_line_use_anisotropic_mean_stress,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_critical_state_line_use_anisotropic_mean_stress",
value,
),
doc="Whether to use anisotropic mean stress in critical state line",
)
elastoplastic_critical_state_line_use_initial_stress_state
class-attribute
instance-attribute
elastoplastic_critical_state_line_use_initial_stress_state: bool = property(
fget=lambda self: self.model.options.elastoplastic_critical_state_line_use_initial_stress_state,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_critical_state_line_use_initial_stress_state",
value,
),
doc="Whether to use the initial stress state to calculate critical state line",
)
elastoplastic_critical_stress_ratio_type
class-attribute
instance-attribute
elastoplastic_critical_stress_ratio_type: Literal[
"modified-mohr-coulomb",
"mohr-coulomb",
"gtheta_li2002",
"gtheta_sheng2000",
"gtheta_argyris1974",
] = property(
fget=lambda self: self.model.options.elastoplastic_critical_stress_ratio_type,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_critical_stress_ratio_type", value
),
doc="Method to calculate critical stress ratio, `modified-mohr-coulomb`, `mohr-coulomb`, `gtheta_li2002`, `gtheta_sheng2000`, or `gtheta_argyris1974`",
)
elastoplastic_critical_stress_ratio_use_anisotropic_stress
class-attribute
instance-attribute
elastoplastic_critical_stress_ratio_use_anisotropic_stress: bool = property(
fget=lambda self: self.model.options.elastoplastic_critical_stress_ratio_use_anisotropic_stress,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_critical_stress_ratio_use_anisotropic_stress",
value,
),
doc="Whether to use the anisotropic stress tensor to calculate critical stress ratio",
)
elastoplastic_critical_stress_ratio_use_initial_stress_state
class-attribute
instance-attribute
elastoplastic_critical_stress_ratio_use_initial_stress_state: bool = property(
fget=lambda self: self.model.options.elastoplastic_critical_stress_ratio_use_initial_stress_state,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_critical_stress_ratio_use_initial_stress_state",
value,
),
doc="Whether to use the initial stress state to calculate critical stress ratio",
)
elastoplastic_default_potential_function_derivative
class-attribute
instance-attribute
elastoplastic_default_potential_function_derivative: bool = property(
fget=lambda self: self.model.options.elastoplastic_default_potential_function_derivative,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_default_potential_function_derivative",
value,
),
doc="Whether to use the default potential function derivative for elastoplastic models",
)
elastoplastic_default_yield_function_derivative
class-attribute
instance-attribute
elastoplastic_default_yield_function_derivative: bool = property(
fget=lambda self: self.model.options.elastoplastic_default_yield_function_derivative,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_default_yield_function_derivative",
value,
),
doc="Whether to use the default yield function derivative for elastoplastic models",
)
elastoplastic_density_effect_on_strength_dilatancy_type
class-attribute
instance-attribute
elastoplastic_density_effect_on_strength_dilatancy_type: Literal[
"exponential", "powerlaw"
] = property(
fget=lambda self: self.model.options.elastoplastic_density_effect_on_strength_dilatancy_type,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_density_effect_on_strength_dilatancy_type",
value,
),
doc="The type of density effect on strength and dilatancy, either 'exponential' or 'powerlaw'",
)
elastoplastic_dilatancy_exponent
class-attribute
instance-attribute
elastoplastic_dilatancy_exponent: float = property(
fget=lambda self: self.model.options.elastoplastic_dilatancy_exponent,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_dilatancy_exponent", value
),
doc="Exponent for the stress-dilatancy relationship when using a power-law type relationship",
)
elastoplastic_dilatancy_scale_at_low_mean_stress
class-attribute
instance-attribute
elastoplastic_dilatancy_scale_at_low_mean_stress: float = property(
fget=lambda self: self.model.options.elastoplastic_dilatancy_scale_at_low_mean_stress,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_dilatancy_scale_at_low_mean_stress",
value,
),
doc="Low mean stress threshold to scale the dilatancy function",
)
elastoplastic_dilatancy_separate_friction_angle
class-attribute
instance-attribute
elastoplastic_dilatancy_separate_friction_angle: bool = property(
fget=lambda self: self.model.options.elastoplastic_dilatancy_separate_friction_angle,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_dilatancy_separate_friction_angle",
value,
),
doc="Whether to use a separate friction angle for the stress-dilatancy relationship",
)
elastoplastic_ensure_stress_on_yield_surface
class-attribute
instance-attribute
elastoplastic_ensure_stress_on_yield_surface: bool = property(
fget=lambda self: self.model.options.elastoplastic_ensure_stress_on_yield_surface,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_ensure_stress_on_yield_surface",
value,
),
doc="Whether to ensure the stress state is on the yield surface",
)
elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial
class-attribute
instance-attribute
elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial: (
float
) = property(
fget=lambda self: self.model.options.elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_fabric_anisotropy_variable_nonproportionality_noncoaxial",
value,
),
doc="Weight of the non-coaxial component of the non-proportionality in the fabric anisotropy variable",
)
elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal
class-attribute
instance-attribute
elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal: (
float
) = property(
fget=lambda self: self.model.options.elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_fabric_anisotropy_variable_nonproportionality_orthogonal",
value,
),
doc="Weight of the orthogonal component of the non-proportionality in the fabric anisotropy variable",
)
elastoplastic_finite_difference_central
class-attribute
instance-attribute
elastoplastic_finite_difference_central: bool = property(
fget=lambda self: self.model.options.elastoplastic_finite_difference_central,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_finite_difference_central", value
),
doc="Whether to use central finite difference for numerical derivatives in elastoplastic models",
)
elastoplastic_finite_difference_increment
class-attribute
instance-attribute
elastoplastic_finite_difference_increment: float = property(
fget=lambda self: self.model.options.elastoplastic_finite_difference_increment,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_finite_difference_increment", value
),
doc="Finite difference increment for numerical derivatives in elastoplastic models",
)
elastoplastic_flow_rule_tolerance
class-attribute
instance-attribute
elastoplastic_flow_rule_tolerance: float = property(
fget=lambda self: self.model.options.elastoplastic_flow_rule_tolerance,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_flow_rule_tolerance", value
),
doc="Tolerance of flow_rule for plastic correction, only valid for CPPM method",
)
elastoplastic_max_iterations
class-attribute
instance-attribute
elastoplastic_max_iterations: int = property(
fget=lambda self: self.model.options.elastoplastic_max_iterations,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_max_iterations", value
),
doc="Maximum number of iterations for plastic correction",
)
elastoplastic_min_principal_stress
class-attribute
instance-attribute
elastoplastic_min_principal_stress: float = property(
fget=lambda self: self.model.options.elastoplastic_min_principal_stress,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_min_principal_stress", value
),
doc="Minimum principal stress for elastoplastic models, negative value means no limit",
)
elastoplastic_potential_function_half_shear_derivatives
class-attribute
instance-attribute
elastoplastic_potential_function_half_shear_derivatives: bool = property(
fget=lambda self: self.model.options.elastoplastic_potential_function_half_shear_derivatives,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_potential_function_half_shear_derivatives",
value,
),
doc="Whether to use half derivatives of shear components for plastic potential function",
)
elastoplastic_runge_kutta_correction_substep
class-attribute
instance-attribute
elastoplastic_runge_kutta_correction_substep: bool = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_correction_substep,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_correction_substep",
value,
),
doc="Whether to perform yield function corrections at each substep of the Runge-Kutta method",
)
elastoplastic_runge_kutta_diverged_steps_raise
class-attribute
instance-attribute
elastoplastic_runge_kutta_diverged_steps_raise: bool = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_diverged_steps_raise,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_diverged_steps_raise",
value,
),
doc="Whether to raise an error when a Runge-Kutta step is detected as diverged",
)
elastoplastic_runge_kutta_fourth_order_type
class-attribute
instance-attribute
elastoplastic_runge_kutta_fourth_order_type: Literal[
"classic", "3/8-rule", "ralston"
] = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_fourth_order_type,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_fourth_order_type", value
),
doc='Type of the fourth-order Runge-Kutta method for elastoplastic integration, "classic", "3/8-rule", or "ralston"',
)
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations
class-attribute
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations: (
int
) = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_integrate_stress_on_yield_surface_max_iterations",
value,
),
doc="Maximum number of iterations to integrate stress from elastic to the yield surface for Runge-Kutta method",
)
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method
class-attribute
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method: Literal[
"bisection", "newton", "none"
] = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_integrate_stress_on_yield_surface_method",
value,
),
doc='Method to integrate stress from elastic to the yield surface for Runge-Kutta method, "bisection", "newton" or "none"',
)
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance
class-attribute
instance-attribute
elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance: float = (
property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_integrate_stress_on_yield_surface_tolerance",
value,
),
doc="Tolerance to integrate stress from elastic to the yield surface for Runge-Kutta method",
)
)
elastoplastic_runge_kutta_max_const_steps
class-attribute
instance-attribute
elastoplastic_runge_kutta_max_const_steps: int = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_max_const_steps,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_max_const_steps", value
),
doc="Maximum number of constant step size substeps for the Runge-Kutta method, non-positive value means no limit",
)
elastoplastic_runge_kutta_order
class-attribute
instance-attribute
elastoplastic_runge_kutta_order: int = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_order,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_order", value
),
doc="Order of the Runge-Kutta method for elastoplastic integration, 1, 2, 3, or 4",
)
elastoplastic_runge_kutta_second_order_alpha
class-attribute
instance-attribute
elastoplastic_runge_kutta_second_order_alpha: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_second_order_alpha,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_second_order_alpha",
value,
),
doc="Parameter alpha for the second-order Runge-Kutta method in elastoplastic integration.",
)
elastoplastic_runge_kutta_stiffness_type
class-attribute
instance-attribute
elastoplastic_runge_kutta_stiffness_type: Literal[
"elastic", "elastoplastic", "elastoplastic_end", "weighted"
] = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_stiffness_type,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_stiffness_type", value
),
doc='Type of the elastoplastic stiffness matrix for Runge-Kutta method, "elastic", "elastoplastic", "elastoplastic_end", or "weighted"',
)
elastoplastic_runge_kutta_substepping_adaptive_max_ratio
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_max_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_adaptive_max_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_adaptive_max_ratio",
value,
),
doc="Maximum step size ratio of adaptive step size control in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_adaptive_min_ratio
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_min_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_adaptive_min_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_adaptive_min_ratio",
value,
),
doc="Minimum step size ratio of adaptive step size control in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_adaptive_ratio
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_adaptive_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_adaptive_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_adaptive_ratio",
value,
),
doc="Ratio for adaptive step size control in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_check_min_step_size
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_check_min_step_size: bool = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_check_min_step_size,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_check_min_step_size",
value,
),
doc="Whether to check the minimum step size for substepping in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_initial_step_size
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_initial_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_initial_step_size,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_initial_step_size",
value,
),
doc="Initial step size for substepping in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_max_iterations
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_max_iterations: int = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_max_iterations,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_max_iterations",
value,
),
doc="Maximum number of iterations for substepping in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_max_step_size
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_max_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_max_step_size,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_max_step_size",
value,
),
doc="Maximum step size for substepping in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_min_step_size
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_min_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_min_step_size,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_min_step_size",
value,
),
doc="Minimum step size for substepping in Runge-Kutta elastoplastic integration",
)
elastoplastic_runge_kutta_substepping_tolerance
class-attribute
instance-attribute
elastoplastic_runge_kutta_substepping_tolerance: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_substepping_tolerance,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_runge_kutta_substepping_tolerance",
value,
),
doc="Tolerance for substepping in Runge-Kutta elastoplastic integration, negative value means no substepping",
)
elastoplastic_runge_kutta_third_order_alpha
class-attribute
instance-attribute
elastoplastic_runge_kutta_third_order_alpha: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_third_order_alpha,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_third_order_alpha", value
),
doc="Parameter alpha for the third-order Runge-Kutta method in elastoplastic integration.",
)
elastoplastic_runge_kutta_third_order_beta
class-attribute
instance-attribute
elastoplastic_runge_kutta_third_order_beta: float = property(
fget=lambda self: self.model.options.elastoplastic_runge_kutta_third_order_beta,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_runge_kutta_third_order_beta", value
),
doc="Parameter beta for the third-order Runge-Kutta method in elastoplastic integration",
)
elastoplastic_substepping_check_min_step_size
class-attribute
instance-attribute
elastoplastic_substepping_check_min_step_size: bool = property(
fget=lambda self: self.model.options.elastoplastic_substepping_check_min_step_size,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_substepping_check_min_step_size",
value,
),
doc="Whether to check the minimum step size for substepping in plastic correction",
)
elastoplastic_substepping_initial_step_size
class-attribute
instance-attribute
elastoplastic_substepping_initial_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_initial_step_size,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_substepping_initial_step_size", value
),
doc="Initial step size for substepping in plastic correction",
)
elastoplastic_substepping_max_iterations
class-attribute
instance-attribute
elastoplastic_substepping_max_iterations: int = property(
fget=lambda self: self.model.options.elastoplastic_substepping_max_iterations,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_substepping_max_iterations", value
),
doc="Maximum number of iterations for substepping in plastic correction",
)
elastoplastic_substepping_max_plastic_strain
class-attribute
instance-attribute
elastoplastic_substepping_max_plastic_strain: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_max_plastic_strain,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_substepping_max_plastic_strain",
value,
),
doc="Maximum plastic strain for substepping in plastic correction, negative value means no substepping",
)
elastoplastic_substepping_max_step_size
class-attribute
instance-attribute
elastoplastic_substepping_max_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_max_step_size,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_substepping_max_step_size", value
),
doc="Maximum step size for substepping in plastic correction",
)
elastoplastic_substepping_min_step_size
class-attribute
instance-attribute
elastoplastic_substepping_min_step_size: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_min_step_size,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_substepping_min_step_size", value
),
doc="Minimum step size for substepping in plastic correction",
)
elastoplastic_substepping_step_size_decrease_ratio
class-attribute
instance-attribute
elastoplastic_substepping_step_size_decrease_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_step_size_decrease_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_substepping_step_size_decrease_ratio",
value,
),
doc="Step size decrease ratio for substepping in plastic correction when the step fails",
)
elastoplastic_substepping_step_size_increase_ratio
class-attribute
instance-attribute
elastoplastic_substepping_step_size_increase_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_substepping_step_size_increase_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_substepping_step_size_increase_ratio",
value,
),
doc="Step size increase ratio for substepping in plastic correction when the plastic multiplier is less than half of the maximum allowed value",
)
elastoplastic_tolerance
class-attribute
instance-attribute
elastoplastic_tolerance: float = property(
fget=lambda self: self.model.options.elastoplastic_tolerance,
fset=lambda self, value: setattr(
self.model.options, "elastoplastic_tolerance", value
),
doc="Tolerance of yield function for plastic correction",
)
elastoplastic_update_critical_void_ratio_when_required
class-attribute
instance-attribute
elastoplastic_update_critical_void_ratio_when_required: bool = property(
fget=lambda self: self.model.options.elastoplastic_update_critical_void_ratio_when_required,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_update_critical_void_ratio_when_required",
value,
),
doc="Whether to update the critical void ratio when required",
)
elastoplastic_use_anisotropic_state_parameter
class-attribute
instance-attribute
elastoplastic_use_anisotropic_state_parameter: bool = property(
fget=lambda self: self.model.options.elastoplastic_use_anisotropic_state_parameter,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_use_anisotropic_state_parameter",
value,
),
doc="Whether to use the anisotropic state parameter in the stress-dilatancy relationship",
)
elastoplastic_yield_function_anisotropic_cohesion
class-attribute
instance-attribute
elastoplastic_yield_function_anisotropic_cohesion: float = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_anisotropic_cohesion,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_anisotropic_cohesion",
value,
),
doc="Whether the cohesion is anisotropic",
)
elastoplastic_yield_function_correction_adaptive_ratio
class-attribute
instance-attribute
elastoplastic_yield_function_correction_adaptive_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_correction_adaptive_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_correction_adaptive_ratio",
value,
),
doc="Ratio for adaptive plastic correction, negative values are ignored",
)
elastoplastic_yield_function_correction_direction
class-attribute
instance-attribute
elastoplastic_yield_function_correction_direction: Literal[
"plastic_flow", "yield_normal"
] = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_correction_direction,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_correction_direction",
value,
),
doc='Direction for yield function correction, "plastic_flow" for the plastic flow direction or "yield_normal" for the normal direction of the yield surface',
)
elastoplastic_yield_function_correction_diverged_steps_raise
class-attribute
instance-attribute
elastoplastic_yield_function_correction_diverged_steps_raise: bool = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_correction_diverged_steps_raise,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_correction_diverged_steps_raise",
value,
),
doc="Whether to raise an error when the plastic correction is detected as diverged",
)
elastoplastic_yield_function_correction_max_const_steps
class-attribute
instance-attribute
elastoplastic_yield_function_correction_max_const_steps: int = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_correction_max_const_steps,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_correction_max_const_steps",
value,
),
doc="Maximum number of constant step size substeps for the plastic correction, non-positive value means no limit",
)
elastoplastic_yield_function_derivative_strain
class-attribute
instance-attribute
elastoplastic_yield_function_derivative_strain: bool = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_derivative_strain,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_derivative_strain",
value,
),
doc="Whether to consider the strain contribution to the yield function derivative for elastoplastic models",
)
elastoplastic_yield_function_fabric_anisotropy
class-attribute
instance-attribute
elastoplastic_yield_function_fabric_anisotropy: bool = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_fabric_anisotropy,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_fabric_anisotropy",
value,
),
doc="Whether to consider fabric anisotropy in the yield function",
)
elastoplastic_yield_function_min_critical_stress_ratio
class-attribute
instance-attribute
elastoplastic_yield_function_min_critical_stress_ratio: float = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_min_critical_stress_ratio,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_min_critical_stress_ratio",
value,
),
doc="Minimum critical stress ratio for elastoplastic models. Negative values are ignored",
)
elastoplastic_yield_function_stress_dependent_kp_scale
class-attribute
instance-attribute
elastoplastic_yield_function_stress_dependent_kp_scale: float = property(
fget=lambda self: self.model.options.elastoplastic_yield_function_stress_dependent_kp_scale,
fset=lambda self, value: setattr(
self.model.options,
"elastoplastic_yield_function_stress_dependent_kp_scale",
value,
),
doc="Scale factor for the stress-dependent kp in the yield function. If negative, kp is a constant",
)
fabric_evolution_type
property
writable
fabric_evolution_type: AvailableFabricEvolutionTypes
The fabric evolution type.
friction_angle_weight_mises
class-attribute
instance-attribute
friction_angle_weight_mises: float = property(
fget=lambda self: self.model.options.friction_angle_weight_mises,
fset=lambda self, value: setattr(
self.model.options, "friction_angle_weight_mises", value
),
doc="Weight of Mises component in lode angle dependent friction angle",
)
friction_angle_weight_mohr_coulomb
class-attribute
instance-attribute
friction_angle_weight_mohr_coulomb: float = property(
fget=lambda self: self.model.options.friction_angle_weight_mohr_coulomb,
fset=lambda self, value: setattr(
self.model.options, "friction_angle_weight_mohr_coulomb", value
),
doc="Weight of Mohr-Coulomb component in lode angle dependent friction angle",
)
friction_angle_weight_smp
class-attribute
instance-attribute
friction_angle_weight_smp: float = property(
fget=lambda self: self.model.options.friction_angle_weight_smp,
fset=lambda self, value: setattr(
self.model.options, "friction_angle_weight_smp", value
),
doc="Weight of SMP component in lode angle dependent friction angle",
)
friction_angle_weight_tresca
class-attribute
instance-attribute
friction_angle_weight_tresca: float = property(
fget=lambda self: self.model.options.friction_angle_weight_tresca,
fset=lambda self, value: setattr(
self.model.options, "friction_angle_weight_tresca", value
),
doc="Weight of Tresca component in lode angle dependent friction angle",
)
ignore_distractions
class-attribute
instance-attribute
ignore_distractions: bool = property(
fget=lambda self: self.model.options.ignore_distractions,
fset=lambda self, value: setattr(
self.model.options, "ignore_distractions", value
),
doc="Whether to ignore distractions",
)
ignore_fabric_anisotropy_for_isotropic_loading
class-attribute
instance-attribute
ignore_fabric_anisotropy_for_isotropic_loading: bool = property(
fget=lambda self: self.model.options.ignore_fabric_anisotropy_for_isotropic_loading,
fset=lambda self, value: setattr(
self.model.options,
"ignore_fabric_anisotropy_for_isotropic_loading",
value,
),
doc="Whether to ignore fabric anisotropy for isotropic loading",
)
ignore_fabric_evolution_for_isotropic_loading
class-attribute
instance-attribute
ignore_fabric_evolution_for_isotropic_loading: bool = property(
fget=lambda self: self.model.options.ignore_fabric_evolution_for_isotropic_loading,
fset=lambda self, value: setattr(
self.model.options,
"ignore_fabric_evolution_for_isotropic_loading",
value,
),
doc="Whether to ignore fabric evolution for isotropic loading",
)
increment_plastic_displacement
class-attribute
instance-attribute
increment_plastic_displacement: bool = property(
fget=lambda self: self.model.options.increment_plastic_displacement,
fset=lambda self, value: setattr(
self.model.options, "increment_plastic_displacement", value
),
doc="Increment plastic displacement to the total displacement",
)
integration_absolute_tolerance
class-attribute
instance-attribute
integration_absolute_tolerance: float = property(
fget=lambda self: self.model.options.integration_absolute_tolerance,
fset=lambda self, value: setattr(
self.model.options, "integration_absolute_tolerance", value
),
doc="Absolute tolerance for macro-micro integration",
)
integration_at_least_once
class-attribute
instance-attribute
integration_at_least_once: bool = property(
fget=lambda self: self.model.options.integration_at_least_once,
fset=lambda self, value: setattr(
self.model.options, "integration_at_least_once", value
),
doc="Whether the macro-micro integration must be ran at least once",
)
integration_check_absolute_convergence
class-attribute
instance-attribute
integration_check_absolute_convergence: bool = property(
fget=lambda self: self.model.options.integration_check_absolute_convergence,
fset=lambda self, value: setattr(
self.model.options, "integration_check_absolute_convergence", value
),
doc="Whether to check absolute contact integration error instead of the relative error",
)
integration_check_convergence
class-attribute
instance-attribute
integration_check_convergence: bool = property(
fget=lambda self: self.model.options.integration_check_convergence,
fset=lambda self, value: setattr(
self.model.options, "integration_check_convergence", value
),
doc="Converge the macro-micro integration algorithm when the number of iterations reaches the maximum",
)
integration_loading_ratio
class-attribute
instance-attribute
integration_loading_ratio: float = property(
fget=lambda self: self.model.options.integration_loading_ratio,
fset=lambda self, value: setattr(
self.model.options, "integration_loading_ratio", value
),
doc="Macro-micro integration loading ratio for the contact force and displacement",
)
integration_max_iterations
class-attribute
instance-attribute
integration_max_iterations: int = property(
fget=lambda self: self.model.options.integration_max_iterations,
fset=lambda self, value: setattr(
self.model.options, "integration_max_iterations", value
),
doc="Maximum number of iterations for macro-micro integration",
)
integration_relative_tolerance
class-attribute
instance-attribute
integration_relative_tolerance: float = property(
fget=lambda self: self.model.options.integration_relative_tolerance,
fset=lambda self, value: setattr(
self.model.options, "integration_relative_tolerance", value
),
doc="Relative tolerance for macro-micro integration",
)
integration_substepping_max_ratio
class-attribute
instance-attribute
integration_substepping_max_ratio: float = property(
fget=lambda self: self.model.options.integration_substepping_max_ratio,
fset=lambda self, value: setattr(
self.model.options, "integration_substepping_max_ratio", value
),
doc="Maximum macro-micro integration substepping ratio",
)
integration_substepping_min_ratio
class-attribute
instance-attribute
integration_substepping_min_ratio: float = property(
fget=lambda self: self.model.options.integration_substepping_min_ratio,
fset=lambda self, value: setattr(
self.model.options, "integration_substepping_min_ratio", value
),
doc="Minimum macro-micro integration substepping ratio",
)
integration_substepping_relative_to_increment
class-attribute
instance-attribute
integration_substepping_relative_to_increment: bool = property(
fget=lambda self: self.model.options.integration_substepping_relative_to_increment,
fset=lambda self, value: setattr(
self.model.options,
"integration_substepping_relative_to_increment",
value,
),
doc="Whether to use the macro-micro integration substepping relative to the increment of last step",
)
integration_tolerance_relative_stress
class-attribute
instance-attribute
integration_tolerance_relative_stress: bool = property(
fget=lambda self: self.model.options.integration_tolerance_relative_stress,
fset=lambda self, value: setattr(
self.model.options, "integration_tolerance_relative_stress", value
),
doc="Whether to use relative tolerance to the stress norm",
)
is_micromechanical_model
property
Whether the model is a micromechanical model.
j2yang_yield_function_epsr_relative_to_kp
class-attribute
instance-attribute
j2yang_yield_function_epsr_relative_to_kp: bool = property(
fget=lambda self: self.model.options.j2yang_yield_function_epsr_relative_to_kp,
fset=lambda self, value: setattr(
self.model.options, "j2yang_yield_function_epsr_relative_to_kp", value
),
doc="Whether to use the epsr relative to kp in the yield function for J2Yang model",
)
j2yang_yield_function_softening_alpha
class-attribute
instance-attribute
j2yang_yield_function_softening_alpha: float = property(
fget=lambda self: self.model.options.j2yang_yield_function_softening_alpha,
fset=lambda self, value: setattr(
self.model.options, "j2yang_yield_function_softening_alpha", value
),
doc="Parameter alpha to control the softening behavior in the yield function for J2Yang model",
)
j2yang_yield_function_softening_beta
class-attribute
instance-attribute
j2yang_yield_function_softening_beta: float = property(
fget=lambda self: self.model.options.j2yang_yield_function_softening_beta,
fset=lambda self, value: setattr(
self.model.options, "j2yang_yield_function_softening_beta", value
),
doc="Parameter beta to control the softening behavior in the yield function for J2Yang model",
)
j2yang_yield_function_softening_relative_to_CSR
class-attribute
instance-attribute
j2yang_yield_function_softening_relative_to_CSR: bool = property(
fget=lambda self: self.model.options.j2yang_yield_function_softening_relative_to_CSR,
fset=lambda self, value: setattr(
self.model.options,
"j2yang_yield_function_softening_relative_to_CSR",
value,
),
doc="Whether softening behavior depends on critical stress ratio in the yield function for J2Yang model",
)
j2yang_yield_function_softening_type
class-attribute
instance-attribute
j2yang_yield_function_softening_type: Literal[
"exponential", "hyperbolic", "hyperbolic-modified"
] = property(
fget=lambda self: self.model.options.j2yang_yield_function_softening_type,
fset=lambda self, value: setattr(
self.model.options, "j2yang_yield_function_softening_type", value
),
doc="Type of softening behavior in the yield function for J2Yang model, either 'exponential', 'hyperbolic' or 'hyperbolic-modified'",
)
kinematic_hypothesis
class-attribute
instance-attribute
kinematic_hypothesis: bool = property(
fget=lambda self: self.model.options.kinematic_hypothesis,
fset=lambda self, value: setattr(
self.model.options, "kinematic_hypothesis", value
),
doc="Whether to use the kinematic hypothesis",
)
loading_direction_scale
class-attribute
instance-attribute
loading_direction_scale: float = property(
fget=lambda self: self.model.options.loading_direction_scale,
fset=lambda self, value: setattr(
self.model.options, "loading_direction_scale", value
),
doc="Scale for loading direction",
)
loading_direction_type
class-attribute
instance-attribute
loading_direction_type: Literal[
"isotropic", "depsd", "depspd", "s", "sa", "custom"
] = property(
fget=lambda self: self.model.options.loading_direction_type,
fset=lambda self, value: setattr(
self.model.options, "loading_direction_type", value
),
doc="Type of loading direction, `isotropic`, `depsd`, `depspd`, `s`, `sa`, or `custom`",
)
mixed_load_absolute_tolerance
class-attribute
instance-attribute
mixed_load_absolute_tolerance: float = property(
fget=lambda self: self.model.options.mixed_load_absolute_tolerance,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_absolute_tolerance", value
),
doc="Absolute tolerance for mixed load control",
)
mixed_load_check_absolute_convergence
class-attribute
instance-attribute
mixed_load_check_absolute_convergence: bool = property(
fget=lambda self: self.model.options.mixed_load_check_absolute_convergence,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_check_absolute_convergence", value
),
doc="Whether to check absolute tolerance for the mixed load",
)
mixed_load_check_convergence
class-attribute
instance-attribute
mixed_load_check_convergence: bool = property(
fget=lambda self: self.model.options.mixed_load_check_convergence,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_check_convergence", value
),
doc="Converge the mixed load control algorithm when the number of iterations reaches the maximum",
)
mixed_load_check_strain_convergence
class-attribute
instance-attribute
mixed_load_check_strain_convergence: bool = property(
fget=lambda self: self.model.options.mixed_load_check_strain_convergence,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_check_strain_convergence", value
),
doc="Whether to check strain convergence of the mixed load control algorithm",
)
mixed_load_check_stress_convergence
class-attribute
instance-attribute
mixed_load_check_stress_convergence: bool = property(
fget=lambda self: self.model.options.mixed_load_check_stress_convergence,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_check_stress_convergence", value
),
doc="Whether to check stress convergence of the mixed load control algorithm",
)
mixed_load_constant_elastic_stiffness
class-attribute
instance-attribute
mixed_load_constant_elastic_stiffness: bool = property(
fget=lambda self: self.model.options.mixed_load_constant_elastic_stiffness,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_constant_elastic_stiffness", value
),
doc="Whether to use constant elastic stiffness within a mixed load iteration to improve convergence of state-dependent elastoplastic models",
)
mixed_load_max_iterations
class-attribute
instance-attribute
mixed_load_max_iterations: int = property(
fget=lambda self: self.model.options.mixed_load_max_iterations,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_max_iterations", value
),
doc="Maximum number of iterations",
)
mixed_load_max_larger_steps
class-attribute
instance-attribute
mixed_load_max_larger_steps: int = property(
fget=lambda self: self.model.options.mixed_load_max_larger_steps,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_max_larger_steps", value
),
doc="Allowable steps for the convergence of mixed load control and macro-micro integration",
)
mixed_load_relative_tolerance
class-attribute
instance-attribute
mixed_load_relative_tolerance: float = property(
fget=lambda self: self.model.options.mixed_load_relative_tolerance,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_relative_tolerance", value
),
doc="Relative tolerance for mixed load control",
)
mixed_load_stress_as_anisotropic_stress
class-attribute
instance-attribute
mixed_load_stress_as_anisotropic_stress: bool = property(
fget=lambda self: self.model.options.mixed_load_stress_as_anisotropic_stress,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_stress_as_anisotropic_stress", value
),
doc="Whether the stress-controlled load is given as anisotropic stress",
)
mixed_load_update_void_ratio_in
class-attribute
instance-attribute
mixed_load_update_void_ratio_in: Literal[
"after_convergence", "after_iteration", "before_iteration", "elastoplastic"
] = property(
fget=lambda self: self.model.options.mixed_load_update_void_ratio_in,
fset=lambda self, value: setattr(
self.model.options, "mixed_load_update_void_ratio_in", value
),
doc="When to update the void ratio in the mixed load control algorithm",
)
model
instance-attribute
model: MicromechanicalBase | ElastoplasticModel | None
The micromechanical/elastoplastic model.
multi_scale_return_mapping
class-attribute
instance-attribute
multi_scale_return_mapping: bool = property(
fget=lambda self: self.model.options.multi_scale_return_mapping,
fset=lambda self, value: setattr(
self.model.options, "multi_scale_return_mapping", value
),
doc="Solve the plastic problem with the multi-scale return mapping",
)
npv
class-attribute
instance-attribute
npv: float = property(
fget=lambda self: self.integration.npv,
fset=lambda self, value: setattr(self.integration, "npv", value),
doc="Number of contacts per unit volume",
)
plastic_method
property
writable
The plastic method to solve the plasticity problem.
radius
class-attribute
instance-attribute
radius: float = property(
fget=lambda self: self.integration.radius,
fset=lambda self, value: setattr(self.integration, "radius", value),
doc="Particle radius",
)
run_contact_integration_steps
class-attribute
instance-attribute
run_contact_integration_steps: int = property(
fget=lambda self: self.model.options.run_contact_integration_steps,
fset=lambda self, value: setattr(
self.model.options, "run_contact_integration_steps", value
),
doc="Number of macro-micro integration iterations to run",
)
run_mixed_load_steps
class-attribute
instance-attribute
run_mixed_load_steps: int = property(
fget=lambda self: self.model.options.run_mixed_load_steps,
fset=lambda self, value: setattr(
self.model.options, "run_mixed_load_steps", value
),
doc="Number of mixed load iterations to run",
)
run_steps
class-attribute
instance-attribute
run_steps: int = property(
fget=lambda self: self.model.options.run_steps,
fset=lambda self, value: setattr(self.model.options, "run_steps", value),
doc="Number of steps to run",
)
save_elastic_stiffness_matrix
class-attribute
instance-attribute
save_elastic_stiffness_matrix: bool = property(
fget=lambda self: self.model.options.save_elastic_stiffness_matrix,
fset=lambda self, value: setattr(
self.model.options, "save_elastic_stiffness_matrix", value
),
doc="Whether to save the elastic stiffness matrix",
)
simsand_yield_function_additional_shear_strain
class-attribute
instance-attribute
simsand_yield_function_additional_shear_strain: float = property(
fget=lambda self: self.model.options.simsand_yield_function_additional_shear_strain,
fset=lambda self, value: setattr(
self.model.options,
"simsand_yield_function_additional_shear_strain",
value,
),
doc="Additional shear strain to be added to the yield function for SIMSAND model to improve numerical stability when shear strain is close to zero",
)
simsand_yield_function_shear_strain_scale
class-attribute
instance-attribute
simsand_yield_function_shear_strain_scale: float = property(
fget=lambda self: self.model.options.simsand_yield_function_shear_strain_scale,
fset=lambda self, value: setattr(
self.model.options, "simsand_yield_function_shear_strain_scale", value
),
doc="Scale factor for the shear strain in the yield function for SIMSAND model",
)
simsand_yield_function_use_plastic_strain
class-attribute
instance-attribute
simsand_yield_function_use_plastic_strain: bool = property(
fget=lambda self: self.model.options.simsand_yield_function_use_plastic_strain,
fset=lambda self, value: setattr(
self.model.options, "simsand_yield_function_use_plastic_strain", value
),
doc="Whether to use plastic strain (or total strain) in the yield function for SIMSAND model",
)
update_fabric_coefs
class-attribute
instance-attribute
update_fabric_coefs: bool = property(
fget=lambda self: self.model.options.update_fabric_coefs,
fset=lambda self, value: setattr(
self.model.options, "update_fabric_coefs", value
),
doc="Whether to update fabric coefficients",
)
update_npv
class-attribute
instance-attribute
update_npv: bool = property(
fget=lambda self: self.model.options.update_npv,
fset=lambda self, value: setattr(self.model.options, "update_npv", value),
doc="Whether to update npv based on the coordination number and particle radius",
)
update_void_ratio_from_after_isotropic_loading_to_before
class-attribute
instance-attribute
update_void_ratio_from_after_isotropic_loading_to_before: bool = property(
fget=lambda self: self.model.options.update_void_ratio_from_after_isotropic_loading_to_before,
fset=lambda self, value: setattr(
self.model.options,
"update_void_ratio_from_after_isotropic_loading_to_before",
value,
),
doc="Whether to update the void ratio after the isotropic loading to the void ratio before the isotropicloading, useful if the initial void ratio is given after the isotropic loading",
)
use_isotropic_fabric_tensor_in_strain_averaging
class-attribute
instance-attribute
use_isotropic_fabric_tensor_in_strain_averaging: bool = property(
fget=lambda self: self.model.options.use_isotropic_fabric_tensor_in_strain_averaging,
fset=lambda self, value: setattr(
self.model.options,
"use_isotropic_fabric_tensor_in_strain_averaging",
value,
),
doc="Whether to use the isotropic fabric tensor in strain averaging",
)
use_isotropic_fabric_tensor_in_stress_localization
class-attribute
instance-attribute
use_isotropic_fabric_tensor_in_stress_localization: bool = property(
fget=lambda self: self.model.options.use_isotropic_fabric_tensor_in_stress_localization,
fset=lambda self, value: setattr(
self.model.options,
"use_isotropic_fabric_tensor_in_stress_localization",
value,
),
doc="Whether to use the isotropic fabric tensor in stress localization",
)
use_plastic_strain_in_fabric_evolution
class-attribute
instance-attribute
use_plastic_strain_in_fabric_evolution: bool = property(
fget=lambda self: self.model.options.use_plastic_strain_in_fabric_evolution,
fset=lambda self, value: setattr(
self.model.options, "use_plastic_strain_in_fabric_evolution", value
),
doc="Whether to use plastic strain in fabric evolution",
)
userDefinedCalculationOptions
property
The user-defined calculation options that are not in the default options.
verbose
class-attribute
instance-attribute
verbose: bool = property(
fget=lambda self: self.model.options.verbose,
fset=lambda self, value: setattr(self.model.options, "verbose", value),
doc="Whether to print verbose information",
)
__init__
__init__(
*model_types: Union[
MicromechanicalBase,
type,
str | PathLike,
AvailableModels,
AvailableMicromechanicalModels,
AvailableContactModels,
],
args: tuple = (),
kwargs: dict = None,
no_stop: bool = False,
backend: Literal["python", "cpp"] = backend,
**options
)
Constructor for the micromechanical model manager base class.
| PARAMETER | DESCRIPTION |
|---|---|
model_types
|
The micromechanical model to use. If no positional arguments are provided, the model will not be initialized. If one positional argument is provided, it should be:
If two positional arguments are provided, they should be:
In C++ backend, the micromechanical model type and contact law type can be a string of the file path to the compiled shared library. For example, the following usages are valid:
TYPE:
|
args
|
The positional arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
kwargs
|
The keyword arguments for the micromechanical model if the supplied model is a class.
TYPE:
|
no_stop
|
Whether to stop the calculation when an error occurs.
TYPE:
|
backend
|
The backend to use, default is the configured backend.
TYPE:
|
options
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
defaultParameters
classmethod
The default parameters.
defaultStandardDeviations
classmethod
The default standard deviations.
filterExperiments
filterExperiments(
*args: str,
experiments: ExperimentsType | None = None,
method: Literal[
"equal", "startswith", "endswith", "contains", "glob"
] = "glob",
strategy: Literal["include", "exclude"] = "include",
inplace: bool = False,
strict: bool = True,
**kwargs
) -> Dict[str, Experiment] | None
Filter the experiments by the name of the experiments.
| PARAMETER | DESCRIPTION |
|---|---|
args
|
Arguments to filter the experiments by the name.
TYPE:
|
experiments
|
Experiments to filter, by default None which means all experiments in the manager
TYPE:
|
method
|
The method to filter the experiments, by default "glob"
TYPE:
|
strategy
|
The strategy to filter the experiments, by default "include"
TYPE:
|
inplace
|
Whether to filter the experiments in place, only used to replace the experiments in the manager, by default False
TYPE:
|
strict
|
If true, notes and options must match exactly with kwargs, otherwise, only items in options and notes are checked with kwargs for equality, by default True
TYPE:
|
kwargs
|
Additional notes or options that should be matched with the experiments
DEFAULT:
|
iterateExperiments
iterateExperiments(
experiments: ExperimentsType | None = None,
) -> Generator[Experiment]
Iterate over the experiments.
loadCalibration
Load parameters, options, and experiments from a calibration file.
loadExperiments
loadExperiments(
filename: str | AvailableDatasets | PathLike,
) -> Dict[str, Experiment]
Load the experiments from a file and add them to the current experiments.
loadOptions
loadOptions(
filePath: str | Path,
*,
key: str = "options",
type: Literal["json", "toml", "yaml", "infer"] = "infer"
)
Load the calculation options from a JSON/TOML/YAML file.
loadParameters
loadParameters(
filePath: str | Path,
*,
key: str = "parameters",
type: Literal["json", "toml", "yaml", "infer"] = "infer"
)
Load the material parameters from a JSON/TOML/YAML file.
readExperiments
readExperiments(
filename: str | AvailableDatasets | PathLike,
) -> Dict[str, Experiment]
Read the experiments from a file or from the existing datasets.
readParameters
classmethod
readParameters(
filePath: str | Path,
*,
key: str = "parameters",
type: Literal["json", "toml", "yaml", "infer"] = "infer"
) -> dict[str, float]
Read the material parameters from a JSON/TOML/YAML file.
requiredParameters
classmethod
The required parameters.
run
run(
experiment_name: str = "", *, no_stop: bool | None = None, **options
) -> SVExporter
Run the model, return the cached state variables if the calculation is already done before with the same string representation of model exporter.
| PARAMETER | DESCRIPTION |
|---|---|
experiment_name
|
The name of the experiment for error printing.
TYPE:
|
no_stop
|
Override the no_stop option for the model, whether to stop the calculation when an error occurs.
TYPE:
|
options
|
The calculation options for the micromechanical model, the contact law, or the material.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
stateVar
|
The state variables' exporter.
TYPE:
|
saveExperiments
saveExperiments(
filename: str | PathLike,
indent: int = 4,
model_dump_kwargs: Dict | None = None,
**json_dump_kwargs
)
Save the experiments to a file.
setCalculationOptions
setCalculationOptions(
opts: Dict[str, float] = None,
*,
errstate: Literal["raise", "warn", "ignore"] = "raise",
**options
)
Set the calculation options for the micromechanical model, the contact law, or the material.
| PARAMETER | DESCRIPTION |
|---|---|
errstate
|
How to handle unsupported options.
TYPE:
|
opts
|
The calculation options for the micromechanical model, the contact law, the integration, or the material.
TYPE:
|
options
|
The calculation options for the micromechanical model, the contact law, the integration, or the material.
TYPE:
|
setDebug
Set the debug mode.
| PARAMETER | DESCRIPTION |
|---|---|
debug
|
The debug mode.
TYPE:
|
setMisesSMP
Use Mises-SMP criterion.
setParameters
setParameters(
params: Dict[str, float] = None, experiment_name: str = "", **kwargs: float
) -> None
Set the material parameters. Keys can be in the form of module:qualname(key1,key2) to set the specialized
parameters.
| PARAMETER | DESCRIPTION |
|---|---|
experiment_name
|
The name of the experiment for experiment-specific parameters.
TYPE:
|
params
|
The parameters to set.
TYPE:
|
kwargs
|
The parameters to set.
TYPE:
|
setTrescaMohrCoulomb
Use Tresca-Mohr-Coulomb criterion.
setupDebugVariable
setupDebugVariable(
mixed_load_error: bool = None,
mixed_loads: bool = None,
sigx: bool = None,
epsx: bool = None,
integration_error: bool = None,
integrations: bool = None,
sigi: bool = None,
sig: bool = None,
sigm: bool = None,
sigc: bool = None,
eps: bool = None,
epsm: bool = None,
epsc: bool = None,
dsig: bool = None,
deps: bool = None,
force: bool = None,
disp: bool = None,
yield_function: bool = None,
dfdforce: bool = None,
dgdforce: bool = None,
hardening: bool = None,
kp: bool = None,
dlambda: bool = None,
ddisp: bool = None,
ddispp: bool = None,
plastic_corrections: bool = None,
e: bool = None,
ec: bool = None,
**kwargs
)
Set up the debug information, whether to enable debug information for specific fields.
simulateExperiments
simulateExperiments(
experiments: ExperimentsType | None = None,
*,
phase_steps: dict[str, int] | None = None,
experiment_options: dict[str, dict[str, Any]] | None = None
) -> SVExporter | Dict[str, SVExporter] | List[SVExporter]
Simulate the experiments.
| PARAMETER | DESCRIPTION |
|---|---|
experiments
|
The experiments to simulate.
TYPE:
|
phase_steps
|
Override the number of steps for each load phase, by default None
TYPE:
|
experiment_options
|
Override the calculation options for each experiment, by default None
TYPE:
|
verifyAbaqusIncrement
verifyAbaqusIncrement(
statev: List[float],
deps: List[float],
dispp: bool = False,
cscalars: bool = False,
cvectors: bool = False,
*,
raise_error: bool = True
)
Verify an Abaqus increment with given state variables and strain increment.
verifyAbaqusIncrements
verifyAbaqusIncrements(
data: Union[Iterable, str, PathLike],
dispp: bool = False,
cscalars: bool = False,
cvectors: bool = False,
*,
inherit_stress: bool = True,
raise_error: bool = True
) -> SVExporter
Verify an Abaqus increments.
ParameterKey
Bases: str
A key for the model parameters in a global sense.
setup
Set up the model with the value
| PARAMETER | DESCRIPTION |
|---|---|
model
|
The model to be setup
TYPE:
|
value
|
The value to set
TYPE:
|
PlotOfOptions
Bases: TypedDict
data
instance-attribute
data: NotRequired[
Union[
List[SVExporter],
SVExporter,
List["YieldFunction"],
"YieldFunction",
List["ElasticityBase"],
"ElasticityBase",
None,
]
]
experiment_options
instance-attribute
VisualizationModel
Bases: CalibrationModel
Visualization manager for the micromechanical model.
fabricplot
fabricplot(
n_theta: int | None = None,
n_phi: int | None = None,
*,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
data: SVExporter | None = None,
force: bool = False,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot evolution of fabric tensors.
macroplot
macroplot(
*args: str,
x: str | Literal["first", "auto"] = "auto",
experiments: ExperimentsType | None = None,
simulate_experiment_kwargs: dict | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
label: str = "{x} vs {y}",
data: SVExporter | None = None,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot macroscopic curves. Equivalent to
model.plot("100*epsa", "q", "-p", "q", "100*epsa", "100*epsv", "-p", "e", ...).
- material parameters (
model.parameters) {x}and{y}for the name of the variable
See Also
microplot: Plot microscopic curves
| PARAMETER | DESCRIPTION |
|---|---|
args
|
State variables to plot. If the number of arguments is an even number, multiple curves will be plotted
with every two arguments as a pair of
if you specify
or any other string:
If you want to use a different strategy for the x-axis, you can specify it with
Multiple x-axis can also be specified. If both x and y have multiple variables, the number of x-axis must be equal to the number of y-axis.
TYPE:
|
x
|
Variable to plot on x-axis, by default "auto".
TYPE:
|
experiments
|
The experiments to plot, only one experiment is allowed.
TYPE:
|
simulate_experiment_kwargs
|
Keyword arguments for the
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
An integer or a slice indicates index of the step.
TYPE:
|
idx
|
An integer or a slice indicates index of the integration point for contact variables.
TYPE:
|
col
|
An integer or a slice indicates index of the column for variables with multiple columns, this argument
will be ignored if the variable has only one column or the column index is already specified in
TYPE:
|
label
|
Format string for the label in the legend, by default "{x} vs {y}"
TYPE:
|
data
|
State variables to plot, if not specified, the simulation will be run, by default None
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
ncols
|
Number of columns in the figure grid, by default 2
TYPE:
|
backend
|
Backend to use, by default None which means the backend set in the environment variable
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
line_kwargs
|
Line-specific keyword arguments, by default None
TYPE:
|
props
|
Properties passed to the
TYPE:
|
bokeh_show
|
Whether to show the figure in the browser, by default False
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
savgol_filter
|
Keyword arguments for
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure | GridPlot
|
The matplotlib figure or bokeh grid plot of the macroscopic curves |
microplot
microplot(
*args: str,
experiments: ExperimentsType | None = None,
simulate_experiment_kwargs: dict | None = None,
beta: float = None,
gamma: float = None,
unit: Literal["rad", "deg"] = "rad",
smooth: bool = False,
data: SVExporter = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
label: str = "Step {step}",
return_handles: bool = False,
on: Plottable | None = None,
ncols: int = 2,
subplots_kwargs: dict | None = None,
props: Dict[str, Any] | None = None,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Figure | Tuple[Figure, List[Line2D]]
Plot microscopic curves. Specify one (and only one) of beta or gamma to plot data of a specific
azimuth, the other angle will be used for the x-axis.
Notes
The following placeholders are supported for arguments label and kwargs:
- material parameters (
model.parameters) {name}for the name of the variable{step}for the step index{idx},{beta}and{gamma}for contact variables
See Also
microplot: Plot microscopic curves
| PARAMETER | DESCRIPTION |
|---|---|
args
|
Names of the variables to plot
TYPE:
|
experiments
|
The experiments to plot, only one experiment is allowed.
TYPE:
|
simulate_experiment_kwargs
|
Keyword arguments for the
TYPE:
|
beta
|
The angle between the projection of the azimuth on the YZ plane and the Y axis
TYPE:
|
gamma
|
The angle between the azimuth and the X axis
TYPE:
|
unit
|
Unit of the angles, by default
TYPE:
|
smooth
|
Whether to smooth the data, by default True
TYPE:
|
data
|
State variables to plot, if not specified, the simulation will be run, by default None
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
Steps to plot
TYPE:
|
idx
|
Index of the integration point to plot, by default slice(None)
TYPE:
|
col
|
An integer or a slice indicates index of the column for variables with multiple columns, this argument
will be ignored if the variable has only one column or the column index is already specified in
TYPE:
|
label
|
Label for the legend, by default "Step {step}"
TYPE:
|
return_handles
|
Whether to return the handles of the plotted lines, by default False
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
ncols
|
Number of columns in the figure grid, by default 2
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
props
|
Properties passed to the
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
savgol_filter
|
Keyword arguments for
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure
|
Figure with microscopic curves |
List[Line2D]
|
Handles of the plotted lines, only returned if |
microplots
microplots(
*,
experiments: ExperimentsType | None = None,
simulate_experiment_kwargs: dict | None = None,
beta: float = None,
gamma: float = None,
unit: Literal["rad", "deg"] = "rad",
smooth: bool = False,
data: SVExporter = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
label: str = "Step {step}",
on: Plottable | None = None,
ncols: int = 2,
subplots_kwargs: dict | None = None,
props: Dict[str, Any] | None = None,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Figure
Plot microscopic curves for normal force, shear force, normal displacement, and shear displacement.
plot
plot(
*args: str,
x: str | Literal["first", "auto"] = "auto",
experiments: ExperimentsType | None = None,
simulate_experiment_kwargs: dict | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
label: str = "{x} vs {y}",
data: Union[SVExporter, "YieldFunction", "ElasticityBase", None] = None,
data_get_kwargs: Dict[str, Any] | None = None,
normalize: bool | Literal["max", "mean", "x"] | float = False,
normalize_x: float | None = None,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot one (or multiple) line(s) of the simulation.
Notes
The following placeholders are supported for arguments label, kwargs and line_kwargs:
- material parameters (
model.parameters) {x}and{y}for the name of the variable{idx},{beta}and{gamma}for contact variables
| PARAMETER | DESCRIPTION |
|---|---|
args
|
State variables to plot. If the number of arguments is an even number, multiple curves will be plotted
with every two arguments as a pair of
if you specify
or any other string:
If you want to use a different strategy for the x-axis, you can specify it with
Multiple x-axis can also be specified. If both x and y have multiple variables, the number of x-axis must be equal to the number of y-axis.
TYPE:
|
x
|
Variable to plot on x-axis, by default "auto".
TYPE:
|
experiments
|
The experiments to plot, only one experiment is allowed.
TYPE:
|
simulate_experiment_kwargs
|
Keyword arguments for the
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
An integer or a slice indicates index of the step.
TYPE:
|
idx
|
An integer or a slice indicates index of the integration point for contact variables.
TYPE:
|
col
|
An integer or a slice indicates index of the column for variables with multiple columns, this argument
will be ignored if the variable has only one column or the column index is already specified in
TYPE:
|
label
|
Format string for the label in the legend, supported placeholders, by default "{x} vs {y}"
TYPE:
|
data
|
State variables to plot, if not specified, the simulation will be run, by default None
TYPE:
|
data_get_kwargs
|
Extra keyword arguments for the
TYPE:
|
normalize
|
Whether to normalize the data variables. If True or "max", normalize by the maximum value. If "mean",
normalize by the mean value, if "x", normalize by the value corresponding to this angle specified by
TYPE:
|
normalize_x
|
The x value to normalize the yield function.
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
ncols
|
Number of columns in the figure grid, by default 2
TYPE:
|
backend
|
Backend to use, by default None which means the backend set in the environment variable
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
line_kwargs
|
Line-specific keyword arguments, by default None
TYPE:
|
props
|
Properties passed to the
TYPE:
|
bokeh_show
|
Whether to show the figure in the browser, by default False
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
savgol_filter
|
Keyword arguments for
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure | GridPlot
|
The matplotlib figure or bokeh gridplot |
plotComparisons
plotComparisons(
*args: str,
experiment_kwargs: Dict[str, Any] | None = None,
simulation_kwargs: Dict[str, Any] | None = None,
x: str | Literal["first", "auto"] = "auto",
experiments: ExperimentsType | None = None,
phase_steps: dict[str, int] | None = None,
experiment_options: dict[str, dict[str, Any]] | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
normalize: bool | Literal["max", "mean", "x"] | float = False,
normalize_x: float | None = None,
label: str = "{experiment}",
data: Union[
List[SVExporter],
SVExporter,
List["YieldFunction"],
"YieldFunction",
List["ElasticityBase"],
"ElasticityBase",
None,
] = None,
data_set_experiment_options: bool = False,
data_get_kwargs: Dict[str, Any] | None = None,
experiment_get_kwargs: Dict[str, Any] | None = None,
clip_xydata: bool = False,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
method: Literal["plot", "scatter"] | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
line_kwargs_each: Literal["experiment", "line"] = "experiment",
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot the comparisons between experiments and simulations.
plotExperiments
plotExperiments(
*args: str,
x: str | Literal["first", "auto"] = "auto",
experiments: ExperimentsType | None = None,
normalize: bool | Literal["max", "mean", "x"] | float = False,
normalize_x: float | None = None,
label: str = "{experiment}",
experiment_get_kwargs: Dict[str, Any] | None = None,
clip_xydata: bool = False,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
method: Literal["plot", "scatter"] | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
line_kwargs_each: Literal["experiment", "line"] = "experiment",
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot the experiments.
plotSimulations
plotSimulations(
*args: str,
x: str | Literal["first", "auto"] = "auto",
experiments: ExperimentsType | None = None,
phase_steps: dict[str, int] | None = None,
experiment_options: dict[str, dict[str, Any]] | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
normalize: bool | Literal["max", "mean", "x"] | float = False,
normalize_x: float | None = None,
label: str = "{experiment}",
data: Union[
List[SVExporter],
SVExporter,
List["YieldFunction"],
"YieldFunction",
List["ElasticityBase"],
"ElasticityBase",
None,
] = None,
data_set_experiment_options: bool = False,
data_get_kwargs: Dict[str, Any] | None = None,
experiment_get_kwargs: Dict[str, Any] | None = None,
clip_xydata: bool = False,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
method: Literal["plot", "scatter"] | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
line_kwargs_each: Literal["experiment", "line"] = "experiment",
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot the simulations.
plotof
plotof(
*args: str,
x: str | Literal["first", "auto"] = "auto",
type: Literal["experiment", "simulation"] = "experiment",
experiments: ExperimentsType | None = None,
phase_steps: dict[str, int] | None = None,
experiment_options: dict[str, dict[str, Any]] | None = None,
phase: int | slice | Iterable[int] = slice(None),
step: int | slice | Iterable[int] = slice(None),
idx: int | slice | Iterable[int] = slice(None),
col: int | slice | Iterable[int] = slice(None),
normalize: bool | Literal["max", "mean", "x"] | float = False,
normalize_x: float | None = None,
label: str = "{experiment}",
data: Union[
List[SVExporter],
SVExporter,
List["YieldFunction"],
"YieldFunction",
List["ElasticityBase"],
"ElasticityBase",
None,
] = None,
data_set_experiment_options: bool = False,
data_get_kwargs: Dict[str, Any] | None = None,
experiment_get_kwargs: Dict[str, Any] | None = None,
clip_xydata: bool = False,
on: Plottable | None = None,
ncols: int = 2,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
subplots_kwargs: dict | None = None,
method: Literal["plot", "scatter"] | None = None,
line_kwargs: Iterable[Dict[str, Any]] | None = None,
line_kwargs_each: Literal["experiment", "line"] = "experiment",
props: Dict[str, Any] | None = None,
bokeh_show: bool = False,
tight_layout: bool = True,
savgol_filter: Dict[str, Any] | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot the experiments and/or simulations.
Notes
The following placeholders are supported for arguments label, kwargs and line_kwargs:
- material parameters (
model.parameters) - experiment options (
experiment.options) and notes (experiment.notes) {x}and{y}for the name of the variable{idx},{beta}and{gamma}for contact variables{experiment}for the name of the experiment{type}for the type of the data, either "experiment" or "simulation"
| PARAMETER | DESCRIPTION |
|---|---|
args
|
State variables to plot. If the number of arguments is an even number, multiple curves will be plotted
with every two arguments as a pair of
if you specify
or any other string:
If you want to use a different strategy for the x-axis, you can specify it with
TYPE:
|
x
|
Variable to plot on x-axis, by default "auto".
TYPE:
|
type
|
The type of the plot, by default "experiment"
TYPE:
|
experiments
|
The experiments to plot, by default None which means all experiments in the manager
TYPE:
|
phase_steps
|
Override the number of steps for each load phase, by default None
TYPE:
|
experiment_options
|
Override the options for each experiment, by default None
TYPE:
|
phase
|
An integer or a slice indicates index of the phase.
TYPE:
|
step
|
An integer or a slice indicates index of the step.
TYPE:
|
idx
|
An integer or a slice indicates index of the integration point for contact variables.
TYPE:
|
col
|
An integer or a slice indicates index of the column for variables with multiple columns, this argument
will be ignored if the variable has only one column or the column index is already specified in
TYPE:
|
normalize
|
Whether to normalize the data variables. If True or "max", normalize by the maximum value. If "mean",
normalize by the mean value, if "x", normalize by the value corresponding to this angle specified by
TYPE:
|
normalize_x
|
The x value to normalize the yield function.
TYPE:
|
label
|
Format string for the label in the legend, by default
TYPE:
|
data
|
State variables to plot, if not specified, the simulation will be run, by default None
TYPE:
|
data_set_experiment_options
|
Whether to set the experiment options to the data, by default False
TYPE:
|
data_get_kwargs
|
Extra keyword arguments for the
TYPE:
|
experiment_get_kwargs
|
Extra keyword arguments for the
TYPE:
|
clip_xydata
|
Clip the x and y data to the range of the experiment data, by default False
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
ncols
|
Number of columns in the figure grid, by default 2
TYPE:
|
backend
|
Backend to use, by default None which means the backend set in the environment variable
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
method
|
Method to use for plotting, by default
TYPE:
|
line_kwargs
|
Keyword arguments for the lines, by default None
TYPE:
|
line_kwargs_each
|
Whether to use the line kwargs for each line or for each experiment, by default "experiment"
TYPE:
|
props
|
Properties passed to the
TYPE:
|
bokeh_show
|
Whether to show the figure in the browser, by default False
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
savgol_filter
|
Keyword arguments for
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|
tensorplot
classmethod
tensorplot(
tensor: "ndarray",
n_theta: int | None = None,
n_phi: int | None = None,
*,
deviatoric: bool = True,
on: Plottable | None = None,
subplots_kwargs: dict | None = None,
edgecolor: str = "red",
linewidth: float = 0.5,
rstride: int = 10,
cstride: int = 10,
alpha: float = 0.3,
cmap: str = "Reds",
plot_projection_contour: bool = True,
xoffset: float | None = None,
yoffset: float | None = None,
zoffset: float | None = None,
contour_kwargs: Dict[str, Any] | None = None,
props: Dict[str, Any] | None = None,
**kwargs
)
Plot a fabric tensor.
| PARAMETER | DESCRIPTION |
|---|---|
deviatoric
|
Whether the fabric tensor is deviatoric tensor.
TYPE:
|
on
|
Axes to plot on, by default None
TYPE:
|
subplots_kwargs
|
Keyword arguments for creating the subplots, by default None
TYPE:
|
edgecolor
|
Color for the edges, by default "red"
TYPE:
|
linewidth
|
Line width, by default 0.5
TYPE:
|
rstride
|
Downsampling stride in each direction. These arguments are mutually exclusive with rcount and ccount, by default 10
TYPE:
|
cstride
|
Downsampling stride in each direction. These arguments are mutually exclusive with rcount and ccount, by default 10
TYPE:
|
alpha
|
Color alpha for the faces
TYPE:
|
cmap
|
Color map for the contour
TYPE:
|
plot_projection_contour
|
Whether to plot the contour of the projections, by default True
TYPE:
|
xoffset
|
Offsets for plotting the contour of the projections
TYPE:
|
yoffset
|
Offsets for plotting the contour of the projections
TYPE:
|
zoffset
|
Offsets for plotting the contour of the projections
TYPE:
|
contour_kwargs
|
Keyword arguments for contour method
TYPE:
|
props
|
Properties passed to the
TYPE:
|
bokeh_show
|
Whether to show the figure in the browser, by default False
TYPE:
|
tight_layout
|
Whether to use tight layout in the matplotlib figure, by default True
TYPE:
|
kwargs
|
Keyword arguments for
DEFAULT:
|