Elasticipy.Plasticity module
- class Elasticipy.Plasticity.DruckerPrager(alpha)[source]
Bases:
PlasticityCriterionCreate a Drucker-Prager (DG) plasticity criterion.
- Parameters:
alpha (float) – Pressure dependence parameters (see notes for details)
Notes
The pressure-dependent DG plasticity criterion assumes that the equivalent stress is defined as:
- eq_stress(stress, **kwargs)[source]
Return the equivalent stress, with respect to the plasticity criterion.
- Parameters:
stress (StressTensor) – Stress to compute the equivalent stress from
kwargs (dict) – keyword arguments passed to the function
- Return type:
float or numpy.ndarray
- normal(stress, **kwargs)[source]
Apply the normality rule
- Parameters:
stress (StressTensor) – Stress tensor to apply the normality rule
kwargs (dict) – Keyword arguments passed to the function
- Returns:
Normalized direction of plastic flow
- Return type:
- class Elasticipy.Plasticity.IsotropicHardening(criterion='von Mises')[source]
Bases:
objectTemplate class for isotropic hardening plasticity models
Create an instance of a plastic model, assuming isotropic hardening
- Parameters:
criterion (str or PlasticityCriterion) – Plasticity criterion to use. Can be ‘von Mises’, ‘Tresca’ or ‘J2’. J2 is the same as von Mises.
- apply_strain(strain, **kwargs)[source]
Apply strain to the current JC model.
This function updates the internal variable to store hardening state.
- Parameters:
strain (float or StrainTensor)
kwargs (dict) – Keyword arguments passed to flow_stress()
- Returns:
Associated flow stress (positive)
- Return type:
float
See also
flow_stresscompute the flow stress, given a cumulative equivalent strain
- class Elasticipy.Plasticity.JohnsonCook(A, B, n, C=None, eps_dot_ref=1.0, m=None, T0=25, Tm=None, criterion='von Mises')[source]
Bases:
IsotropicHardeningConstructor for a Jonhson-Cook (JC) model.
The JC model is an exponential-law strain hardening model, which can take into account strain-rate sensibility and temperature-dependence (although they are not mandatory). See notes for details.
- Parameters:
A (float) – Yield stress
B (float) – Work hardening coefficient
n (float) – Work hardening exponent
C (float, optional) – Strain-rate sensitivity coefficient
eps_dot_ref (float, optional) – Reference strain-rate
m (float, optional) – Temperature sensitivity exponent
T0 (float, optional) – Reference temperature
Tm (float, optional) – Melting temperature (at which the flow stress is zero)
criterion (str or PlasticityCriterion, optional) – Plasticity criterion to use. It can be ‘von Mises’ or ‘Tresca’.
Notes
The flow stress (\(\sigma\)) depends on the strain (\(\varepsilon\)), the strain rate \(\dot{\varepsilon}\) and the temperature (\(T\)) so that:
\[\sigma = \left(A + B\varepsilon^n\right) \left(1 + C\log\left(\frac{\varepsilon}{\dot{\varepsilon}_0}\right)\right) \left(1-\theta^m\right)\]with
\[\begin{split}\theta = \begin{cases} \frac{T-T_0}{T_m-T_0} & \text{if } T<T_m\\ 1 & \text{otherwise} \end{cases}\end{split}\]- compute_strain_increment(stress, T=None, apply_strain=True, criterion='von Mises')[source]
Given the equivalent stress, compute the strain increment with respect to the normality rule.
- Parameters:
stress (float or StressTensor) – Equivalent stress to compute the stress from, or full stress tensor.
T (float) – Temperature
apply_strain (bool, optional) – If true, the JC model will be updated to account for the applied strain (hardening)
criterion (str, optional) – Plasticity criterion to consider to compute the equivalent stress and apply the normality rule. It can be ‘von Mises’, ‘Tresca’ or ‘J2’. ‘J2’ is equivalent to ‘von Mises’.
- Returns:
Increment of plastic strain. If the input stress is float, only the magnitude of the increment will be returned (float value). If the stress is of type StressTensor, the returned value will be a full StrainTensor.
- Return type:
StrainTensor or float
See also
apply_strainapply strain to the JC model and updates its hardening value
- flow_stress(eps_p, eps_dot=None, T=None)[source]
Compute the flow stress from the Johnson-Cook model
- Parameters:
eps_p (float or list or tuple or numpy.ndarray) – Equivalent plastic strain
eps_dot (float or list or tuple or numpy.ndarray, optional) – Equivalent plastic strain rate. If float, the strain-rate is supposed to be homogeneous for every value of eps_p.
T (float or list or tuple or np.ndarray) – Temperature. If float, the temperature is supposed to be homogeneous for every value of eps_p.
- Returns:
Flow stress
- Return type:
float or numpy.ndarray
- class Elasticipy.Plasticity.PlasticityCriterion[source]
Bases:
object- static eq_stress(stress, **kwargs)[source]
Return the equivalent stress, with respect to the plasticity criterion.
- Parameters:
stress (StressTensor) – Stress to compute the equivalent stress from
kwargs (dict) – keyword arguments passed to the function
- Return type:
float or numpy.ndarray
- normal(stress, **kwargs)[source]
Apply the normality rule
- Parameters:
stress (StressTensor) – Stress tensor to apply the normality rule
kwargs (dict) – Keyword arguments passed to the function
- Returns:
Normalized direction of plastic flow
- Return type:
- class Elasticipy.Plasticity.TrescaPlasticity[source]
Bases:
PlasticityCriterion- static eq_stress(stress, **kwargs)[source]
Return the equivalent stress, with respect to the plasticity criterion.
- Parameters:
stress (StressTensor) – Stress to compute the equivalent stress from
kwargs (dict) – keyword arguments passed to the function
- Return type:
float or numpy.ndarray
- static normal(stress, **kwargs)[source]
Apply the normality rule
- Parameters:
stress (StressTensor) – Stress tensor to apply the normality rule
kwargs (dict) – Keyword arguments passed to the function
- Returns:
Normalized direction of plastic flow
- Return type:
- class Elasticipy.Plasticity.VonMisesPlasticity[source]
Bases:
PlasticityCriterion- static eq_stress(stress, **kwargs)[source]
Return the equivalent stress, with respect to the plasticity criterion.
- Parameters:
stress (StressTensor) – Stress to compute the equivalent stress from
kwargs (dict) – keyword arguments passed to the function
- Return type:
float or numpy.ndarray
- static normal(stress, **kwargs)[source]
Apply the normality rule
- Parameters:
stress (StressTensor) – Stress tensor to apply the normality rule
kwargs (dict) – Keyword arguments passed to the function
- Returns:
Normalized direction of plastic flow
- Return type: