statevariable
StateVariable
cscalars
instance-attribute
cscalars: Dict[str, VectorXf]
custom scalar fields for contacts, a 1D numpy array of size (size,) is expected for each contact
cvectors
instance-attribute
cvectors: Dict[str, MatrixXf]
custom vector fields for contacts, a 2D numpy array of size (size, ...) is expected for each contact
__init__
Constructor of the state variable
| PARAMETER | DESCRIPTION |
|---|---|
size
|
Size of the integration points
TYPE:
|
initialize_arrays
|
Whether to initialize numpy arrays, by default True, if False, the numpy arrays are empty
TYPE:
|
addStrain
Add strain increment and update void ratio
| PARAMETER | DESCRIPTION |
|---|---|
deps
|
Strain increment, shape (6,)
TYPE:
|
update_void_ratio
|
Whether to update void ratio, by default True
TYPE:
|
copyContactStateVariables
copyContactStateVariables(
from_idx: int,
to_idx: int,
symmetric: bool = False,
cscalars: List[str] = None,
cvectors: List[str] = None,
)
Copy the contact state variables from one integration point to another
| PARAMETER | DESCRIPTION |
|---|---|
from_idx
|
Index of the integration point to copy from
TYPE:
|
to_idx
|
Index of the integration point to copy to
TYPE:
|
symmetric
|
Whether to revert the symmetric contact state variables, by default False
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
copyFrom
copyFrom(sv: StateVariable)
Copy state variables from another
| PARAMETER | DESCRIPTION |
|---|---|
sv
|
State variable to copy from
TYPE:
|
elasticStiffnessMatrix
Elastic stiffness matrix, shape (3, 3)
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Elastic stiffness matrix |
fnci
Normal force with minimum cohesion at the integration point with index idx
fsi
Shear force at the first direction at the integration point with index idx
fti
Shear force at the second direction at the integration point with index idx
hash
hash(
dfi: ndarray,
dui: ndarray,
idx: int,
precision: int = 15,
symmetric: bool = False,
cscalars: List[str] = None,
cvectors: List[str] = None,
) -> int
Hash the contact state variables at the integration point with index idx
| PARAMETER | DESCRIPTION |
|---|---|
dfi
|
Contact force increment
TYPE:
|
dui
|
Contact displacement increment
TYPE:
|
idx
|
Index of the integration point
TYPE:
|
precision
|
Precision of the hash value, by default 15
TYPE:
|
symmetric
|
Whether to revert the symmetric contact state variables, by default False
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
Hash value |
nsti
Direction of the shear force in two dimensions with index idx, shape (2,)
revertSymmetricContactStateVariables
revertSymmetricContactStateVariables(
idx: int, cscalars: List[str] = None, cvectors: List[str] = None
)
Revert contact force, displacement and specified custom variables by multiplying them with -1
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Index of the integration point
TYPE:
|
cscalars
|
Custom scalar fields to be multiplied by -1, by default None
TYPE:
|
cvectors
|
Custom vector fields to be multiplied by -1, by default None
TYPE:
|
setStrain
Set strain and update void ratio
| PARAMETER | DESCRIPTION |
|---|---|
eps
|
Strain, shape (6,)
TYPE:
|
update_void_ratio
|
Whether to update void ratio, by default True
TYPE:
|
ups
Shear plastic displacement at the first direction for every integration point, shape (size,)
upsi
Shear plastic displacement at the first direction at the integration point with index idx
upsti
Shear plastic displacement at the integration point with index idx, shape (2,)
upt
Shear plastic displacement at the second direction for every integration point, shape (size,)
upti
Shear plastic displacement at the second direction at the integration point with index idx
us
Shear displacement at the first direction for every integration point, shape (size,)
usi
Shear displacement at the first direction at the integration point with index idx
usti
Shear displacement at the integration point with index idx, shape (2,)
ut
Shear displacement at the second direction for every integration point, shape (size,)