jaxmat.materials.behavior module#

class AbstractBehavior[source]#

Bases: Module

Abstract base class describing a mechanical behavior.

internal: AbstractVar[AbstractState]#

Internal variables state.

solver: AbstractRootFinder = Newton(rtol=1e-08, atol=1e-08, linear_solver=AutoLinearSolver(well_posed=False))#

Implicit solver.

adjoint: AbstractAdjoint = ImplicitAdjoint(linear_solver=AutoLinearSolver(well_posed=False))#

Adjoint solver.

abstractmethod constitutive_update(inputs, state, dt)[source]#
batched_constitutive_update(inputs, state, dt)[source]#

Batched and jitted version of constitutive update along first axis of inputs and state.

class SmallStrainBehavior[source]#

Bases: AbstractBehavior

Abstract small strain behavior.

init_state(Nbatch=None)[source]#

Initialize the mechanical small strain state.

abstractmethod constitutive_update(eps, state, dt)[source]#

Perform the constitutive update for a given small strain increment for a small-strain behavior.

This abstract method defines the interface for advancing the material state over a time increment based on the provided strain tensor. Implementations should return the updated stress tensor and internal variables, along with any auxiliary information required for consistent tangent computation or subsequent analysis.

Parameters:
  • eps (array_like) – Small strain tensor at the current integration point.

  • state (PyTree) – PyTree containing the current state variables (stress, strain and internal) of the material.

  • dt (float) – Time increment over which the update is performed.

Returns:

  • stress (array_like) – Updated Cauchy stress tensor.

  • new_state (PyTree) – Updated state variables after the constitutive update.

Notes

This method should be implemented by subclasses defining specific constitutive behaviors (elastic, plastic, viscoplastic, etc.).

class FiniteStrainBehavior[source]#

Bases: AbstractBehavior

Abstract finite strain behavior.

init_state(Nbatch=None)[source]#

Initialize the mechanical finite strain state.

abstractmethod constitutive_update(F, state, dt)[source]#

Perform the constitutive update for a given deformation gradient increment for a finite-strain behavior.

This abstract method defines the interface for advancing the material state over a time increment based on the provided strain tensor. Implementations should return the updated stress tensor and internal variables, along with any auxiliary information required for consistent tangent computation or subsequent analysis.

Parameters:
  • F (array_like) – Deformation gradient tensor at the current integration point.

  • state (PyTree) – PyTree containing the current state variables (stress, strain and internal) of the material.

  • dt (float) – Time increment over which the update is performed.

Returns:

  • PK1 (array_like) – Updated first Piola-Kirchhoff stress tensor.

  • new_state (PyTree) – Updated state variables after the constitutive update.

Notes

This method should be implemented by subclasses defining specific constitutive behaviors (elastic, plastic, viscoplastic, etc.).