hookeai.simulators.fetorch.material.models.vmap.drucker_prager¶
Drucker-Prager elasto-plastic constitutive model with isotropic hardening.
This module includes the implementation of the Drucker-Prager constitutive model with non-associative plastic flor rule and associative isotropic strain hardening.
This implementation is made compatible with the use of PyTorch vectorizing maps that, at the current moment, do not support auto differentiable data-dependent control flows based on if statements or similar constructs (e.g., torch.cond()). Workarounds based on torch.where() were successfully implemented, but these lead to complex or inefficient coding, mainly because they are constrained by elementwise operations (require pre-computations of true and false paths or repeated true/false function calls for each element).
When torch.cond() is available, the state_update() method can be simplified as follows:
The condition in torch.cond() does not need to be a Tensor with the same shape as the true/false output tensors
Avoid flow vector pre-computations - only perform the needed step computation based on torch.cond()
Avoid elastic and plastic steps pre-computations - only perform the needed step computation based on torch.cond() condition
The is_elastic_step flag is no longer required in _plastic_step() nor in _plastic_step_apex()
Avoid elastic and plastic consistent tangent moduli pre-computations - only compute the required tangent based on torch.cond() condition
Classes¶
- DruckerPragerVMAP
Drucker-Prager constitutive model with isotropic strain hardening.
Functions
|
Convert all floating point torch tensors in dictionary to torch.float32. |
|
Convert all floating point torch tensors in dictionary to torch.float64. |
|
Convert all int, float and bool in dictionary to torch.Tensor. |
|
Convert floating point torch tensor to torch.float32. |
|
Convert floating point torch tensor to torch.float64. |
|
|
|
Set common second- and fourth-order identity operators. |
|
Get parameters dependent on the problem type. |
|
Build 2D counterpart of 3D second- or fourth-order tensor. |
|
Build 3D counterpart of 2D second-order tensor. |
|
Recover tensor from associated matricial form. |
|
Get tensor matricial form. |
Classes
|
Material constitutive model interface. |
|
Drucker-Prager constitutive model with isotropic strain hardening. |
|
Linear elastic constitutive model. |