Utility functions
In the course of defining the material behavior, a set of functions that may be useful outside the package internals are documented here, but these are not exported.
MechanicalMaterialModels.vonmises
— Functionfunction vonmises(σ::SecondOrderTensor{3})
Calculate the von Mises effective stress for a 2nd order tensor
MechanicalMaterialModels.vonmises_and_gradient
— Functionfunction vonmises_and_gradient(σ::SecondOrderTensor{3})
Calculate the von Mises effective stress for a 2nd order tensor as well as the gradient, ν
MechanicalMaterialModels.macaulay
— Functionfunction macaulay(x)
Calculate the macaulay bracket of x, $\langle x \rangle$
\[\langle x \rangle = \left\lbrace \begin{matrix} 0 & x\leq 0 \\ x & x>0 \end{matrix} \right .\]
MechanicalMaterialModels.convert_hooke_param
— Functionconvert_hooke_param(T::Symbol; p1, p2)
Convert the hooke (isotropic) parameters p1
and p2
to the parameter with symbol T
, e.g. G = convert_hooke_param(:G; E = 210e3, ν = 0.3)
Material wrappers
MechanicalMaterialModels.RotatedMaterial
— TypeRotatedMaterial(m::AbstractMaterial, r::Vec) <: AbstractMaterial
A rotated material is wrapper around m
, such that the material response is evaluated in a local coordinate system defined by the Rodrigues rotation vector, r
. Specifically, the input strain is first rotated by θ = -|r|
(radians) around r
before calling material_response
with m
. The resulting stress and stiffness are rotated back, θ = +|r|
around r
, before they are returned.
This is equivalent to rotating the material parameter tensors (e.g. stiffness tensor θ = +|r|
around r
).
!!! note State variables are in the local coordinate system The state variables are not modified, and are hence defined in the local coordinate system. Care must therefore be taken to rotate the strain to the local coordinates when evaluating the responses, and the output of those evaluations should be rotated back to the global coordinates.