OGS
MaterialLib::Solids::Ehlers Namespace Reference

Detailed Description

Common convenitions for naming: x_D - deviatoric part of tensor x x_V - volumetric part of tensor x x_p - a variable related to plastic potential x_prev - value of x in previous time step

Variables used in the code: eps_D - deviatoric strain eps_p_D_dot - deviatoric increment of plastic strain eps_p_eff_dot - increment of effective plastic strain eps_p_V_dot - volumetric increment of plastic strain sigma_D_inverse_D - deviatoric part of sigma_D_inverse

derivation of the flow rule theta - J3 / J2^(3 / 2) from yield function dtheta_dsigma - derivative of theta sqrtPhi - square root of Phi from plastic potential flow_D - deviatoric part of flow flow_V - volumetric part of flow lambda_flow_D - deviatoric increment of plastic strain

Classes

class  Damage
struct  DamageProperties
struct  DamagePropertiesParameters
struct  MaterialProperties
struct  MaterialPropertiesParameters
struct  OnePlusGamma_pTheta
 Holds powers of 1 + gamma_p*theta to base 0, m_p, and m_p-1. More...
struct  PhysicalStressWithInvariants
struct  PlasticStrain
class  SolidEhlers
struct  StateVariables

Enumerations

enum class  TangentType { Elastic , PlasticDamageSecant , Plastic }

Functions

std::unique_ptr< DamagePropertiesParameterscreateDamageProperties (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
template<int DisplacementDim>
std::unique_ptr< SolidEhlers< DisplacementDim > > createEhlers (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > sOdotS (MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &v)
template<int DisplacementDim>
double plasticFlowVolumetricPart (PhysicalStressWithInvariants< DisplacementDim > const &s, double const sqrtPhi, double const alpha_p, double const beta_p, double const delta_p, double const epsilon_p)
template<int DisplacementDim>
SolidEhlers< DisplacementDim >::KelvinVector plasticFlowDeviatoricPart (PhysicalStressWithInvariants< DisplacementDim > const &s, OnePlusGamma_pTheta const &one_gt, double const sqrtPhi, typename SolidEhlers< DisplacementDim >::KelvinVector const &dtheta_dsigma, double const gamma_p, double const m_p)
template<int DisplacementDim>
double yieldFunction (MaterialProperties const &mp, PhysicalStressWithInvariants< DisplacementDim > const &s, double const k)
template<int DisplacementDim>
std::pair< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > thetaSigmaDerivatives (double theta, PhysicalStressWithInvariants< DisplacementDim > const &s)
template<int DisplacementDim>
SolidEhlers< DisplacementDim >::ResidualVectorType calculatePlasticResidual (MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps_D, double const eps_V, PhysicalStressWithInvariants< DisplacementDim > const &s, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps_p_D, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps_p_D_dot, double const eps_p_V, double const eps_p_V_dot, double const eps_p_eff_dot, double const lambda, double const k, MaterialProperties const &mp)
template<int DisplacementDim>
SolidEhlers< DisplacementDim >::JacobianMatrix calculatePlasticJacobian (double const dt, PhysicalStressWithInvariants< DisplacementDim > const &s, double const lambda, MaterialProperties const &mp)
template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > calculateDResidualDEps (double const K, double const G)
double calculateIsotropicHardening (double const kappa, double const hardening_coefficient, double const eps_p_eff)
template<int DisplacementDim>
SolidEhlers< DisplacementDim >::KelvinVector predict_sigma (double const G, double const K, typename SolidEhlers< DisplacementDim >::KelvinVector const &sigma_prev, typename SolidEhlers< DisplacementDim >::KelvinVector const &eps, typename SolidEhlers< DisplacementDim >::KelvinVector const &eps_prev, double const eps_V)
template<typename ResidualVector, typename KelvinVector>
std::tuple< KelvinVector, PlasticStrain< KelvinVector >, double > splitSolutionVector (ResidualVector const &solution)
template<>
MathLib::KelvinVector::KelvinMatrixType< 3 > sOdotS< 3 > (MathLib::KelvinVector::KelvinVectorType< 3 > const &v)
template<>
MathLib::KelvinVector::KelvinMatrixType< 2 > sOdotS< 2 > (MathLib::KelvinVector::KelvinVectorType< 2 > const &v)
TangentType makeTangentType (std::string const &s)

Enumeration Type Documentation

◆ TangentType

Enumerator
Elastic 
PlasticDamageSecant 
Plastic 

Definition at line 33 of file Ehlers.h.

Function Documentation

◆ calculateDResidualDEps()

template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > MaterialLib::Solids::Ehlers::calculateDResidualDEps ( double const K,
double const G )

Calculates the derivative of the residuals with respect to total strain. Implementation fully implicit only.

Definition at line 431 of file Ehlers.cpp.

433{
434 static int const KelvinVectorSize =
437
438 auto const& P_dev = Invariants::deviatoric_projection;
439 auto const& P_sph = Invariants::spherical_projection;
440 auto const& I =
442
443 return -2. * I * P_dev - 3. * K / G * I * P_sph;
444}
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType

References MathLib::KelvinVector::kelvin_vector_dimensions().

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ calculateIsotropicHardening()

double MaterialLib::Solids::Ehlers::calculateIsotropicHardening ( double const kappa,
double const hardening_coefficient,
double const eps_p_eff )
inline

Definition at line 446 of file Ehlers.cpp.

449{
450 return kappa * (1. + eps_p_eff * hardening_coefficient);
451}

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ calculatePlasticJacobian()

template<int DisplacementDim>
SolidEhlers< DisplacementDim >::JacobianMatrix MaterialLib::Solids::Ehlers::calculatePlasticJacobian ( double const dt,
PhysicalStressWithInvariants< DisplacementDim > const & s,
double const lambda,
MaterialProperties const & mp )

Definition at line 250 of file Ehlers.cpp.

255{
256 static int const KelvinVectorSize =
259 using KelvinVector =
261 using KelvinMatrix =
263
264 auto const& P_dev = Invariants::deviatoric_projection;
265 auto const& identity2 = Invariants::identity2;
266
267 double const theta = s.J_3 / (s.J_2 * std::sqrt(s.J_2));
268 OnePlusGamma_pTheta const one_gt{mp.gamma_p, theta, mp.m_p};
269
270 auto const [dtheta_dsigma, d2theta_dsigma2] =
271 thetaSigmaDerivatives(theta, s);
272
273 // deviatoric flow
274 double const sqrtPhi = std::sqrt(
275 s.J_2 * one_gt.pow_m_p + mp.alpha_p / 2. * boost::math::pow<2>(s.I_1) +
276 boost::math::pow<2>(mp.delta_p) * boost::math::pow<4>(s.I_1));
277 KelvinVector const flow_D = plasticFlowDeviatoricPart(
278 s, one_gt, sqrtPhi, dtheta_dsigma, mp.gamma_p, mp.m_p);
279 KelvinVector const lambda_flow_D = lambda * flow_D;
280
282 SolidEhlers<DisplacementDim>::JacobianMatrix::Zero();
283
284 // G_11
285 jacobian.template block<KelvinVectorSize, KelvinVectorSize>(0, 0)
286 .noalias() = KelvinMatrix::Identity();
287
288 // G_12
289 jacobian
290 .template block<KelvinVectorSize, KelvinVectorSize>(0, KelvinVectorSize)
291 .noalias() = 2 * KelvinMatrix::Identity();
292
293 // G_13
294 jacobian.template block<KelvinVectorSize, 1>(0, 2 * KelvinVectorSize)
295 .noalias() = mp.K / mp.G * identity2;
296
297 // G_14 and G_15 are zero
298
299 // G_21 -- derivative of deviatoric flow
300
301 double const gm_p = mp.gamma_p * mp.m_p;
302 // intermediate variable for derivative of deviatoric flow
303 KelvinVector const M0 = s.J_2 / one_gt.value * dtheta_dsigma;
304 // derivative of Phi w.r.t. sigma
305 KelvinVector const dPhi_dsigma =
306 one_gt.pow_m_p * (s.D + gm_p * M0) +
307 (mp.alpha_p * s.I_1 +
308 4 * boost::math::pow<2>(mp.delta_p) * boost::math::pow<3>(s.I_1)) *
309 identity2;
310
311 // intermediate variable for derivative of deviatoric flow
312 KelvinMatrix const M1 =
313 one_gt.pow_m_p *
314 (s.D * dPhi_dsigma.transpose() + gm_p * M0 * dPhi_dsigma.transpose());
315 // intermediate variable for derivative of deviatoric flow
316 KelvinMatrix const M2 =
317 one_gt.pow_m_p * (P_dev + s.D * gm_p * M0.transpose());
318
319 // intermediate variable for derivative of deviatoric flow
320 KelvinMatrix const M3 =
321 gm_p * one_gt.pow_m_p1 *
322 ((s.D + (gm_p - mp.gamma_p) * M0) * dtheta_dsigma.transpose() +
323 s.J_2 * d2theta_dsigma2);
324
325 // derivative of flow_D w.r.t. sigma
326 KelvinMatrix const dflow_D_dsigma =
327 (-M1 / (4 * boost::math::pow<3>(sqrtPhi)) + (M2 + M3) / (2 * sqrtPhi)) *
328 mp.G;
329 jacobian
330 .template block<KelvinVectorSize, KelvinVectorSize>(KelvinVectorSize, 0)
331 .noalias() = -lambda * dflow_D_dsigma;
332
333 // G_22
334 jacobian
335 .template block<KelvinVectorSize, KelvinVectorSize>(KelvinVectorSize,
336 KelvinVectorSize)
337 .noalias() = KelvinMatrix::Identity() / dt;
338
339 // G_23 and G_24 are zero
340
341 // G_25
342 jacobian
343 .template block<KelvinVectorSize, 1>(KelvinVectorSize,
344 2 * KelvinVectorSize + 2)
345 .noalias() = -flow_D;
346
347 // G_31
348 {
349 // derivative of flow_V w.r.t. sigma
350 KelvinVector const dflow_V_dsigma =
351 3 * mp.G *
352 (-(mp.alpha_p * s.I_1 + 4 * boost::math::pow<2>(mp.delta_p) *
353 boost::math::pow<3>(s.I_1)) /
354 (4 * boost::math::pow<3>(sqrtPhi)) * dPhi_dsigma +
355 (mp.alpha_p * identity2 +
356 12 * boost::math::pow<2>(mp.delta_p * s.I_1) * identity2) /
357 (2 * sqrtPhi) +
358 2 * mp.epsilon_p * identity2);
359
360 jacobian.template block<1, KelvinVectorSize>(2 * KelvinVectorSize, 0)
361 .noalias() = -lambda * dflow_V_dsigma.transpose();
362 }
363
364 // G_32 is zero
365
366 // G_33
367 jacobian(2 * KelvinVectorSize, 2 * KelvinVectorSize) = 1. / dt;
368
369 // G_34 is zero
370
371 // G_35
372 {
373 double const flow_V = plasticFlowVolumetricPart<DisplacementDim>(
374 s, sqrtPhi, mp.alpha_p, mp.beta_p, mp.delta_p, mp.epsilon_p);
375 jacobian(2 * KelvinVectorSize, 2 * KelvinVectorSize + 2) = -flow_V;
376 }
377
378 // increment of effectiv plastic strain
379 double const eff_flow =
380 std::sqrt(2. / 3. * lambda_flow_D.transpose() * lambda_flow_D);
381
382 if (eff_flow > 0)
383 {
384 // intermediate variable for derivative of plastic jacobian
385 KelvinVector const eff_flow23_lambda_flow_D =
386 -2 / 3. / eff_flow * lambda_flow_D;
387 // G_41
388 jacobian
389 .template block<1, KelvinVectorSize>(2 * KelvinVectorSize + 1, 0)
390 .noalias() = lambda * dflow_D_dsigma * eff_flow23_lambda_flow_D;
391 // G_45
392 jacobian(2 * KelvinVectorSize + 1, 2 * KelvinVectorSize + 2) =
393 eff_flow23_lambda_flow_D.transpose() * flow_D;
394 }
395
396 // G_42 and G_43 are zero
397
398 // G_44
399 jacobian(2 * KelvinVectorSize + 1, 2 * KelvinVectorSize + 1) = 1. / dt;
400
401 // G_51
402 {
403 double const one_gt_pow_m = std::pow(one_gt.value, mp.m);
404 double const gm = mp.gamma * mp.m;
405 // derivative of yield function w.r.t. sigma
406 KelvinVector const dF_dsigma =
407 mp.G *
408 (one_gt_pow_m * (s.D + gm * M0) +
409 (mp.alpha * s.I_1 + 4 * boost::math::pow<2>(mp.delta) *
410 boost::math::pow<3>(s.I_1)) *
411 identity2) /
412 (2. * sqrtPhi) +
413 mp.G * (mp.beta + 2 * mp.epsilon_p * s.I_1) * identity2;
414
415 jacobian
416 .template block<1, KelvinVectorSize>(2 * KelvinVectorSize + 2, 0)
417 .noalias() = dF_dsigma.transpose() / mp.G;
418 }
419
420 // G_54
421 jacobian(2 * KelvinVectorSize + 2, 2 * KelvinVectorSize + 1) =
422 -mp.kappa * mp.hardening_coefficient / mp.G;
423
424 // G_52, G_53, G_55 are zero
425 return jacobian;
426}
Eigen::Matrix< double, JacobianResidualSize, JacobianResidualSize, Eigen::RowMajor > JacobianMatrix
Definition Ehlers.h:279
SolidEhlers< DisplacementDim >::KelvinVector plasticFlowDeviatoricPart(PhysicalStressWithInvariants< DisplacementDim > const &s, OnePlusGamma_pTheta const &one_gt, double const sqrtPhi, typename SolidEhlers< DisplacementDim >::KelvinVector const &dtheta_dsigma, double const gamma_p, double const m_p)
Definition Ehlers.cpp:117
double plasticFlowVolumetricPart(PhysicalStressWithInvariants< DisplacementDim > const &s, double const sqrtPhi, double const alpha_p, double const beta_p, double const delta_p, double const epsilon_p)
Definition Ehlers.cpp:104
std::pair< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > thetaSigmaDerivatives(double theta, PhysicalStressWithInvariants< DisplacementDim > const &s)
Definition Ehlers.cpp:148
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
KV::KelvinVectorType< DisplacementDim > KelvinVector
Holds powers of 1 + gamma_p*theta to base 0, m_p, and m_p-1.
Definition Ehlers.cpp:89

References MaterialLib::Solids::Ehlers::MaterialProperties::alpha, MaterialLib::Solids::Ehlers::MaterialProperties::alpha_p, MaterialLib::Solids::Ehlers::MaterialProperties::beta, MaterialLib::Solids::Ehlers::MaterialProperties::beta_p, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::D, MaterialLib::Solids::Ehlers::MaterialProperties::delta, MaterialLib::Solids::Ehlers::MaterialProperties::delta_p, MaterialLib::Solids::Ehlers::MaterialProperties::epsilon_p, MaterialLib::Solids::Ehlers::MaterialProperties::G, MaterialLib::Solids::Ehlers::MaterialProperties::gamma, MaterialLib::Solids::Ehlers::MaterialProperties::gamma_p, MaterialLib::Solids::Ehlers::MaterialProperties::hardening_coefficient, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::I_1, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_2, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_3, MaterialLib::Solids::Ehlers::MaterialProperties::K, MaterialLib::Solids::Ehlers::MaterialProperties::kappa, MathLib::KelvinVector::kelvin_vector_dimensions(), MaterialLib::Solids::Ehlers::MaterialProperties::m, MaterialLib::Solids::Ehlers::MaterialProperties::m_p, plasticFlowDeviatoricPart(), plasticFlowVolumetricPart(), MaterialLib::Solids::Ehlers::OnePlusGamma_pTheta::pow_m_p, MaterialLib::Solids::Ehlers::OnePlusGamma_pTheta::pow_m_p1, thetaSigmaDerivatives(), and MaterialLib::Solids::Ehlers::OnePlusGamma_pTheta::value.

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ calculatePlasticResidual()

template<int DisplacementDim>
SolidEhlers< DisplacementDim >::ResidualVectorType MaterialLib::Solids::Ehlers::calculatePlasticResidual ( MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const & eps_D,
double const eps_V,
PhysicalStressWithInvariants< DisplacementDim > const & s,
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const & eps_p_D,
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const & eps_p_D_dot,
double const eps_p_V,
double const eps_p_V_dot,
double const eps_p_eff_dot,
double const lambda,
double const k,
MaterialProperties const & mp )

Definition at line 189 of file Ehlers.cpp.

201{
202 static int const KelvinVectorSize =
205 using KelvinVector =
207
208 auto const& identity2 = Invariants::identity2;
209
210 double const theta = s.J_3 / (s.J_2 * std::sqrt(s.J_2));
211
213 // calculate stress residual
214 residual.template segment<KelvinVectorSize>(0).noalias() =
215 s.value / mp.G - 2 * (eps_D - eps_p_D) -
216 mp.K / mp.G * (eps_V - eps_p_V) * identity2;
217
218 auto const [dtheta_dsigma, d2theta_dsigma2] =
219 thetaSigmaDerivatives(theta, s);
220
221 OnePlusGamma_pTheta const one_gt{mp.gamma_p, theta, mp.m_p};
222 double const sqrtPhi = std::sqrt(
223 s.J_2 * one_gt.pow_m_p + mp.alpha_p / 2. * boost::math::pow<2>(s.I_1) +
224 boost::math::pow<2>(mp.delta_p) * boost::math::pow<4>(s.I_1));
225 KelvinVector const flow_D = plasticFlowDeviatoricPart(
226 s, one_gt, sqrtPhi, dtheta_dsigma, mp.gamma_p, mp.m_p);
227 KelvinVector const lambda_flow_D = lambda * flow_D;
228
229 residual.template segment<KelvinVectorSize>(KelvinVectorSize).noalias() =
230 eps_p_D_dot - lambda_flow_D;
231
232 // plastic volume strain
233 {
234 double const flow_V = plasticFlowVolumetricPart<DisplacementDim>(
235 s, sqrtPhi, mp.alpha_p, mp.beta_p, mp.delta_p, mp.epsilon_p);
236 residual(2 * KelvinVectorSize, 0) = eps_p_V_dot - lambda * flow_V;
237 }
238
239 // evolution of plastic equivalent strain
240 residual(2 * KelvinVectorSize + 1) =
241 eps_p_eff_dot -
242 std::sqrt(2. / 3. * lambda_flow_D.transpose() * lambda_flow_D);
243
244 // yield function (for plastic multiplier)
245 residual(2 * KelvinVectorSize + 2) = yieldFunction(mp, s, k) / mp.G;
246 return residual;
247}
Eigen::Matrix< double, JacobianResidualSize, 1 > ResidualVectorType
Definition Ehlers.h:278
double yieldFunction(MaterialProperties const &mp, PhysicalStressWithInvariants< DisplacementDim > const &s, double const k)
Definition Ehlers.cpp:129

References MaterialLib::Solids::Ehlers::MaterialProperties::alpha_p, MaterialLib::Solids::Ehlers::MaterialProperties::beta_p, MaterialLib::Solids::Ehlers::MaterialProperties::delta_p, MaterialLib::Solids::Ehlers::MaterialProperties::epsilon_p, MaterialLib::Solids::Ehlers::MaterialProperties::G, MaterialLib::Solids::Ehlers::MaterialProperties::gamma_p, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::I_1, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_2, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_3, MaterialLib::Solids::Ehlers::MaterialProperties::K, MathLib::KelvinVector::kelvin_vector_dimensions(), MaterialLib::Solids::Ehlers::MaterialProperties::m_p, plasticFlowDeviatoricPart(), plasticFlowVolumetricPart(), MaterialLib::Solids::Ehlers::OnePlusGamma_pTheta::pow_m_p, thetaSigmaDerivatives(), MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::value, and yieldFunction().

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ createDamageProperties()

std::unique_ptr< DamagePropertiesParameters > MaterialLib::Solids::Ehlers::createDamageProperties ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
BaseLib::ConfigTree const & config )
inline
Input File Parameter
material__solid__constitutive_relation__Ehlers__damage_properties__alpha_d
Input File Parameter
material__solid__constitutive_relation__Ehlers__damage_properties__beta_d
Input File Parameter
material__solid__constitutive_relation__Ehlers__damage_properties__h_d

Definition at line 16 of file CreateEhlers.h.

19{
21 auto& alpha_d =
22 ParameterLib::findParameter<double>(config, "alpha_d", parameters, 1);
23
24 DBUG("Use '{:s}' as alpha_d.", alpha_d.name);
25
27 auto& beta_d =
28 ParameterLib::findParameter<double>(config, "beta_d", parameters, 1);
29
30 DBUG("Use '{:s}' as beta_d.", beta_d.name);
31
33 auto& h_d =
34 ParameterLib::findParameter<double>(config, "h_d", parameters, 1);
35
36 DBUG("Use '{:s}' as h_d.", h_d.name);
37
38 return std::make_unique<DamagePropertiesParameters>(
39 DamagePropertiesParameters{alpha_d, beta_d, h_d});
40}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)

References DBUG(), and ParameterLib::findParameter().

Referenced by createEhlers().

◆ createEhlers()

template<int DisplacementDim>
std::unique_ptr< SolidEhlers< DisplacementDim > > MaterialLib::Solids::Ehlers::createEhlers ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
BaseLib::ConfigTree const & config )
Input File Parameter
material__solid__constitutive_relation__type
Input File Parameter
material__solid__constitutive_relation__Ehlers__shear_modulus
Input File Parameter
material__solid__constitutive_relation__Ehlers__bulk_modulus
Input File Parameter
material__solid__constitutive_relation__Ehlers__kappa
Input File Parameter
material__solid__constitutive_relation__Ehlers__beta
Input File Parameter
material__solid__constitutive_relation__Ehlers__gamma
Input File Parameter
material__solid__constitutive_relation__Ehlers__hardening_modulus
Input File Parameter
material__solid__constitutive_relation__Ehlers__alpha
Input File Parameter
material__solid__constitutive_relation__Ehlers__delta
Input File Parameter
material__solid__constitutive_relation__Ehlers__eps
Input File Parameter
material__solid__constitutive_relation__Ehlers__m
Input File Parameter
material__solid__constitutive_relation__Ehlers__alphap
Input File Parameter
material__solid__constitutive_relation__Ehlers__deltap
Input File Parameter
material__solid__constitutive_relation__Ehlers__epsp
Input File Parameter
material__solid__constitutive_relation__Ehlers__mp
Input File Parameter
material__solid__constitutive_relation__Ehlers__betap
Input File Parameter
material__solid__constitutive_relation__Ehlers__gammap
Input File Parameter
material__solid__constitutive_relation__Ehlers__tangent_type
Input File Parameter
material__solid__constitutive_relation__Ehlers__damage_properties
Input File Parameter
material__solid__constitutive_relation__Ehlers__nonlinear_solver

Definition at line 43 of file CreateEhlers.h.

46{
48 config.checkConfigParameter("type", "Ehlers");
49 DBUG("Create Ehlers material");
50
52 auto& shear_modulus = ParameterLib::findParameter<double>(
53 config, "shear_modulus", parameters, 1);
54
55 DBUG("Use '{:s}' as shear modulus parameter.", shear_modulus.name);
56
58 auto& bulk_modulus = ParameterLib::findParameter<double>(
59 config, "bulk_modulus", parameters, 1);
60
61 DBUG("Use '{:s}' as bulk modulus parameter.", bulk_modulus.name);
62
64 auto& kappa =
65 ParameterLib::findParameter<double>(config, "kappa", parameters, 1);
66
67 DBUG("Use '{:s}' as kappa.", kappa.name);
68
70 auto& beta =
71 ParameterLib::findParameter<double>(config, "beta", parameters, 1);
72
73 DBUG("Use '{:s}' as beta.", beta.name);
74
76 auto& gamma =
77 ParameterLib::findParameter<double>(config, "gamma", parameters, 1);
78
79 DBUG("Use '{:s}' as gamma.", gamma.name);
80
82 auto& hardening_modulus = ParameterLib::findParameter<double>(
83 config, "hardening_modulus", parameters, 1);
84
85 DBUG("Use '{:s}' as hardening modulus parameter.", hardening_modulus.name);
86
88 auto& alpha =
89 ParameterLib::findParameter<double>(config, "alpha", parameters, 1);
90
91 DBUG("Use '{:s}' as alpha.", alpha.name);
92
94 auto& delta =
95 ParameterLib::findParameter<double>(config, "delta", parameters, 1);
96
97 DBUG("Use '{:s}' as delta.", delta.name);
98
100 auto& eps =
101 ParameterLib::findParameter<double>(config, "eps", parameters, 1);
102
103 DBUG("Use '{:s}' as eps.", eps.name);
104
106 auto& m = ParameterLib::findParameter<double>(config, "m", parameters, 1);
107
108 DBUG("Use '{:s}' as m.", m.name);
109
111 auto& alphap =
112 ParameterLib::findParameter<double>(config, "alphap", parameters, 1);
113
114 DBUG("Use '{:s}' as alphap.", alphap.name);
115
117 auto& deltap =
118 ParameterLib::findParameter<double>(config, "deltap", parameters, 1);
119
120 DBUG("Use '{:s}' as deltap.", deltap.name);
121
123 auto& epsp =
124 ParameterLib::findParameter<double>(config, "epsp", parameters, 1);
125
126 DBUG("Use '{:s}' as epsp.", epsp.name);
127
129 auto& paremeter_mp =
130 ParameterLib::findParameter<double>(config, "mp", parameters, 1);
131
132 DBUG("Use '{:s}' as mp.", paremeter_mp.name);
133
135 auto& betap =
136 ParameterLib::findParameter<double>(config, "betap", parameters, 1);
137
138 DBUG("Use '{:s}' as betap.", betap.name);
139
141 auto& gammap =
142 ParameterLib::findParameter<double>(config, "gammap", parameters, 1);
143
144 DBUG("Use '{:s}' as gammap.", gammap.name);
145
146 auto tangent_type =
148 makeTangentType(config.getConfigParameter<std::string>("tangent_type"));
149
151 shear_modulus, bulk_modulus, alpha, beta,
152 gamma, delta, eps, m,
153 alphap, betap, gammap, deltap,
154 epsp, paremeter_mp, kappa, hardening_modulus};
155
156 // Damage properties.
157 std::unique_ptr<DamagePropertiesParameters> ehlers_damage_properties;
158
159 auto const& ehlers_damage_config =
161 config.getConfigSubtreeOptional("damage_properties");
162 if (ehlers_damage_config)
163 {
164 ehlers_damage_properties =
165 createDamageProperties(parameters, *ehlers_damage_config);
166 }
167
168 auto const& nonlinear_solver_config =
170 config.getConfigSubtree("nonlinear_solver");
171 auto const nonlinear_solver_parameters =
172 NumLib::createNewtonRaphsonSolverParameters(nonlinear_solver_config);
173
174 return std::make_unique<SolidEhlers<DisplacementDim>>(
175 nonlinear_solver_parameters,
176 mp,
177 std::move(ehlers_damage_properties),
178 tangent_type);
179}
std::unique_ptr< DamagePropertiesParameters > createDamageProperties(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
TangentType makeTangentType(std::string const &s)
Definition Ehlers.h:39
NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(BaseLib::ConfigTree const &config)

References BaseLib::ConfigTree::checkConfigParameter(), createDamageProperties(), NumLib::createNewtonRaphsonSolverParameters(), DBUG(), ParameterLib::findParameter(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeOptional(), and makeTangentType().

Referenced by MaterialLib::Solids::createConstitutiveRelation().

◆ makeTangentType()

TangentType MaterialLib::Solids::Ehlers::makeTangentType ( std::string const & s)
inline

Definition at line 39 of file Ehlers.h.

40{
41 if (s == "Elastic")
42 {
44 }
45 if (s == "PlasticDamageSecant")
46 {
48 }
49 if (s == "Plastic")
50 {
52 }
53 OGS_FATAL("Not valid string '{:s}' to create a tangent type from.", s);
54}
#define OGS_FATAL(...)
Definition Error.h:19

References Elastic, OGS_FATAL, Plastic, and PlasticDamageSecant.

Referenced by createEhlers().

◆ plasticFlowDeviatoricPart()

template<int DisplacementDim>
SolidEhlers< DisplacementDim >::KelvinVector MaterialLib::Solids::Ehlers::plasticFlowDeviatoricPart ( PhysicalStressWithInvariants< DisplacementDim > const & s,
OnePlusGamma_pTheta const & one_gt,
double const sqrtPhi,
typename SolidEhlers< DisplacementDim >::KelvinVector const & dtheta_dsigma,
double const gamma_p,
double const m_p )

◆ plasticFlowVolumetricPart()

template<int DisplacementDim>
double MaterialLib::Solids::Ehlers::plasticFlowVolumetricPart ( PhysicalStressWithInvariants< DisplacementDim > const & s,
double const sqrtPhi,
double const alpha_p,
double const beta_p,
double const delta_p,
double const epsilon_p )

Definition at line 104 of file Ehlers.cpp.

108{
109 return 3 *
110 (alpha_p * s.I_1 +
111 4 * boost::math::pow<2>(delta_p) * boost::math::pow<3>(s.I_1)) /
112 (2 * sqrtPhi) +
113 3 * beta_p + 6 * epsilon_p * s.I_1;
114}

References MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::I_1.

Referenced by calculatePlasticJacobian(), and calculatePlasticResidual().

◆ predict_sigma()

template<int DisplacementDim>
SolidEhlers< DisplacementDim >::KelvinVector MaterialLib::Solids::Ehlers::predict_sigma ( double const G,
double const K,
typename SolidEhlers< DisplacementDim >::KelvinVector const & sigma_prev,
typename SolidEhlers< DisplacementDim >::KelvinVector const & eps,
typename SolidEhlers< DisplacementDim >::KelvinVector const & eps_prev,
double const eps_V )

Definition at line 454 of file Ehlers.cpp.

460{
461 static int const KelvinVectorSize =
464 auto const& P_dev = Invariants::deviatoric_projection;
465
466 // dimensionless initial hydrostatic pressure
467 double const pressure_prev = Invariants::trace(sigma_prev) / (-3. * G);
468 // initial strain invariant
469 double const e_prev = Invariants::trace(eps_prev);
470 // dimensioness hydrostatic stress increment
471 double const pressure = pressure_prev - K / G * (eps_V - e_prev);
472 // dimensionless deviatoric initial stress
473 typename SolidEhlers<DisplacementDim>::KelvinVector const sigma_D_prev =
474 P_dev * sigma_prev / G;
475 // dimensionless deviatoric stress
476 typename SolidEhlers<DisplacementDim>::KelvinVector const sigma_D =
477 sigma_D_prev + 2 * P_dev * (eps - eps_prev);
478 return sigma_D - pressure * Invariants::identity2;
479}
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > KelvinVector
Definition Ehlers.h:291

References MathLib::KelvinVector::kelvin_vector_dimensions().

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ sOdotS()

template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > MaterialLib::Solids::Ehlers::sOdotS ( MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const & v)

Special product of v with itself: \(v \odot v\). The tensor v is given in Kelvin mapping.

Note
Implementation only for 2 and 3 dimensions.
Attention
Pay attention to the sign of the result, which normally would be negative, but the returned value is not negated. This has to do with \(d(A^{-1})/dA = -A^{-1} \odot A^{-1} \).

Referenced by thetaSigmaDerivatives().

◆ sOdotS< 2 >()

Definition at line 859 of file Ehlers.cpp.

902{
904
905 result(0, 0) = v(0) * v(0);
906 result(0, 1) = result(1, 0) = v(3) * v(3) / 2.;
907 result(0, 2) = result(2, 0) = 0;
908 result(0, 3) = result(3, 0) = v(0) * v(3);
909
910 result(1, 1) = v(1) * v(1);
911 result(1, 2) = result(2, 1) = 0;
912 result(1, 3) = result(3, 1) = v(3) * v(1);
913
914 result(2, 2) = v(2) * v(2);
915 result(2, 3) = result(3, 2) = 0;
916
917 result(3, 3) = v(0) * v(1) + v(3) * v(3) / 2.;
918
919 return result;
920}

◆ sOdotS< 3 >()

Definition at line 859 of file Ehlers.cpp.

864{
866
867 result(0, 0) = v(0) * v(0);
868 result(0, 1) = result(1, 0) = v(3) * v(3) / 2.;
869 result(0, 2) = result(2, 0) = v(5) * v(5) / 2.;
870 result(0, 3) = result(3, 0) = v(0) * v(3);
871 result(0, 4) = result(4, 0) = v(3) * v(5) / std::sqrt(2.);
872 result(0, 5) = result(5, 0) = v(0) * v(5);
873
874 result(1, 1) = v(1) * v(1);
875 result(1, 2) = result(2, 1) = v(4) * v(4) / 2.;
876 result(1, 3) = result(3, 1) = v(3) * v(1);
877 result(1, 4) = result(4, 1) = v(1) * v(4);
878 result(1, 5) = result(5, 1) = v(3) * v(4) / std::sqrt(2.);
879
880 result(2, 2) = v(2) * v(2);
881 result(2, 3) = result(3, 2) = v(5) * v(4) / std::sqrt(2.);
882 result(2, 4) = result(4, 2) = v(4) * v(2);
883 result(2, 5) = result(5, 2) = v(5) * v(2);
884
885 result(3, 3) = v(0) * v(1) + v(3) * v(3) / 2.;
886 result(3, 4) = result(4, 3) =
887 v(3) * v(4) / 2. + v(5) * v(1) / std::sqrt(2.);
888 result(3, 5) = result(5, 3) =
889 v(0) * v(4) / std::sqrt(2.) + v(3) * v(5) / 2.;
890
891 result(4, 4) = v(1) * v(2) + v(4) * v(4) / 2.;
892 result(4, 5) = result(5, 4) =
893 v(3) * v(2) / std::sqrt(2.) + v(5) * v(4) / 2.;
894
895 result(5, 5) = v(0) * v(2) + v(5) * v(5) / 2.;
896 return result;
897}

◆ splitSolutionVector()

template<typename ResidualVector, typename KelvinVector>
std::tuple< KelvinVector, PlasticStrain< KelvinVector >, double > MaterialLib::Solids::Ehlers::splitSolutionVector ( ResidualVector const & solution)

Split the agglomerated solution vector in separate items. The arrangement must be the same as in the newton() function.

Definition at line 485 of file Ehlers.cpp.

486{
487 static auto const size = KelvinVector::SizeAtCompileTime;
488 return std::forward_as_tuple(
489 solution.template segment<size>(size * 0),
490 PlasticStrain<KelvinVector>{solution.template segment<size>(size * 1),
491 solution[size * 2], solution[size * 2 + 1]},
492 solution[size * 2 + 2]);
493}

Referenced by MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ thetaSigmaDerivatives()

template<int DisplacementDim>
std::pair< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > MaterialLib::Solids::Ehlers::thetaSigmaDerivatives ( double theta,
PhysicalStressWithInvariants< DisplacementDim > const & s )

Definition at line 148 of file Ehlers.cpp.

150{
151 constexpr int KelvinVectorSize =
154 using KelvinVector =
156 using KelvinMatrix =
158
159 if (theta == 0)
160 {
161 return {KelvinVector::Zero(), KelvinMatrix::Zero()};
162 }
163
164 auto const& P_dev = Invariants::deviatoric_projection;
165
166 // inverse of deviatoric stress tensor
167 if (Invariants::determinant(s.D) == 0)
168 {
169 OGS_FATAL("Determinant is zero. Matrix is non-invertable.");
170 }
171 // inverse of sigma_D
172 KelvinVector const sigma_D_inverse = MathLib::KelvinVector::inverse(s.D);
173 KelvinVector const sigma_D_inverse_D = P_dev * sigma_D_inverse;
174
175 KelvinVector const dtheta_dsigma =
176 theta * sigma_D_inverse_D - 3. / 2. * theta / s.J_2 * s.D;
177 KelvinMatrix const d2theta_dsigma2 =
178 theta * P_dev * sOdotS<DisplacementDim>(sigma_D_inverse) * P_dev +
179 sigma_D_inverse_D * dtheta_dsigma.transpose() -
180 3. / 2. * theta / s.J_2 * P_dev -
181 3. / 2. * dtheta_dsigma / s.J_2 * s.D.transpose() +
182 3. / 2. * theta / boost::math::pow<2>(s.J_2) * s.D * s.D.transpose();
183
184 return {dtheta_dsigma, d2theta_dsigma2};
185}
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > sOdotS(MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &v)
Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > inverse(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)

References MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::D, MathLib::KelvinVector::inverse(), MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_2, MathLib::KelvinVector::kelvin_vector_dimensions(), OGS_FATAL, and sOdotS().

Referenced by calculatePlasticJacobian(), and calculatePlasticResidual().

◆ yieldFunction()

template<int DisplacementDim>
double MaterialLib::Solids::Ehlers::yieldFunction ( MaterialProperties const & mp,
PhysicalStressWithInvariants< DisplacementDim > const & s,
double const k )