OGS
Damage.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <spdlog/spdlog.h>
14
15#include <Eigen/Eigenvalues>
16
18
19namespace ProcessLib
20{
21namespace SmallDeformationNonlocal
22{
25inline double calculateDamage(double const kappa_d, double const alpha_d,
26 double const beta_d)
27{
28 double const damage = (1 - beta_d) * (1 - std::exp(-kappa_d / alpha_d));
29
30 if (damage < 0. || damage >= 1.)
31 {
32 OGS_FATAL("Damage value {:g} outside of [0,1) interval.", damage);
33 }
34
35 return damage;
36}
37
38template <int DisplacementDim, typename KelvinVectorType>
40 double const eps_p_eff_diff,
41 KelvinVectorType const& sigma,
42 double const kappa_d_prev,
43 double const h_d,
45{
46 // Default case of the rate problem. Updated below if volumetric plastic
47 // strain rate is positive (dilatancy).
48
49 // non-const for Eigen solver.
50 auto sigma_tensor = MathLib::KelvinVector::kelvinVectorToTensor(sigma);
51
52 Eigen::EigenSolver<decltype(sigma_tensor)> eigen_solver(sigma_tensor);
53 auto const principal_stress = real(eigen_solver.eigenvalues().array());
54 double const prod_stress = std::sqrt(principal_stress.square().sum());
55
56 // Brittleness decrease with confinement for the nonlinear flow rule.
57 // ATTENTION: For linear flow rule -> constant brittleness.
58 double const tensile_strength =
59 std::sqrt(3.0) * mp.kappa / (1 + std::sqrt(3.0) * mp.beta);
60 double const r_s = prod_stress / tensile_strength - 1.;
61
62 // Compute normalizing strain.
63 double const x_s = [](double const h_d, double const r_s)
64 {
65 if (r_s < 0)
66 {
67 return 1.;
68 }
69 if (r_s <= 1)
70 {
71 return 1. + h_d * r_s * r_s;
72 }
73 return 1. - 3 * h_d + 4 * h_d * std::sqrt(r_s);
74 }(h_d, r_s);
75
76 return kappa_d_prev + eps_p_eff_diff / x_s;
77}
78} // namespace SmallDeformationNonlocal
79} // namespace ProcessLib
#define OGS_FATAL(...)
Definition Error.h:26
Eigen::Matrix< double, 3, 3 > kelvinVectorToTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
double calculateDamage(double const kappa_d, double const alpha_d, double const beta_d)
Definition Damage.h:25
double calculateDamageKappaD(double const eps_p_eff_diff, KelvinVectorType const &sigma, double const kappa_d_prev, double const h_d, MaterialLib::Solids::Ehlers::MaterialProperties const &mp)
Definition Damage.h:39