experiment
Experiment
Bases: HashableBaseModelIO
An experiment.
caches
class-attribute
caches: Dict[str, LRUCache] = {
"getitem": LRUCache(maxsize=128),
"__getitem__": LRUCache(maxsize=128),
}
caches for the getitem and getitem methods
data_multipliers
class-attribute
instance-attribute
Multipliers for the data, used to scale the data in the experiment
lines
class-attribute
instance-attribute
list of lines in the experiment
notes
class-attribute
instance-attribute
custom notes for the experiment, only for labelling purposes and not used in the calculation
options
class-attribute
instance-attribute
options for the micromechanical-specific model, used in :meth:micromechanical.Model.setOptions
to set the
calculation options for the model
phases
class-attribute
instance-attribute
phases: Dict[str, LoadPhaseIO] = {}
load phases of the experiment
__contains__
__getitem__
addConfinementPhase
addConfinementPhase(epsa_max: float, steps: int) -> LoadPhaseIO
Add a confinement load phase.
PARAMETER | DESCRIPTION |
---|---|
steps
|
Number of steps.
TYPE:
|
epsa_max
|
Maximum strain.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
addDrainedTriaxialPhase
addDrainedTriaxialPhase(
sigc: float, epsa_max: float, steps: int
) -> LoadPhaseIO
Add a drained triaxial load phase.
PARAMETER | DESCRIPTION |
---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
epsa_max
|
Maximum strain.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
addIsotropicPhase
addIsotropicPhase(sigc: float, steps: int) -> LoadPhaseIO
Add an isotropic load phase.
PARAMETER | DESCRIPTION |
---|---|
steps
|
Number of steps.
TYPE:
|
sigc
|
Confined stress.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
addLoadPhase
addLoadPhase(name: str, phase: LoadPhaseIO | LoadPhase) -> LoadPhaseIO
Add a load phase.
PARAMETER | DESCRIPTION |
---|---|
name
|
Name of the load phase.
TYPE:
|
phase
|
The load phase, if not an instance of
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
addTrueTriaxialPhase
addTrueTriaxialPhase(
sig3: float, b: float, epsa_max: float, steps: int
) -> LoadPhaseIO
addTrueTriaxialWithConstantShearPhase
addTrueTriaxialWithConstantShearPhase(
p: float, b: float, steps: int
) -> LoadPhaseIO
addUndrainedTriaxialPhase
addUndrainedTriaxialPhase(epsa_max: float, steps: int) -> LoadPhaseIO
Add an undrained triaxial load phase.
PARAMETER | DESCRIPTION |
---|---|
steps
|
Number of steps.
TYPE:
|
epsa_max
|
Maximum strain.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
addUndrainedTriaxialWithoutShearPhase
addUndrainedTriaxialWithoutShearPhase(
epsa_max: float, steps: int
) -> LoadPhaseIO
Add an undrained triaxial load phase without controlling the shear strain.
PARAMETER | DESCRIPTION |
---|---|
steps
|
Number of steps.
TYPE:
|
epsa_max
|
Maximum strain.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
LoadPhaseIO
|
The load phase. |
check
Check whether the experiment is valid.
PARAMETER | DESCRIPTION |
---|---|
raise_
|
Whether to raise an error if the experiment is invalid, by default True
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool | None
|
True if the experiment is valid, False if the experiment is invalid, None if the experiment is not checked. |
get
get(
x: str,
y: str | None = None,
*,
deep: bool = False,
idx: int | Iterable[int] | slice = None
) -> Tuple[ndarray, ndarray] | ndarray
Return the x-axis and y-axis data of a line.
PARAMETER | DESCRIPTION |
---|---|
x
|
Name of the x-axis of the line.
TYPE:
|
y
|
Name of the y-axis of the line. If None, only the x-axis data will be returned.
TYPE:
|
deep
|
Search for the line deeply in the experiment, by default False to avoid RecursionError.
TYPE:
|
idx
|
Index of the data to be returned, by default None to return all data. |
RETURNS | DESCRIPTION |
---|---|
Tuple[ndarray, ndarray] | ndarray
|
The x-axis and y-axis data of the line, or only the x-axis data if y is None. |
getitem
Return the x-axis and y-axis data of a line, only for exactly matching lines or expressions that can be evaluated to the x-axis and y-axis names.
PARAMETER | DESCRIPTION |
---|---|
item
|
Names of the x-axis and y-axis of the line. |
RETURNS | DESCRIPTION |
---|---|
Tuple[ndarray, ndarray]
|
The x-axis and y-axis data of the line. |
Line
Bases: HashableBaseModelIO
A line for an experiment.
x
instance-attribute
x: str
x-axis name of the line, used in :meth:micromechanical.python.micromechanical.core.StateVariables.get
to get
the x-axis data
y
instance-attribute
y: str
y-axis name of the line, used in :meth:micromechanical.python.micromechanical.core.StateVariables.get
to get
the y-axis data
LoadPhaseIO
Bases: HashableBaseModelIO
A load phase for an experiment.
control
instance-attribute
Control type of the load increment, 0 for stress control, 1 for strain control