Skip to content

yieldbase

YieldFunction

Bases: YieldFunction, CalibrationABC

Fitness property

Fitness: Type[FitnessBase]

caches class-attribute

caches: Dict[str, LRUCache] = {
    "get": LRUCache(maxsize=128),
    "get_2d_xydata": LRUCache(maxsize=128),
}

default_eq_stress class-attribute instance-attribute

default_eq_stress: float | None = None

default_max_stress class-attribute instance-attribute

default_max_stress: float | None = None

default_min_stress class-attribute instance-attribute

default_min_stress: float | None = None

default_origin class-attribute instance-attribute

default_origin: Tuple[float, float, float] = (0, 0, 0)

default_plane class-attribute instance-attribute

default_plane: Tuple[float, float, float] = (1, 1, 1)

io property

io: Self

loded class-attribute instance-attribute

loded = partialmethod(lode, unit='deg')

loded1 class-attribute instance-attribute

loded1 = partialmethod(lode1, unit='deg')

loded2 class-attribute instance-attribute

loded2 = partialmethod(lode2, unit='deg')

loded3 class-attribute instance-attribute

loded3 = partialmethod(lode3, unit='deg')

origin class-attribute instance-attribute

origin: Tuple[float, float, float] = (0, 0, 0)

parameters property

parameters: List[str]

phid class-attribute instance-attribute

phid = partialmethod(phi, unit='deg')

phid1 class-attribute instance-attribute

phid1 = partialmethod(phi1, unit='deg')

phid2 class-attribute instance-attribute

phid2 = partialmethod(phi2, unit='deg')

phid3 class-attribute instance-attribute

phid3 = partialmethod(phi3, unit='deg')

thetad class-attribute instance-attribute

thetad = partialmethod(theta, unit='deg')

thetad1 class-attribute instance-attribute

thetad1 = partialmethod(theta1, unit='deg')

thetad2 class-attribute instance-attribute

thetad2 = partialmethod(theta2, unit='deg')

thetad3 class-attribute instance-attribute

thetad3 = partialmethod(theta3, unit='deg')

__getitem__

__getitem__(var: str) -> ndarray

__hash__

__hash__() -> int

b

b(**kwargs) -> ndarray

Intermediate principal stress ratio in all sectors.

b1

b1(**kwargs) -> ndarray

Intermediate principal stress ratio in Sector I (0, pi/3).

b2

b2(**kwargs) -> ndarray

Intermediate principal stress ratio in Sector II (pi/3, 2*pi/3).

b3

b3(**kwargs) -> ndarray

Intermediate principal stress ratio in Sector III (2*pi/3, pi).

copy

copy() -> Self

Create a copy of the yield function.

eta

eta(**kwargs) -> ndarray

Critical stress ratio in all sectors.

eta1

eta1(**kwargs) -> ndarray

Critical stress ratio in Sector I (0, pi/3).

eta2

eta2(**kwargs) -> ndarray

Critical stress ratio in Sector II (pi/3, 2*pi/3).

eta3

eta3(**kwargs) -> ndarray

Critical stress ratio in Sector III (2*pi/3, pi).

get

get(var: str, **kwargs) -> ndarray

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: bool DEFAULT: False

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, if a float, normalize by the value corresponding to this angle.

TYPE: (bool, str, float) DEFAULT: True

normalize_x

The angle to normalize the yield function.

TYPE: float DEFAULT: None

resolution

The resolution of the plot.

TYPE: int DEFAULT: 500

min_theta

The minimum angle to plot.

TYPE: float DEFAULT: None

max_theta

The maximum angle to plot.

TYPE: float DEFAULT: None

kwargs

Keyword arguments for 2D project functions.

DEFAULT: {}

RETURNS DESCRIPTION
Tuple[ndarray, ndarray]

The x and y data for plotting the yield function.

get_value

get_value(stress_states)

lode

lode(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray

Lode angle in all sectors.

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).

phi

phi(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray

Friction angle in all sectors.

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.

TYPE: Tuple[float, float, float] DEFAULT: None

origin

The origin of the plane to plot the yield function.

TYPE: Tuple[float, float, float] DEFAULT: None

polar

Whether to plot in polar coordinates.

TYPE: bool DEFAULT: False

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, if a float, normalize by the value corresponding to this angle.

TYPE: (bool, str, float) DEFAULT: True

normalize_x

The angle to normalize the yield function.

TYPE: float DEFAULT: None

resolution

The resolution of the plot.

TYPE: int DEFAULT: 500

eq_stress

The equivalent stress to plot.

TYPE: float DEFAULT: None

min_stress

The minimum stress to plot.

TYPE: float DEFAULT: None

max_stress

The maximum stress to plot.

TYPE: float DEFAULT: None

min_theta

The minimum angle to plot.

TYPE: float DEFAULT: None

max_theta

The maximum angle to plot.

TYPE: float DEFAULT: None

on

Axes to plot on, by default None

TYPE: PlotAxes DEFAULT: None

backend

Backend to use, by default None which means the backend set in the environment variable MICROMECHANICAL_PLOTTING_BACKEND.

TYPE: Literal['matplotlib', 'bokeh'] | str DEFAULT: None

subplots_kwargs

Keyword arguments for creating the subplots, by default None

TYPE: dict DEFAULT: None

props

Properties passed to the setAxesProps method to set the axes properties, by default None

TYPE: Dict[str, Any] DEFAULT: None

bokeh_show

Whether to show the figure in the browser, by default False

TYPE: bool DEFAULT: False

tight_layout

Whether to use tight layout in the matplotlib figure, by default True

TYPE: bool DEFAULT: True

kwargs

Keyword arguments for plt.plot or bplt.line

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: Literal['surface', 'trisurf', 'wireframe'] DEFAULT: 'trisurf'

resolution

The resolution of the plot.

TYPE: int DEFAULT: 100

eq_stress

The equivalent stress to plot.

TYPE: float DEFAULT: None

min_stress

The minimum stress to plot.

TYPE: float DEFAULT: None

max_stress

The maximum stress to plot.

TYPE: float DEFAULT: None

min_mean_stress

The minimum mean stress to plot.

TYPE: float DEFAULT: None

max_mean_stress

The maximum mean stress to plot.

TYPE: float DEFAULT: None

on

Axes to plot on, by default None

TYPE: PlotAxes DEFAULT: None

backend

Backend to use, by default None which means the backend set in the environment variable MICROMECHANICAL_PLOTTING_BACKEND.

TYPE: Literal['matplotlib', 'bokeh'] | str DEFAULT: None

subplots_kwargs

Keyword arguments for creating the subplots, by default None

TYPE: dict DEFAULT: None

props

Properties passed to the setAxesProps method to set the axes properties, by default None

TYPE: Dict[str, Any] DEFAULT: None

bokeh_show

Whether to show the figure in the browser, by default False

TYPE: bool DEFAULT: False

tight_layout

Whether to use tight layout in the matplotlib figure, by default True

TYPE: bool DEFAULT: True

kwargs

Keyword arguments for plt.plot or bplt.line

DEFAULT: {}

RETURNS DESCRIPTION
Figure | GridPlot

The matplotlib figure or bokeh gridplot

theta

theta(*, unit: Literal['deg', 'rad'] = 'rad', **kwargs) -> ndarray

Angle in all sectors.

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"]