Developer Documentation

The following functions and their docstrings may be helpful for understanding the code, but these may change.

MechanicalMaterialModels.vector_residual!Function
vector_residual!(rf::Function, r_vector::AbstractVector, x_vector::AbstractVector, x)

Makes it easy to construct a mutating vector residual function from a tensor-like equation, r = rf(x) = residual(x, args...), e.g. rf!(r_vector, x_vector) = vector_residual!(z -> residual(z, args...), r_vector, x_vector, x)

The input x and output r of rf should have the same type, RT, and support Tensors.get_base(RT), frommandel(Tensors.get_base(RT), x_vector), and tomandel!(r_vector, r).

The approach was adopted from https://github.com/kimauth/MaterialModels.jl

source
MechanicalMaterialModels.compute_stressFunction
compute_stress(m::AbstractHyperElastic, C::SymmetricTensor)

Compute the 2nd PiolaKirchhoff stress, S = 2 ∂Ψ/∂C, for the potential Ψ defined by m for the Right-Cauchy-Green deformation tensor C

source
MechanicalMaterialModels.compute_tangentFunction
compute_tangent(m::AbstractHyperElastic, C::SymmetricTensor)

Compute the tangent stiffness, ∂S/∂E = 4 ∂²Ψ/∂C², for the potential Ψ defined by m for the Right-Cauchy-Green deformation tensor C.

source
MechanicalMaterialModels.compute_stress_and_tangentFunction
compute_stress_and_tangent(m::AbstractHyperElastic, C::SymmetricTensor)

Compute both the 2nd Piola-Kirchhoff stress, S, and the tangent stiffness, ∂S/∂E = 4 ∂²Ψ/∂C², for the potential Ψ defined by m for the Right-Cauchy-Green deformation tensor C. This is normally more efficient than computing the stress and tangents invidividually.

source