Index
__all__
module-attribute
__all__ = [
"GNST",
"LadeDuncan",
"MatsuokaNakai",
"MohrCoulomb",
"SMP",
"Tresca",
"VonMises",
"Wang2025",
"Wang2025CA",
"YieldFunction",
"yield_function_registry",
]
yield_function_registry
module-attribute
yield_function_registry: Registry[str, Type[YieldFunction]] = Registry()
GNST
Bases: YieldFunction
bounds
class-attribute
instance-attribute
LadeDuncan
Bases: YieldFunction
MatsuokaNakai
Bases: YieldFunction
MohrCoulomb
Bases: YieldFunction
equivalent_stress
instance-attribute
Tresca
Bases: YieldFunction
, Tresca
bounds
class-attribute
instance-attribute
VonMises
Bases: YieldFunction
, VonMises
bounds
class-attribute
instance-attribute
Wang2025
Bases: YieldFunction
PARAMETERS
class-attribute
instance-attribute
PARAMETERS = [
"phi",
"F1",
"F2",
"F12",
"F13",
"F23",
"weight_mises",
"weight_tresca",
"weight_mohr_coulomb",
"weight_smp",
"unit",
"vectorize",
"fast_orthotropy",
]
bounds
class-attribute
instance-attribute
bounds = {
"phi": (0, 90),
"F1": (-10, 10),
"F2": (-10, 10),
"F12": (-10, 10),
"F13": (-10, 10),
"F23": (-10, 10),
"weight_mises": (0, 100000.0),
"weight_tresca": (0, 100000.0),
"weight_mohr_coulomb": (0, 100000.0),
"weight_smp": (0, 100000.0),
}
stds
class-attribute
instance-attribute
stds = {
"phi": 1.0,
"F1": 0.1,
"F2": 0.1,
"F12": 0.1,
"F13": 0.1,
"F23": 0.1,
"weight_mises": 0.1,
"weight_tresca": 0.1,
"weight_mohr_coulomb": 0.1,
"weight_smp": 0.1,
}
weight_mohr_coulomb
class-attribute
instance-attribute
weight_mohr_coulomb: float = weight_mohr_coulomb
x0
class-attribute
instance-attribute
x0 = {
"phi": 30.0,
"F1": 0.0,
"F2": 0.0,
"F12": 0.0,
"F13": 0.0,
"F23": 0.0,
"weight_mises": 0.0,
"weight_tresca": 0.0,
"weight_mohr_coulomb": 1.0,
"weight_smp": 0.0,
}
__init__
__init__(
phi: float,
F1: float = 0.0,
F2: float = 0.0,
F12: float = 0.0,
F13: float = 0.0,
F23: float = 0.0,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
*,
unit: Literal["rad", "deg"] = "deg",
vectorize: bool = True,
fast_orthotropy: bool = True,
**kwargs
)
residual
staticmethod
residual(
fitting_params: List[float],
stress_states: ndarray,
fitting_param_names: List[str],
**kwargs
)
setCriterion
setCriterion(
criterion: Literal[
"Mises",
"Tresca",
"MohrCoulomb",
"SMP",
"Mises-SMP",
"Tresca-MohrCoulomb",
],
*args,
**kwargs
)
Set the criterion to use.
setFabricTensor
setFabricTensor(
*args: float | ndarray,
r1: float = 0.0,
r2: float = 0.0,
r3: float = 0.0,
unit: Literal["rad", "deg"] = "deg"
)
Set fabric tensor.
PARAMETER | DESCRIPTION |
---|---|
args
|
A tuple of 5 floats for F1, F2, F12, F13, F23 or a 3x3 fabric tensor. |
r1
|
Rotation angle around axis-1, by default 0.0.
TYPE:
|
r2
|
Rotation angle around axis-2, by default 0.0.
TYPE:
|
r3
|
Rotation angle around axis-3, by default 0.0.
TYPE:
|
unit
|
Unit of rotation angles, by default "deg".
TYPE:
|
setMisesSMP
Use Mises-SMP criterion.
Wang2025CA
Bases: Wang2025
__init__
__init__(
phi: float,
F1: float | None = None,
F2: float | None = None,
F3: float | None = None,
major_axes: int = 1,
weight_mises: float = 0.0,
weight_tresca: float = 0.0,
weight_mohr_coulomb: float = 1.0,
weight_smp: float = 0.0,
*,
unit: Literal["rad", "deg"] = "deg",
vectorize: bool = True,
fast_orthotropy: bool = True,
**kwargs
)
YieldFunction
Bases: YieldFunction
, CalibrationABC
caches
class-attribute
caches: Dict[str, LRUCache] = {
"get": LRUCache(maxsize=128),
"get_2d_xydata": LRUCache(maxsize=128),
}
default_origin
class-attribute
instance-attribute
default_plane
class-attribute
instance-attribute
get_2d_xydata
get_2d_xydata(
polar: bool = False,
normalize: bool | Literal["max", "mean", "x"] | float = True,
normalize_x: float | None = None,
resolution: int = 500,
min_theta: float | None = None,
max_theta: float | None = None,
**kwargs
) -> Tuple[ndarray, ndarray]
Get the x and y data for plotting the yield function in 2D.
PARAMETER | DESCRIPTION |
---|---|
polar
|
Whether to plot in polar coordinates.
TYPE:
|
normalize
|
Whether to normalize the yield function. 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
|
normalize_x
|
The angle to normalize the yield function.
TYPE:
|
resolution
|
The resolution of the plot.
TYPE:
|
min_theta
|
The minimum angle to plot.
TYPE:
|
max_theta
|
The maximum angle to plot.
TYPE:
|
kwargs
|
Keyword arguments for 2D project functions.
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Tuple[ndarray, ndarray]
|
The x and y data for plotting the yield function. |
lode1
lode1(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Lode angle in Sector I (0, pi/3).
lode2
lode2(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Lode angle in Sector II (pi/3, 2*pi/3).
lode3
lode3(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Lode angle in Sector III (2*pi/3, pi).
phi1
phi1(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Friction angle in Sector I (0, pi/3).
phi2
phi2(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Friction angle in Sector II (pi/3, 2*pi/3).
phi3
phi3(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Friction angle in Sector III (2*pi/3, pi).
plot2d
plot2d(
plane: Tuple[float, float, float] = None,
origin: Tuple[float, float, float] = None,
polar: bool = False,
normalize: bool | Literal["max", "mean", "x"] | float = True,
normalize_x: float | None = None,
resolution: int = 500,
eq_stress: float | None = None,
min_stress: float | None = None,
max_stress: float | None = None,
min_theta: float | None = None,
max_theta: float | None = None,
*,
on: Plottable | None = None,
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 the yield function in 2D.
PARAMETER | DESCRIPTION |
---|---|
plane
|
The direction of the plane to plot the yield function. |
origin
|
The origin of the plane to plot the yield function. |
polar
|
Whether to plot in polar coordinates.
TYPE:
|
normalize
|
Whether to normalize the yield function. 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
|
normalize_x
|
The angle to normalize the yield function.
TYPE:
|
resolution
|
The resolution of the plot.
TYPE:
|
eq_stress
|
The equivalent stress to plot.
TYPE:
|
min_stress
|
The minimum stress to plot.
TYPE:
|
max_stress
|
The maximum stress to plot.
TYPE:
|
min_theta
|
The minimum angle to plot.
TYPE:
|
max_theta
|
The maximum angle to plot.
TYPE:
|
on
|
Axes to plot on, by default None
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:
|
props
|
Properties passed to the |
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 |
plot3d
plot3d(
type: Literal["surface", "trisurf", "wireframe"] = "trisurf",
resolution: int = 100,
eq_stress: float | None = None,
min_stress: float | None = None,
max_stress: float | None = None,
min_mean_stress: float | None = None,
max_mean_stress: float | None = None,
*,
on: Plottable | None = None,
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 the yield function in 3D.
PARAMETER | DESCRIPTION |
---|---|
type
|
The type of the plot.
TYPE:
|
resolution
|
The resolution of the plot.
TYPE:
|
eq_stress
|
The equivalent stress to plot.
TYPE:
|
min_stress
|
The minimum stress to plot.
TYPE:
|
max_stress
|
The maximum stress to plot.
TYPE:
|
min_mean_stress
|
The minimum mean stress to plot.
TYPE:
|
max_mean_stress
|
The maximum mean stress to plot.
TYPE:
|
on
|
Axes to plot on, by default None
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:
|
props
|
Properties passed to the |
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 |
theta1
theta1(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Angle in Sector I (0, pi/3).
theta2
theta2(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Angle in Sector II (pi/3, 2*pi/3).
theta3
theta3(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray
Angle in Sector III (2*pi/3, pi).