diff --git a/MaterialLib/SolidModels/Ehlers-impl.h b/MaterialLib/SolidModels/Ehlers-impl.h index e7a7d2fa5dc3d6d4ad0dca68ab25f89491cfbd5f..e4745537ba1fe07f53a930a837affb22fccc70df 100644 --- a/MaterialLib/SolidModels/Ehlers-impl.h +++ b/MaterialLib/SolidModels/Ehlers-impl.h @@ -40,69 +40,6 @@ namespace Solids { namespace Ehlers { -/// Evaluated MaterialPropertiesParameters container, see its documentation for -/// details. -struct MaterialProperties final -{ - MaterialProperties(double const t, ProcessLib::SpatialPosition const& x, - MaterialPropertiesParameters const& mp) - : G(mp.G(t, x)[0]), - K(mp.K(t, x)[0]), - alpha(mp.alpha(t, x)[0]), - beta(mp.beta(t, x)[0]), - gamma(mp.gamma(t, x)[0]), - delta(mp.delta(t, x)[0]), - epsilon(mp.epsilon(t, x)[0]), - m(mp.m(t, x)[0]), - alpha_p(mp.alpha_p(t, x)[0]), - beta_p(mp.beta_p(t, x)[0]), - gamma_p(mp.gamma_p(t, x)[0]), - delta_p(mp.delta_p(t, x)[0]), - epsilon_p(mp.epsilon_p(t, x)[0]), - m_p(mp.m_p(t, x)[0]), - kappa(mp.kappa(t, x)[0]), - hardening_coefficient(mp.hardening_coefficient(t, x)[0]) - { - } - double const G; - double const K; - - double const alpha; - double const beta; - double const gamma; - double const delta; - double const epsilon; - double const m; - - double const alpha_p; - double const beta_p; - double const gamma_p; - double const delta_p; - double const epsilon_p; - double const m_p; - - double const kappa; - double const hardening_coefficient; -}; - -/// Evaluated DamagePropertiesParameters container, see its documentation for -/// details. -struct DamageProperties -{ - DamageProperties(double const t, - ProcessLib::SpatialPosition const& x, - DamagePropertiesParameters const& dp) - : alpha_d(dp.alpha_d(t, x)[0]), - beta_d(dp.beta_d(t, x)[0]), - h_d(dp.h_d(t, x)[0]) - { - } - double const alpha_d; - double const beta_d; - double const h_d; -}; - - /// Special product of \c v with itself: \f$v \odot v\f$. /// The tensor \c v is given in Kelvin mapping. /// \note Implementation only for 2 and 3 dimensions. diff --git a/MaterialLib/SolidModels/Ehlers.h b/MaterialLib/SolidModels/Ehlers.h index 95ed157619be705a5bb34e433c33a47804aef10e..b277dd2bc289181a02b08a2742a74a0e7fbb13df 100644 --- a/MaterialLib/SolidModels/Ehlers.h +++ b/MaterialLib/SolidModels/Ehlers.h @@ -99,6 +99,68 @@ struct DamagePropertiesParameters P const& h_d; }; +/// Evaluated MaterialPropertiesParameters container, see its documentation for +/// details. +struct MaterialProperties final +{ + MaterialProperties(double const t, ProcessLib::SpatialPosition const& x, + MaterialPropertiesParameters const& mp) + : G(mp.G(t, x)[0]), + K(mp.K(t, x)[0]), + alpha(mp.alpha(t, x)[0]), + beta(mp.beta(t, x)[0]), + gamma(mp.gamma(t, x)[0]), + delta(mp.delta(t, x)[0]), + epsilon(mp.epsilon(t, x)[0]), + m(mp.m(t, x)[0]), + alpha_p(mp.alpha_p(t, x)[0]), + beta_p(mp.beta_p(t, x)[0]), + gamma_p(mp.gamma_p(t, x)[0]), + delta_p(mp.delta_p(t, x)[0]), + epsilon_p(mp.epsilon_p(t, x)[0]), + m_p(mp.m_p(t, x)[0]), + kappa(mp.kappa(t, x)[0]), + hardening_coefficient(mp.hardening_coefficient(t, x)[0]) + { + } + double const G; + double const K; + + double const alpha; + double const beta; + double const gamma; + double const delta; + double const epsilon; + double const m; + + double const alpha_p; + double const beta_p; + double const gamma_p; + double const delta_p; + double const epsilon_p; + double const m_p; + + double const kappa; + double const hardening_coefficient; +}; + +/// Evaluated DamagePropertiesParameters container, see its documentation for +/// details. +struct DamageProperties +{ + DamageProperties(double const t, + ProcessLib::SpatialPosition const& x, + DamagePropertiesParameters const& dp) + : alpha_d(dp.alpha_d(t, x)[0]), + beta_d(dp.beta_d(t, x)[0]), + h_d(dp.h_d(t, x)[0]) + { + } + double const alpha_d; + double const beta_d; + double const h_d; +}; + template <typename KelvinVector> struct PlasticStrain final { @@ -262,6 +324,18 @@ public: std::vector<typename MechanicsBase<DisplacementDim>::InternalVariable> getInternalVariables() const override; + MaterialProperties evaluatedMaterialProperties( + double const t, ProcessLib::SpatialPosition const& x) const + { + return MaterialProperties(t, x, _mp); + } + + DamageProperties evaluatedDamageProperties( + double const t, ProcessLib::SpatialPosition const& x) const + { + return DamageProperties(t, x, *_damage_properties); + } + private: NumLib::NewtonRaphsonSolverParameters const _nonlinear_solver_parameters;