Differentation of a material

MaterialModelsBase.MaterialDerivativesType
MaterialDerivatives(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
source
MaterialModelsBase.allocate_differentiation_outputFunction
allocate_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.

source
MaterialModelsBase.differentiate_material!Function
differentiate_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.

source