OGS
MaterialLib::Solids::Ehlers Namespace Reference

Classes

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

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>
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 38 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 414 of file Ehlers.cpp.

416 {
417  static int const KelvinVectorSize =
420 
421  auto const& P_dev = Invariants::deviatoric_projection;
422  auto const& P_sph = Invariants::spherical_projection;
423  auto const& I =
425 
426  return -2. * I * P_dev - 3. * K / G * I * P_sph;
427 }
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Definition: KelvinVector.h:23
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
Definition: KelvinVector.h:56

References MathLib::KelvinVector::kelvin_vector_dimensions().

◆ calculateIsotropicHardening()

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

Definition at line 429 of file Ehlers.cpp.

432 {
433  return kappa * (1. + eps_p_eff * hardening_coefficient);
434 }

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 217 of file Ehlers.cpp.

222 {
223  static int const KelvinVectorSize =
226  using KelvinVector =
228  using KelvinMatrix =
230 
231  auto const& P_dev = Invariants::deviatoric_projection;
232  auto const& identity2 = Invariants::identity2;
233 
234  double const theta = s.J_3 / (s.J_2 * std::sqrt(s.J_2));
235  OnePlusGamma_pTheta const one_gt{mp.gamma_p, theta, mp.m_p};
236 
237  // inverse of deviatoric stress tensor
238  if (Invariants::determinant(s.D) == 0)
239  {
240  OGS_FATAL("Determinant is zero. Matrix is non-invertable.");
241  }
242  // inverse of sigma_D
243  KelvinVector const sigma_D_inverse = MathLib::KelvinVector::inverse(s.D);
244  KelvinVector const sigma_D_inverse_D = P_dev * sigma_D_inverse;
245 
246  KelvinVector const dtheta_dsigma =
247  theta * sigma_D_inverse_D - 3. / 2. * theta / s.J_2 * s.D;
248 
249  // deviatoric flow
250  double const sqrtPhi = std::sqrt(
251  s.J_2 * one_gt.pow_m_p + mp.alpha_p / 2. * boost::math::pow<2>(s.I_1) +
252  boost::math::pow<2>(mp.delta_p) * boost::math::pow<4>(s.I_1));
253  KelvinVector const flow_D = plasticFlowDeviatoricPart(
254  s, one_gt, sqrtPhi, dtheta_dsigma, mp.gamma_p, mp.m_p);
255  KelvinVector const lambda_flow_D = lambda * flow_D;
256 
257  typename SolidEhlers<DisplacementDim>::JacobianMatrix jacobian =
258  SolidEhlers<DisplacementDim>::JacobianMatrix::Zero();
259 
260  // G_11
261  jacobian.template block<KelvinVectorSize, KelvinVectorSize>(0, 0)
262  .noalias() = KelvinMatrix::Identity();
263 
264  // G_12
265  jacobian
266  .template block<KelvinVectorSize, KelvinVectorSize>(0, KelvinVectorSize)
267  .noalias() = 2 * KelvinMatrix::Identity();
268 
269  // G_13
270  jacobian.template block<KelvinVectorSize, 1>(0, 2 * KelvinVectorSize)
271  .noalias() = mp.K / mp.G * identity2;
272 
273  // G_14 and G_15 are zero
274 
275  // G_21 -- derivative of deviatoric flow
276 
277  double const gm_p = mp.gamma_p * mp.m_p;
278  // intermediate variable for derivative of deviatoric flow
279  KelvinVector const M0 = s.J_2 / one_gt.value * dtheta_dsigma;
280  // derivative of Phi w.r.t. sigma
281  KelvinVector const dPhi_dsigma =
282  one_gt.pow_m_p * (s.D + gm_p * M0) +
283  (mp.alpha_p * s.I_1 +
284  4 * boost::math::pow<2>(mp.delta_p) * boost::math::pow<3>(s.I_1)) *
285  identity2;
286 
287  // intermediate variable for derivative of deviatoric flow
288  KelvinMatrix const M1 =
289  one_gt.pow_m_p *
290  (s.D * dPhi_dsigma.transpose() + gm_p * M0 * dPhi_dsigma.transpose());
291  // intermediate variable for derivative of deviatoric flow
292  KelvinMatrix const M2 =
293  one_gt.pow_m_p * (P_dev + s.D * gm_p * M0.transpose());
294  // second derivative of theta
295  KelvinMatrix const d2theta_dsigma2 =
296  theta * P_dev * sOdotS<DisplacementDim>(sigma_D_inverse) * P_dev +
297  sigma_D_inverse_D * dtheta_dsigma.transpose() -
298  3. / 2. * theta / s.J_2 * P_dev -
299  3. / 2. * dtheta_dsigma / s.J_2 * s.D.transpose() +
300  3. / 2. * theta / boost::math::pow<2>(s.J_2) * s.D * s.D.transpose();
301 
302  // intermediate variable for derivative of deviatoric flow
303  KelvinMatrix const M3 =
304  gm_p * one_gt.pow_m_p1 *
305  ((s.D + (gm_p - mp.gamma_p) * M0) * dtheta_dsigma.transpose() +
306  s.J_2 * d2theta_dsigma2);
307 
308  // derivative of flow_D w.r.t. sigma
309  KelvinMatrix const dflow_D_dsigma =
310  (-M1 / (4 * boost::math::pow<3>(sqrtPhi)) + (M2 + M3) / (2 * sqrtPhi)) *
311  mp.G;
312  jacobian
313  .template block<KelvinVectorSize, KelvinVectorSize>(KelvinVectorSize, 0)
314  .noalias() = -lambda * dflow_D_dsigma;
315 
316  // G_22
317  jacobian
318  .template block<KelvinVectorSize, KelvinVectorSize>(KelvinVectorSize,
319  KelvinVectorSize)
320  .noalias() = KelvinMatrix::Identity() / dt;
321 
322  // G_23 and G_24 are zero
323 
324  // G_25
325  jacobian
326  .template block<KelvinVectorSize, 1>(KelvinVectorSize,
327  2 * KelvinVectorSize + 2)
328  .noalias() = -flow_D;
329 
330  // G_31
331  {
332  // derivative of flow_V w.r.t. sigma
333  KelvinVector const dflow_V_dsigma =
334  3 * mp.G *
335  (-(mp.alpha_p * s.I_1 + 4 * boost::math::pow<2>(mp.delta_p) *
336  boost::math::pow<3>(s.I_1)) /
337  (4 * boost::math::pow<3>(sqrtPhi)) * dPhi_dsigma +
338  (mp.alpha_p * identity2 +
339  12 * boost::math::pow<2>(mp.delta_p * s.I_1) * identity2) /
340  (2 * sqrtPhi) +
341  2 * mp.epsilon_p * identity2);
342 
343  jacobian.template block<1, KelvinVectorSize>(2 * KelvinVectorSize, 0)
344  .noalias() = -lambda * dflow_V_dsigma.transpose();
345  }
346 
347  // G_32 is zero
348 
349  // G_33
350  jacobian(2 * KelvinVectorSize, 2 * KelvinVectorSize) = 1. / dt;
351 
352  // G_34 is zero
353 
354  // G_35
355  {
356  double const flow_V = plasticFlowVolumetricPart<DisplacementDim>(
357  s, sqrtPhi, mp.alpha_p, mp.beta_p, mp.delta_p, mp.epsilon_p);
358  jacobian(2 * KelvinVectorSize, 2 * KelvinVectorSize + 2) = -flow_V;
359  }
360 
361  // increment of effectiv plastic strain
362  double const eff_flow =
363  std::sqrt(2. / 3. * lambda_flow_D.transpose() * lambda_flow_D);
364 
365  if (eff_flow > 0)
366  {
367  // intermediate variable for derivative of plastic jacobian
368  KelvinVector const eff_flow23_lambda_flow_D =
369  -2 / 3. / eff_flow * lambda_flow_D;
370  // G_41
371  jacobian
372  .template block<1, KelvinVectorSize>(2 * KelvinVectorSize + 1, 0)
373  .noalias() = lambda * dflow_D_dsigma * eff_flow23_lambda_flow_D;
374  // G_45
375  jacobian(2 * KelvinVectorSize + 1, 2 * KelvinVectorSize + 2) =
376  eff_flow23_lambda_flow_D.transpose() * flow_D;
377  }
378 
379  // G_42 and G_43 are zero
380 
381  // G_44
382  jacobian(2 * KelvinVectorSize + 1, 2 * KelvinVectorSize + 1) = 1. / dt;
383 
384  // G_51
385  {
386  double const one_gt_pow_m = std::pow(one_gt.value, mp.m);
387  double const gm = mp.gamma * mp.m;
388  // derivative of yield function w.r.t. sigma
389  KelvinVector const dF_dsigma =
390  mp.G *
391  (one_gt_pow_m * (s.D + gm * M0) +
392  (mp.alpha * s.I_1 + 4 * boost::math::pow<2>(mp.delta) *
393  boost::math::pow<3>(s.I_1)) *
394  identity2) /
395  (2. * sqrtPhi) +
396  mp.G * (mp.beta + 2 * mp.epsilon_p * s.I_1) * identity2;
397 
398  jacobian
399  .template block<1, KelvinVectorSize>(2 * KelvinVectorSize + 2, 0)
400  .noalias() = dF_dsigma.transpose() / mp.G;
401  }
402 
403  // G_54
404  jacobian(2 * KelvinVectorSize + 2, 2 * KelvinVectorSize + 1) =
405  -mp.kappa * mp.hardening_coefficient / mp.G;
406 
407  // G_52, G_53, G_55 are zero
408  return jacobian;
409 }
#define OGS_FATAL(...)
Definition: Error.h:26
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:122
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Definition: KelvinVector.h:48
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::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, MathLib::KelvinVector::inverse(), 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, OGS_FATAL, and plasticFlowDeviatoricPart().

◆ 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 152 of file Ehlers.cpp.

164 {
165  static int const KelvinVectorSize =
168  using KelvinVector =
170 
171  auto const& P_dev = Invariants::deviatoric_projection;
172  auto const& identity2 = Invariants::identity2;
173 
174  double const theta = s.J_3 / (s.J_2 * std::sqrt(s.J_2));
175 
176  typename SolidEhlers<DisplacementDim>::ResidualVectorType residual;
177  // calculate stress residual
178  residual.template segment<KelvinVectorSize>(0).noalias() =
179  s.value / mp.G - 2 * (eps_D - eps_p_D) -
180  mp.K / mp.G * (eps_V - eps_p_V) * identity2;
181 
182  // deviatoric plastic strain
183  KelvinVector const sigma_D_inverse_D =
184  P_dev * MathLib::KelvinVector::inverse(s.D);
185  KelvinVector const dtheta_dsigma =
186  theta * sigma_D_inverse_D - 3. / 2. * theta / s.J_2 * s.D;
187 
188  OnePlusGamma_pTheta const one_gt{mp.gamma_p, theta, mp.m_p};
189  double const sqrtPhi = std::sqrt(
190  s.J_2 * one_gt.pow_m_p + mp.alpha_p / 2. * boost::math::pow<2>(s.I_1) +
191  boost::math::pow<2>(mp.delta_p) * boost::math::pow<4>(s.I_1));
192  KelvinVector const flow_D = plasticFlowDeviatoricPart(
193  s, one_gt, sqrtPhi, dtheta_dsigma, mp.gamma_p, mp.m_p);
194  KelvinVector const lambda_flow_D = lambda * flow_D;
195 
196  residual.template segment<KelvinVectorSize>(KelvinVectorSize).noalias() =
197  eps_p_D_dot - lambda_flow_D;
198 
199  // plastic volume strain
200  {
201  double const flow_V = plasticFlowVolumetricPart<DisplacementDim>(
202  s, sqrtPhi, mp.alpha_p, mp.beta_p, mp.delta_p, mp.epsilon_p);
203  residual(2 * KelvinVectorSize, 0) = eps_p_V_dot - lambda * flow_V;
204  }
205 
206  // evolution of plastic equivalent strain
207  residual(2 * KelvinVectorSize + 1) =
208  eps_p_eff_dot -
209  std::sqrt(2. / 3. * lambda_flow_D.transpose() * lambda_flow_D);
210 
211  // yield function (for plastic multiplier)
212  residual(2 * KelvinVectorSize + 2) = yieldFunction(mp, s, k) / mp.G;
213  return residual;
214 }
double yieldFunction(MaterialProperties const &mp, PhysicalStressWithInvariants< DisplacementDim > const &s, double const k)
Definition: Ehlers.cpp:134

References MaterialLib::Solids::Ehlers::MaterialProperties::alpha_p, MaterialLib::Solids::Ehlers::MaterialProperties::beta_p, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::D, 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, MathLib::KelvinVector::inverse(), 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(), MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::value, and yieldFunction().

◆ 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 23 of file CreateEhlers.h.

26 {
28  auto& alpha_d =
29  ParameterLib::findParameter<double>(config, "alpha_d", parameters, 1);
30 
31  DBUG("Use '{:s}' as alpha_d.", alpha_d.name);
32 
34  auto& beta_d =
35  ParameterLib::findParameter<double>(config, "beta_d", parameters, 1);
36 
37  DBUG("Use '{:s}' as beta_d.", beta_d.name);
38 
40  auto& h_d =
41  ParameterLib::findParameter<double>(config, "h_d", parameters, 1);
42 
43  DBUG("Use '{:s}' as h_d.", h_d.name);
44 
45  return std::make_unique<DamagePropertiesParameters>(
46  DamagePropertiesParameters{alpha_d, beta_d, h_d});
47 }
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27

References DBUG().

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 50 of file CreateEhlers.h.

53 {
55  config.checkConfigParameter("type", "Ehlers");
56  DBUG("Create Ehlers material");
57 
59  auto& shear_modulus = ParameterLib::findParameter<double>(
60  config, "shear_modulus", parameters, 1);
61 
62  DBUG("Use '{:s}' as shear modulus parameter.", shear_modulus.name);
63 
65  auto& bulk_modulus = ParameterLib::findParameter<double>(
66  config, "bulk_modulus", parameters, 1);
67 
68  DBUG("Use '{:s}' as bulk modulus parameter.", bulk_modulus.name);
69 
71  auto& kappa =
72  ParameterLib::findParameter<double>(config, "kappa", parameters, 1);
73 
74  DBUG("Use '{:s}' as kappa.", kappa.name);
75 
77  auto& beta =
78  ParameterLib::findParameter<double>(config, "beta", parameters, 1);
79 
80  DBUG("Use '{:s}' as beta.", beta.name);
81 
83  auto& gamma =
84  ParameterLib::findParameter<double>(config, "gamma", parameters, 1);
85 
86  DBUG("Use '{:s}' as gamma.", gamma.name);
87 
89  auto& hardening_modulus = ParameterLib::findParameter<double>(
90  config, "hardening_modulus", parameters, 1);
91 
92  DBUG("Use '{:s}' as hardening modulus parameter.", hardening_modulus.name);
93 
95  auto& alpha =
96  ParameterLib::findParameter<double>(config, "alpha", parameters, 1);
97 
98  DBUG("Use '{:s}' as alpha.", alpha.name);
99 
101  auto& delta =
102  ParameterLib::findParameter<double>(config, "delta", parameters, 1);
103 
104  DBUG("Use '{:s}' as delta.", delta.name);
105 
107  auto& eps =
108  ParameterLib::findParameter<double>(config, "eps", parameters, 1);
109 
110  DBUG("Use '{:s}' as eps.", eps.name);
111 
113  auto& m = ParameterLib::findParameter<double>(config, "m", parameters, 1);
114 
115  DBUG("Use '{:s}' as m.", m.name);
116 
118  auto& alphap =
119  ParameterLib::findParameter<double>(config, "alphap", parameters, 1);
120 
121  DBUG("Use '{:s}' as alphap.", alphap.name);
122 
124  auto& deltap =
125  ParameterLib::findParameter<double>(config, "deltap", parameters, 1);
126 
127  DBUG("Use '{:s}' as deltap.", deltap.name);
128 
130  auto& epsp =
131  ParameterLib::findParameter<double>(config, "epsp", parameters, 1);
132 
133  DBUG("Use '{:s}' as epsp.", epsp.name);
134 
136  auto& paremeter_mp =
137  ParameterLib::findParameter<double>(config, "mp", parameters, 1);
138 
139  DBUG("Use '{:s}' as mp.", paremeter_mp.name);
140 
142  auto& betap =
143  ParameterLib::findParameter<double>(config, "betap", parameters, 1);
144 
145  DBUG("Use '{:s}' as betap.", betap.name);
146 
148  auto& gammap =
149  ParameterLib::findParameter<double>(config, "gammap", parameters, 1);
150 
151  DBUG("Use '{:s}' as gammap.", gammap.name);
152 
153  auto tangent_type =
155  makeTangentType(config.getConfigParameter<std::string>("tangent_type"));
156 
157  MaterialPropertiesParameters mp{
158  shear_modulus, bulk_modulus, alpha, beta,
159  gamma, delta, eps, m,
160  alphap, betap, gammap, deltap,
161  epsp, paremeter_mp, kappa, hardening_modulus};
162 
163  // Damage properties.
164  std::unique_ptr<DamagePropertiesParameters> ehlers_damage_properties;
165 
166  auto const& ehlers_damage_config =
168  config.getConfigSubtreeOptional("damage_properties");
169  if (ehlers_damage_config)
170  {
171  ehlers_damage_properties =
172  createDamageProperties(parameters, *ehlers_damage_config);
173  }
174 
175  auto const& nonlinear_solver_config =
177  config.getConfigSubtree("nonlinear_solver");
178  auto const nonlinear_solver_parameters =
179  NumLib::createNewtonRaphsonSolverParameters(nonlinear_solver_config);
180 
181  return std::make_unique<SolidEhlers<DisplacementDim>>(
182  nonlinear_solver_parameters,
183  mp,
184  std::move(ehlers_damage_properties),
185  tangent_type);
186 }
std::unique_ptr< DamagePropertiesParameters > createDamageProperties(std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, BaseLib::ConfigTree const &config)
Definition: CreateEhlers.h:23
TangentType makeTangentType(std::string const &s)
Definition: Ehlers.h:44
NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(BaseLib::ConfigTree const &config)

References MaterialPropertyLib::alpha, MaterialPropertyLib::beta, MaterialPropertyLib::bulk_modulus, BaseLib::ConfigTree::checkConfigParameter(), createDamageProperties(), NumLib::createNewtonRaphsonSolverParameters(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeOptional(), and makeTangentType().

◆ makeTangentType()

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

Definition at line 44 of file Ehlers.h.

45 {
46  if (s == "Elastic")
47  {
48  return TangentType::Elastic;
49  }
50  if (s == "PlasticDamageSecant")
51  {
52  return TangentType::PlasticDamageSecant;
53  }
54  if (s == "Plastic")
55  {
56  return TangentType::Plastic;
57  }
58  OGS_FATAL("Not valid string '{:s}' to create a tangent type from.", s);
59 }

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 109 of file Ehlers.cpp.

113 {
114  return 3 *
115  (alpha_p * s.I_1 +
116  4 * boost::math::pow<2>(delta_p) * boost::math::pow<3>(s.I_1)) /
117  (2 * sqrtPhi) +
118  3 * beta_p + 6 * epsilon_p * s.I_1;
119 }

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

◆ 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 437 of file Ehlers.cpp.

443 {
444  static int const KelvinVectorSize =
447  auto const& P_dev = Invariants::deviatoric_projection;
448 
449  // dimensionless initial hydrostatic pressure
450  double const pressure_prev = Invariants::trace(sigma_prev) / (-3. * G);
451  // initial strain invariant
452  double const e_prev = Invariants::trace(eps_prev);
453  // dimensioness hydrostatic stress increment
454  double const pressure = pressure_prev - K / G * (eps_V - e_prev);
455  // dimensionless deviatoric initial stress
456  typename SolidEhlers<DisplacementDim>::KelvinVector const sigma_D_prev =
457  P_dev * sigma_prev / G;
458  // dimensionless deviatoric stress
459  typename SolidEhlers<DisplacementDim>::KelvinVector const sigma_D =
460  sigma_D_prev + 2 * P_dev * (eps - eps_prev);
461  return sigma_D - pressure * Invariants::identity2;
462 }

References MathLib::KelvinVector::kelvin_vector_dimensions().

◆ 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} \).

◆ sOdotS< 2 >()

Definition at line 843 of file Ehlers.cpp.

886 {
888 
889  result(0, 0) = v(0) * v(0);
890  result(0, 1) = result(1, 0) = v(3) * v(3) / 2.;
891  result(0, 2) = result(2, 0) = 0;
892  result(0, 3) = result(3, 0) = v(0) * v(3);
893 
894  result(1, 1) = v(1) * v(1);
895  result(1, 2) = result(2, 1) = 0;
896  result(1, 3) = result(3, 1) = v(3) * v(1);
897 
898  result(2, 2) = v(2) * v(2);
899  result(2, 3) = result(3, 2) = 0;
900 
901  result(3, 3) = v(0) * v(1) + v(3) * v(3) / 2.;
902 
903  return result;
904 }

◆ sOdotS< 3 >()

Definition at line 843 of file Ehlers.cpp.

848 {
850 
851  result(0, 0) = v(0) * v(0);
852  result(0, 1) = result(1, 0) = v(3) * v(3) / 2.;
853  result(0, 2) = result(2, 0) = v(5) * v(5) / 2.;
854  result(0, 3) = result(3, 0) = v(0) * v(3);
855  result(0, 4) = result(4, 0) = v(3) * v(5) / std::sqrt(2.);
856  result(0, 5) = result(5, 0) = v(0) * v(5);
857 
858  result(1, 1) = v(1) * v(1);
859  result(1, 2) = result(2, 1) = v(4) * v(4) / 2.;
860  result(1, 3) = result(3, 1) = v(3) * v(1);
861  result(1, 4) = result(4, 1) = v(1) * v(4);
862  result(1, 5) = result(5, 1) = v(3) * v(4) / std::sqrt(2.);
863 
864  result(2, 2) = v(2) * v(2);
865  result(2, 3) = result(3, 2) = v(5) * v(4) / std::sqrt(2.);
866  result(2, 4) = result(4, 2) = v(4) * v(2);
867  result(2, 5) = result(5, 2) = v(5) * v(2);
868 
869  result(3, 3) = v(0) * v(1) + v(3) * v(3) / 2.;
870  result(3, 4) = result(4, 3) =
871  v(3) * v(4) / 2. + v(5) * v(1) / std::sqrt(2.);
872  result(3, 5) = result(5, 3) =
873  v(0) * v(4) / std::sqrt(2.) + v(3) * v(5) / 2.;
874 
875  result(4, 4) = v(1) * v(2) + v(4) * v(4) / 2.;
876  result(4, 5) = result(5, 4) =
877  v(3) * v(2) / std::sqrt(2.) + v(5) * v(4) / 2.;
878 
879  result(5, 5) = v(0) * v(2) + v(5) * v(5) / 2.;
880  return result;
881 }

◆ 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 468 of file Ehlers.cpp.

469 {
470  static auto const size = KelvinVector::SizeAtCompileTime;
471  return std::forward_as_tuple(
472  solution.template segment<size>(size * 0),
473  PlasticStrain<KelvinVector>{solution.template segment<size>(size * 1),
474  solution[size * 2], solution[size * 2 + 1]},
475  solution[size * 2 + 2]);
476 }

◆ yieldFunction()

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

Definition at line 134 of file Ehlers.cpp.

137 {
138  double const I_1_squared = boost::math::pow<2>(s.I_1);
139  assert(s.J_2 != 0);
140 
141  return std::sqrt(s.J_2 * std::pow(1 + mp.gamma * s.J_3 /
142  (s.J_2 * std::sqrt(s.J_2)),
143  mp.m) +
144  mp.alpha / 2. * I_1_squared +
145  boost::math::pow<2>(mp.delta) *
146  boost::math::pow<2>(I_1_squared)) +
147  mp.beta * s.I_1 + mp.epsilon * I_1_squared - k;
148 }

References MaterialLib::Solids::Ehlers::MaterialProperties::alpha, MaterialLib::Solids::Ehlers::MaterialProperties::beta, MaterialLib::Solids::Ehlers::MaterialProperties::delta, MaterialLib::Solids::Ehlers::MaterialProperties::epsilon, MaterialLib::Solids::Ehlers::MaterialProperties::gamma, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::I_1, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_2, MaterialLib::Solids::Ehlers::PhysicalStressWithInvariants< DisplacementDim >::J_3, and MaterialLib::Solids::Ehlers::MaterialProperties::m.

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