pyoptmat.hardening: inelastic flow hardening models for structural materials

Modules defining isotropic and kinematic hardening models.

These models provide:

  1. A set of internal variables

  2. The evolution equations defining each of those variables

  3. A map between the internal variables and the actual value of isotropic/kinematic hardening used in the pyoptmat.flowrules.FlowRule

  4. The derivative of that map with respect to the internal variables

class pyoptmat.hardening.ChabocheHardeningModel(C, g)

Bases: KinematicHardeningModel

Chaboche kinematic hardening, as defined in [CN89]

This version does not include static recovery

The model maintains \(n\) backstresses and sums them to provide the total kinematic hardening

\[\sigma_{kin}=\sum_{i=1}^{n_{kin}}x_{i}\]

Each individual backstress evolves per the Frederick-Armstrong model

\[\dot{x}_{i}=\frac{2}{3}C_{i}\dot{\varepsilon}_{in}-g_{i}x_{i}\left|\dot{\varepsilon}_{in}\right|\]
Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the kinematic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

Number of history variables, equal to the number of backstresses

value(h)

Map from the vector of internal variables to the kinematic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the kinematic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.ChabocheHardeningModelRecovery(C, g, b, r)

Bases: KinematicHardeningModel

Chaboche kinematic hardening, as defined in [CN89]

This version does include static recovery

The model maintains \(n\) backstresses and sums them to provide the total kinematic hardening

\[\sigma_{kin}=\sum_{i=1}^{n_{kin}}x_{i}\]

Each individual backstress evolves per the Frederick-Armstrong model

\[\dot{x}_{i}=\frac{2}{3}C_{i}\dot{\varepsilon}_{in}-g_{i}x_{i}\left|\dot{\varepsilon}_{in}\right| - b\left| h \right|^{r-1} h\]
\[\sigma_{kin}=\sum_{i=1}^{n_{kin}}x_{i}\]
Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the kinematic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

Number of history variables, equal to the number of backstresses

value(h)

Map from the vector of internal variables to the kinematic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the kinematic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.FAKinematicHardeningModel(C, g, b=None, r=None)

Bases: KinematicHardeningModel

Frederick and Armstrong hardening, as defined in [FA07]

The kinematic hardening is equal to the single internal variable.

The variable evolves as:

\[\dot{x}=\frac{2}{3}C\dot{\varepsilon}_{in}-gx\left|\dot{\varepsilon}_{in}\right| - b\left| h \right|^{r-1} h\]

where the static recovery defaults to zero

Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the kinematic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

The number of internal variables, here just 1

value(h)

Map from the vector of internal variables to the kinematic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the kinematic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.FAKinematicHardeningModelNoRecovery(C, g)

Bases: KinematicHardeningModel

Frederick and Armstrong hardening, as defined in [FA07]

The kinematic hardening is equal to the single internal variable.

The variable evolves as:

\[\dot{x}=\frac{2}{3}C\dot{\varepsilon}_{in}-gx\left|\dot{\varepsilon}_{in}\right|\]
Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the kinematic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

The number of internal variables, here just 1

value(h)

Map from the vector of internal variables to the kinematic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the kinematic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.HardeningModel

Bases: Module

Superclass for all hardening models. Right now this does nothing, but could be a basis for future expansion.

dhistory_rate_dtotalrate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the total strain rate

This will be zero in most models

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the total rate

Return type:

torch.tensor

class pyoptmat.hardening.IsotropicHardeningModel

Bases: HardeningModel

Superclass for all isotropic hardening models. Right now this does nothing but is here in case we need it in the future.

class pyoptmat.hardening.KinematicHardeningModel

Bases: HardeningModel

Common superclass for kinematic hardening models

Right now this does nothing, but it’s available for future expansion

class pyoptmat.hardening.NoKinematicHardeningModel

Bases: KinematicHardeningModel

The simplest kinematic hardening model: a constant value of 0

dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate.

Here this is an empty vector.

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the history

Here this is an empty vector.

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of the history rate with respect to the stress.

Here this is an empty vector.

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dvalue(h)

Derivative of the map to the kinematic hardening with respect to the vector of internal variables

Parameters:

h – vector of internal variables

history_rate(s, h, t, ep, T, e)

The history evolution rate. Here this is an empty vector.

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – the temperature

  • e (torch.tensor) – total strain rate

property nhist

The number of internal variables, here 0

value(h)

The map between the vector of internal variables and the kinematic hardening

Parameters:

h – vector of internal variables

class pyoptmat.hardening.SuperimposedKinematicHardening(models)

Bases: KinematicHardeningModel

Sum the contributions of several kinematic hardening models

Parameters:

models (list of models) – list of KinematicHardening models

dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dhistory_rate_dtotalrate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the total strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the total rate

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the kinematic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

Number of history variables

value(h)

Map from the vector of internal variables to the kinematic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the kinematic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.Theta0RecoveryVoceIsotropicHardeningModel(tau, theta, R0, r1, r2)

Bases: IsotropicHardeningModel

Voce isotropic hardening with static recovery, defined by

\[ \begin{align}\begin{aligned}\sigma_{iso} = h\\\dot{h} = \theta_0 \left(1-\frac{h}{\tau}\right) \left|\dot{\varepsilon}_{in}\right| + r_1 \left(R_0 - h\right) \left| R_0 - h \right|^{r_2 - 1}\end{aligned}\end{align} \]
Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – temperature

  • e (torch.tensor) – total strain rate

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h – the vector of internal variables for this model

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s – stress

  • h – history

  • t – time

  • ep – the inelastic strain rate

  • T – the temperature

  • e (torch.tensor) – total strain rate

property nhist

here just 1

Type:

The number of internal variables

value(h)

Map from the vector of internal variables to the isotropic hardening value

Parameters:

h – the vector of internal variables for this model

class pyoptmat.hardening.Theta0VoceIsotropicHardeningModel(tau, theta)

Bases: IsotropicHardeningModel

Reparameterized Voce isotropic hardening, defined by

\[ \begin{align}\begin{aligned}\sigma_{iso} = h\\\dot{h} = \theta_0 (1-h/\tau) \left|\dot{\varepsilon}_{in}\right|\end{aligned}\end{align} \]

This gives the same response as pyoptmat.hardening.VoceIsotropicHardeningModel it just uses a different definition of the parameters

Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Map from the vector of internal variables to the isotropic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the isotropic hardening value

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

here just 1

Type:

The number of internal variables

value(h)

Map from the vector of internal variables to the isotropic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the isotropic hardening value

Return type:

torch.tensor

class pyoptmat.hardening.VoceIsotropicHardeningModel(R, d)

Bases: IsotropicHardeningModel

Voce isotropic hardening, defined by

\[ \begin{align}\begin{aligned}\sigma_{iso} = h\\\dot{h} = d (R - h) \left|\dot{\varepsilon}_{in}\right|\end{aligned}\end{align} \]
Parameters:
dhistory_rate_derate(s, h, t, ep, T, e)

The derivative of the history rate with respect to the inelastic strain rate

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to the inelastic rate

Return type:

torch.tensor

dhistory_rate_dhistory(s, h, t, ep, T, e)

The derivative of the history rate with respect to the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to history

Return type:

torch.tensor

dhistory_rate_dstress(s, h, t, ep, T, e)

The derivative of this history rate with respect to the stress

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

derivative with respect to stress

Return type:

torch.tensor

dvalue(h)

Derivative of the map with respect to the internal variables

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the derivative of the isotropic hardening value

with respect to the internal variables

Return type:

torch.tensor

history_rate(s, h, t, ep, T, e)

The rate evolving the internal variables

Parameters:
  • s (torch.tensor) – stress

  • h (torch.tensor) – history

  • t (torch.tensor) – time

  • ep (torch.tensor) – the inelastic strain rate

  • T (torch.tensor) – the temperature

  • e (torch.tensor) – total strain rate

Returns:

internal variable rate

Return type:

torch.tensor

property nhist

here just 1

Type:

The number of internal variables

value(h)

Map from the vector of internal variables to the isotropic hardening value

Parameters:

h (torch.tensor) – the vector of internal variables for this model

Returns:

the isotropic hardening value

Return type:

torch.tensor