Material Routines
This section covers all details about the material routine implementation, which is invoked by the finite element newton iteration with the deformation gradient F and a given materialtype defined in simulation_params in the solve function of the package.
A few general words on this:
- I utilized multiple dispatch, i.e. a function dispatches depending on all arguments of the function, therefore we have one common interface
constitutive_driver constitutive_drivercan be extended by your own by adding a material struct, such asDamageStateorFiberDamageStateand creating a function that dispatches as followconstitutive_driver(F, materialstruct::newmaterial)- Therefore, it should be clear that the combination of a material struct and a dispatched
constitutive_driverfor this struct is per definition the extension for a new material - Another interface constraint is
update_materialstate!(material::newmaterial)which is invoked after the FE Newton. It is used to set history dependent variables. - In order to extend
FiberDamageStateand/orDamageStateby its base material a new structs in the fashion ofNeoHookeandStVenantKirchhoffneeds to be added. - Additionally, based on this new type a function
Ψneeds to dispatch. This function is invoked whenever derivatives of the effective energy are required.
In the following section we'll discuss Structs and Functions seperately.
ConvexDamage.DamageConvexDamage.DamageStateConvexDamage.FiberDamageStateConvexDamage.NeoHookeConvexDamage.StVenantKirchhoffConvexDamage.constitutive_driverConvexDamage.update_materialstate!ConvexDamage.Ψ
Structs
The important structs of the project are the following: Firstly, the base material classes that have no history dependent behaviour and serve as the dispatch argument for Ψ
ConvexDamage.NeoHooke — TypeNeoHooke(μ::Float64, λ::Float64) <: HyperelasticityHyperelastic material model for NeoHooke. Needed for multiple dispatch of $\psi(\boldsymbol{C},\text{material})$
Holds two Float64 fields
Fields
μ::Float64λ::Float64
ConvexDamage.StVenantKirchhoff — TypeStVenantKirchhoff(μ::Float64, λ::Float64) <: HyperelasticityHyperelastic material model for St. Venant-Kirchhoff. Needed for multiple dispatch of $\psi(\boldsymbol{C},\text{material})$
Holds two Float64 fields
Fields
μ::Float64λ::Float64
Secondly, the history dependent structs that combine base material and history dependent identities
ConvexDamage.Damage — TypeDamage(βₖ=0.0, ψₖ=0.0, Fₖ=Tensor{2,1}([1.0]))Base damage struct that is needed for the "quasi" - homogenized phases, denoted by + and -. Used in the actual damage struct called DamageState to store the history dependent variables ofthe weakly, strongly and homogenized damaged phase. Struct is parameterized in dim
Fields
βₖ::Float64conjugated Forceψₖ::Float64maximum effective (virtually undamaged) energyFₖ::Tensor{2,dim}previous deformationgradient
ConvexDamage.DamageState — TypeDamageState(material=mp::T) where T <: HyperelasticityActual structure for the multiple dispatch of constitutive_driver. Holds temporary variables for the newton iteration and sets them as soon as the finite element newton iteration converged. The values are set by the function update_materialstate!. Parameterization of the struct is done in dim and materialtype which is the hyperelastic basematerial
Fields
temp_damage::Damagetemp valuetemp_damage⁺::Damagetemp valuetemp_damage¯::Damagetemp valuedamage::DamageDamage struct for homogenized phasedamage⁺::DamageDamage struct for strongly damaged phasedamage¯::DamageDamage struct for weakly damaged phasematerial::basematerial where basematerial <: Hyperelasticitytemp_P::Tensor{2,dim}temp valuetemp_σ::SymmetricTensor{2,dim}temp valueP::Tensor{2,dim}First Piola Kirchhoff Stresses in material pointσ::SymmetricTensor{2,dim}Cauchy Stresses in material pointtemp_ξₖ::Float64temp valuetemp_dₖ::Float64temp valueξₖ::Float64volume fractiondₖ::Float64polarization parameterW_min::Float64value of the convexified problem $\overline{W}$W::Float64actual value of the energy $W$convex::Boolis the energy $W$ convexrelaxed::Boolrelaxed regime
Note that all values beginning with temp are temporary variables for the newton iteration
ConvexDamage.FiberDamageState — TypeFiberDamageState(material=mp::T) where T <: HyperelasticityActual structure for the multiple dispatch of constitutive_driver. Combines an Array of length equal to the number of preferred fiber directions filled with DamageState, with the preferred fiber directions and an Array filled with the vectors of the preferred fiber directions The values are set by the function update_materialstate!. FiberDamageState is parameterized in dim and materialtype as well as the primitive type of the vector entries of 𝐀
Fields
𝐀::Array{Vec{dim,T,1}undeformed preferred fiber directions as a Array filled with the the preferred directionsfiber_directions::Inthow many preferred fiber directionsfiberdamagestate::Array{DamageState{1,materialtype},1}damagestates for the individual fibers
Based on them, constitutive_driver and the energy function Ψ dispatches.
Functions
The listed functions below are the core of the project. Everything else is standard nonlinear structural mechanics done by FEM.
ConvexDamage.Ψ — Functionψ(C, mp::NeoHooke)implements the strain energy function of NeoHookean material which is defined by
where
ψ(C, mp::StVenantKirchhoff)implements the strain energy function of St.Venant-Kirchhoff material which is defined by
where
ConvexDamage.constitutive_driver — Functionconstitutive_driver(C, mp::NeoHooke)Implements the constitutive response of a neohooke material without damage
constitutive_driver(F, damage::DamageState)Implements the constitutive response of a continuum damage model as in Balzani and Ortiz, 2012
constitutive_driver(F, damage::DamageStateUnrelaxed)Implements the unrelaxed response of a continuum damage model
constitutive_driver(F, damage::DamageStateReconvexify)Implements the extension of the constitutive response of a continuum damage model as in Balzani and Ortiz, 2012 The aformentioned model is extended by rerelaxation.
constitutive_driver(𝐅::Tensor{2,dim}, damage::FiberDamageState{dim})Fiber damage constitutive function that loops over all spherical integration points and over all fibers. Integrates 1D Dimensional model over fibers and thus, returns a 3D model.
ConvexDamage.update_materialstate! — Functionupdate_materialstate!(damage::DamageState)This function must be implemented by any given materialtype. Updates the hisotry (time dependent) temp values to accepted, fixed values as soon as finite element newton converges
update_materialstate!(damage::FiberDamageState)updates the history (time dependent) temp values to accepted, fixed values as soon as finite element newton converges. Basically, just broadcasting the function onto the array of DamageState.
Fallback method that throws error