Differentation of a material
MaterialModelsBase.MaterialDerivatives
— TypeMaterialDerivatives(m::AbstractMaterial)
A struct that saves all derivative information using a Matrix{T}
for each derivative, where T=get_params_eltype(m)
. The dimensions are obtained from get_num_tensorcomponents
, get_num_statevars
, and get_num_params
. The values should be updated in differentiate_material!
by direct access of the fields, where σ
is the stress, ϵ
the strain, s
and ⁿs
are the current and old state variables, and p
the material parameter vector.
dσdϵ
dσdⁿs
dσdp
dsdϵ
dsdⁿs
dsdp
MaterialModelsBase.allocate_differentiation_output
— Functionallocate_differentiation_output(::AbstractMaterial)
When calculating the derivatives of a material, it can often be advantageous to have additional information from the solution procedure inside material_response
. This can be obtained via an AbstractExtraOutput
, and allocate_differentiation_output
provides a standard function name for what extra_output::AbstractExtraOutput
that should be allocated in such cases.
Defaults to an NoExtraOutput
if not overloaded.
MaterialModelsBase.differentiate_material!
— Functiondifferentiate_material!(
diff::MaterialDerivatives,
m::AbstractMaterial,
ϵ::Union{SecondOrderTensor, Vec},
old::AbstractMaterialState,
Δt,
cache::AbstractMaterialCache
extra::AbstractExtraOutput
dσdϵ::AbstractTensor,
)
Calculate the derivatives and save them in diff
, see MaterialDerivatives
for a description of the fields in diff
.