yieldbase
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).
_figure_postprocess
_figure_postprocess(
axes: AxesType | List[AxesType] | List[List[AxesType | None]],
*,
backend: Literal["matplotlib", "bokeh"] | str | None = None,
tight_layout: bool = True,
ncols: int = 2,
props: Dict[str, Any] | None = None,
bokeh_show: bool = False
) -> Union["MplFigure", "BkGridPlot"]