yieldbase
YieldFunction
Bases: YieldFunction, CalibrationABC
caches
class-attribute
caches: Dict[str, LRUCache] = {
"get": cachetools.LRUCache(maxsize=128),
"get_2d_xydata": cachetools.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
TYPE:
|
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
Lode angle in Sector I (0, pi/3).
lode2
Lode angle in Sector II (pi/3, 2*pi/3).
lode3
Lode angle in Sector III (2*pi/3, pi).
phi1
Friction angle in Sector I (0, pi/3).
phi2
Friction angle in Sector II (pi/3, 2*pi/3).
phi3
Friction angle in Sector III (2*pi/3, pi).
plot2d
plot2d(
plane: Tuple[float, float, float] | None = None,
origin: Tuple[float, float, float] | None = 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,
fill_color: str | None = None,
fill_kwargs: Dict | None = None,
**kwargs
) -> Union["MplFigure", "BkGridPlot"]
Plot the yield function in 2D.
| PARAMETER | DESCRIPTION |
|---|---|
plane
|
The direction of the plane to plot the yield function.
TYPE:
|
origin
|
The origin of the plane to plot the yield function.
TYPE:
|
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
TYPE:
|
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
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:
|
fill_color
|
Fill color
TYPE:
|
fill_kwargs
|
Keyword arguments for the fill
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
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 |
theta1
Angle in Sector I (0, pi/3).
theta2
Angle in Sector II (pi/3, 2*pi/3).