Expand description
Evaluate MFront material behaviours (constitutive laws) at a material point, from Rust.
MFront compiles material behaviours (elasticity, plasticity, creep, …) into
shared libraries. For behaviours generated with MFront’s generic
interface (mfront --obuild --interface=generic Norton.mfront), this crate
loads the library, reads the description the behaviour exports (gradients,
material properties, internal state variables, …) and integrates it at one
material point. It talks to the library directly, in pure Rust: no C or C++
build dependency.
The data of an integration follow MGIS’s layout, that of the function
MFront generates: a BehaviourData, as MGIS’s BehaviourDataView, holds
the time step, the tangent operator and the two states, InitialState
and FinalState, and Behaviour::integrate computes what the
IntegrationOptions ask. The arrays of a material point are
borrowed from the caller, who can keep the values of all its points in
contiguous storage. Symmetric tensors are stored in
TFEL’s convention: xx, yy, zz, √2·xy, √2·xz, √2·yz; the
voigt module converts them, and the tangent operator, to and from the
standard Voigt notation.
Only loading is unsafe, because opening a library runs its code: once
Behaviour::load has checked what the library declares, integrating is
safe. Loading is also when the parameters and the out of bounds policy,
static variables of the library, are set: see Settings.
Point-wise models (@DSL DefaultModel, …) are loaded and integrated like
behaviours, as Behaviour: they have no gradient, their outputs are
internal state variables and their inputs external state variables. The
material properties (@DSL MaterialLaw) are evaluated by
MaterialProperty.
Finite strain behaviours (@DSL DefaultFiniteStrain, or a strain measure
such as @StrainMeasure Hencky) take the deformation gradient, an
unsymmetric tensor, and compute the stress measure and the tangent operator
Settings chooses: StressMeasure, FiniteStrainTangentOperator.
An orthotropic behaviour integrates in its material frame: its gradients
are rotated to it, its thermodynamic forces and tangent operator back to
the global frame, by Behaviour::rotate, with a Rotation.
A cohesive zone model takes the opening displacement and computes the
cohesive force, two vectors whose first component is normal to the
interface. Description::behaviour_type tells the kinds apart.
Status: small strain, finite strain and general behaviours, cohesive zone models, isotropic or orthotropic, point-wise models and material properties, generated by TFEL 5.1.0 or later.
Modules§
- voigt
- Conversions between TFEL’s storage of symmetric tensors and the standard Voigt notation. Nothing here allocates.
Structs§
- Behaviour
- A behaviour loaded from a library generated by MFront with the
genericinterface, for one modelling hypothesis. - Behaviour
Data - The data of an integration at one material point, borrowed from the
caller, as MGIS’s
BehaviourDataView:Behaviour::integratereads them and writes the results in place. - Bounds
- The bounds of a variable, as MFront’s
@Boundsand@PhysicalBoundsgive them, both included:Nonefor no bound on that side. - Description
- What the behaviour declares about itself, read from the library by
Behaviour::load. - Evaluation
- A value computed by
MaterialProperty::evaluate. - Final
State - The state at the end of the time step, borrowed from the caller, as
MGIS’s
StateView: the caller gives the gradients, the mass density, the material properties and the external state variables, the behaviour writes the thermodynamic forces, the internal state variables and the energies it computes (Description::computes_stored_energy). - Initial
State - The state at the beginning of the time step, borrowed from the caller, as
MGIS’s
InitialStateView. - Integration
Options - The options of an integration, as MGIS’s
BehaviourIntegrationOptions. - Material
Property - A material property loaded from a library generated by MFront with the
genericinterface. - Material
Property Description - What a material property declares about itself, read from the library by
MaterialProperty::load. - Parameter
- A parameter of the behaviour: a value fixed in the library, which
Settingscan change at load. - Rotation
- A rotation matrix R whose columns are the axes of the material frame,
expressed in the global frame: the components of a symmetric tensor T in
the material frame are those of Rᵀ·T·R, as for MTest’s
@RotationMatrix. - Settings
- What
Behaviour::loadchanges in the library: the values of parameters, and the out of bounds policy; and, for a finite strain behaviour, the stress and the tangent operator to compute. - Variable
- A variable of the behaviour, and where its components sit in the array that holds it.
- Variables
- The variables stored one after the other in one array (gradients, material properties, internal state variables, …).
Enums§
- Behaviour
Type - The kind of behaviour, which fixes what its gradients and thermodynamic forces are.
- Error
- Everything that can go wrong when loading a behaviour, a model or a
material property, and when integrating or evaluating it.
nameis the name of the behaviour, model or material property. - Finite
Strain Tangent Operator - The tangent operator a finite strain behaviour computes.
- Frame
- The frame
crate::Behaviour::rotaterotates values to. - Hypothesis
- A modelling hypothesis of MFront.
- Integration
Type - What an integration computes, as MGIS’s
IntegrationType, the code the behaviour reads inK[0]. - Kinematic
- The kinematic of a behaviour, as MFront declares it (
_BehaviourKinematic). - OutOf
Bounds Policy - What a behaviour or material property does when a variable leaves the bounds its author gave. Physical bounds are always enforced.
- Parameter
Value - The value of a parameter, of one of the three types MFront supports.
- Rotated
- What
crate::Behaviour::rotaterotates. - Status
- How a successful integration went, as the value MGIS’s
integratereturns, its failure being anError::IntegrationFailed. - Stress
Measure - The stress a finite strain behaviour computes, in the thermodynamic forces.
- Symmetry
- The material symmetry of the behaviour.
- Variable
Type - The kind of a variable. With the hypothesis, it fixes the number of components of the variable.