jaxmat.state module#

class AbstractState[source]#

Bases: Module

Abstract base class representing mechanical states.

add(**changes)[source]#

Utility method to add values such as new_state = state.add(stress=dsig).

update(**changes)[source]#

Utility method to update values such as new_state = state.update(stress=sig).

class SmallStrainState[source]#

Bases: AbstractState

State representation for small-strain behaviors.

This class stores the current strain \(\beps\) and stress \(\bsig\) tensors under the assumption of infinitesimal (small) deformations. It also supports internal state variables such as plastic strain, damage, or other material history quantities through the internal attribute.

internal#

Nested state object representing internal variables (e.g., plastic strain, hardening variables, etc.). Defaults to None.

Type:

AbstractState, optional

strain#

Symmetric second-order strain tensor \(\beps\) (small-strain assumption).

Type:

SymmetricTensor2

stress#

Symmetric second-order Cauchy stress tensor \(\bsig\).

Type:

SymmetricTensor2

Notes

epsSymmetricTensor2

Alias for strain, allows accessing via state.eps.

sigSymmetricTensor2

Alias for stress, allows accessing via state.sig.

internal: AbstractState = None#
strain: SymmetricTensor2 = SymmetricTensor2(dim=3, rank=2, _tensor=f64[3,3])#
stress: SymmetricTensor2 = SymmetricTensor2(dim=3, rank=2, _tensor=f64[3,3])#
property eps#

Alias for strain.

property sig#

Alias for stress.

PK1_to_PK2(F, PK1)[source]#

Convert the first Piola-Kirchhoff stress tensor (PK1) to the second Piola-Kirchhoff stress tensor (PK2). Enforce symmetry explicitly.

PK1_to_Cauchy(F, PK1)[source]#

Convert the first Piola-Kirchhoff stress tensor (PK1) to the Cauchy stress tensor. Enforce symmetry explicitly.

class FiniteStrainState[source]#

Bases: AbstractState

State representation for finite-strain continuum mechanics.

This class encapsulates the deformation gradient \(\bF\) (F) and first Piola-Kirchhoff stress \(\bP\) (PK1), along with optional internal variables. It provides convenience properties for converting between common stress measures: second Piola-Kirchhoff \(\bS\) (PK2) and Cauchy \(\bsig\) (sig) stresses.

internal#

Nested internal state representing material history or additional constitutive information. Defaults to None.

Type:

AbstractState, optional

strain#

Deformation gradient \(\bF\). Initialized as the identity tensor.

Type:

Tensor2

stress#

First Piola-Kirchhoff stress tensor \(\bP\).

Type:

Tensor2

Notes

FTensor2

Alias for deformation gradient.

PK1Tensor2

Alias for first Piola-Kirchhoff stress tensor.

PK2SymmetricTensor2

Second Piola-Kirchhoff stress tensor \(\bS\), computed via PK1_to_PK2().

sigSymmetricTensor2

Cauchy stress tensor \(\bsig\), computed via PK1_to_Cauchy().

CauchySymmetricTensor2

Alias for sig.

internal: AbstractState = None#
strain: Tensor2 = Tensor2(dim=3, rank=2, _tensor=f64[3,3])#
stress: Tensor2 = Tensor2(dim=3, rank=2, _tensor=f64[3,3])#
property F#
property PK1#
property PK2#
property sig#
property Cauchy#
make_batched(module, Nbatch)[source]#

Broadcasts all leaf arrays of a single unbatched module into a batched version.

Parameters:
  • module (Module) – An instance of an equinox Module (e.g., State) with array leaves.

  • Nbatch (int) – The number of batch items to broadcast.

Return type:

Module

Returns:

A new instance of the same class, with each array field having shape (Nbatch, …).