OGS
CohesiveZoneModeI.cpp
Go to the documentation of this file.
1
10#include "CohesiveZoneModeI.h"
11
12#include "LogPenalty.h"
13#include "MathLib/MathTools.h"
14
15namespace MaterialLib
16{
17namespace Fracture
18{
20{
21namespace
22{
23double computeDamage(double const damage_prev,
24 double const w_n,
25 double const w_np,
26 double const w_nf)
27{
28 return std::min(
29 1.0,
30 std::max(damage_prev, std::max(0.0, (w_n - w_np)) / (w_nf - w_np)));
31}
32
33} // namespace
34
35template <int DisplacementDim>
37 double const t,
39 double const aperture0,
40 Eigen::Ref<Eigen::VectorXd const>
41 sigma0,
42 Eigen::Ref<Eigen::VectorXd const>
43 /*w_prev*/,
44 Eigen::Ref<Eigen::VectorXd const>
45 w,
46 Eigen::Ref<Eigen::VectorXd const>
47 /*sigma_prev*/,
48 Eigen::Ref<Eigen::VectorXd>
49 sigma,
50 Eigen::Ref<Eigen::MatrixXd>
51 C,
53 material_state_variables)
54{
55 assert(dynamic_cast<StateVariables<DisplacementDim> const*>(
56 &material_state_variables) != nullptr);
57
58 auto& state =
59 static_cast<StateVariables<DisplacementDim>&>(material_state_variables);
60 // reset damage in each iteration
62
63 auto const mp = evaluatedMaterialProperties(t, x);
64
65 C.setZero();
66
67 // Separately compute shear and normal stresses because of the penalty for
68 // the normal component.
69 const int index_ns = DisplacementDim - 1;
70 double const w_n = w[index_ns];
71 for (int i = 0; i < index_ns; i++)
72 {
73 C(i, i) = mp.Ks;
74 }
75
76 sigma.noalias() = C * w;
77
78 double const aperture = w_n + aperture0;
79
80 sigma.coeffRef(index_ns) =
81 mp.Kn * w_n * logPenalty(aperture0, aperture, _penalty_aperture_cutoff);
82
83 C(index_ns, index_ns) =
84 mp.Kn *
85 logPenaltyDerivative(aperture0, aperture, _penalty_aperture_cutoff);
86
87 sigma.noalias() += sigma0;
88
89 // Exit if fracture is closing
90 if (sigma[index_ns] < 0)
91 {
92 return;
93 }
94
95 //
96 // Continue with fracture opening.
97 //
98 // effective opening calculated by shift to state corresponding to sigma0=0
99 const double w_n_effective = w_n + sigma0[index_ns] / mp.Kn;
100 double degradation = 0.0;
101 if (mp.w_nf == 0.0) // can be used to model tension-cutoff
102 {
103 state.damage_prev = 1.0;
104 state.damage = 1.0;
105 }
106 else
107 {
108 state.damage =
109 computeDamage(state.damage_prev, w_n_effective, mp.w_np, mp.w_nf);
110 degradation = ((1 - state.damage) * mp.w_np) /
111 (mp.w_np + state.damage * (mp.w_nf - mp.w_np));
112 }
113
114 // Degrade stiffness tensor in tension.
115 C = C * degradation;
116 // Create effective relative displacement vector
117 Eigen::VectorXd w_eff = w;
118 // Only origin of normal entry is shifted, shear unaffected
119 w_eff[index_ns] = w_n_effective;
120 sigma = C * w_eff;
121
122 if (state.damage > state.damage_prev)
123 {
124 // If damage is increasing, provide extension to consistent tangent.
125
126 Eigen::Matrix<double, DisplacementDim, 1> dd_dw =
127 Eigen::Matrix<double, DisplacementDim, 1>::Zero();
128
129 double const tmp = mp.w_np + state.damage * (mp.w_nf - mp.w_np);
130 dd_dw[index_ns] =
131 (mp.w_np * mp.w_nf) / ((mp.w_nf - mp.w_np) * (tmp * tmp));
132
133 C -= C * w_eff * (dd_dw).transpose();
134 }
135
136 // TODO (nagel) Initial stress not considered, yet.
137 // sigma.noalias() += sigma0;
138}
139
140template class CohesiveZoneModeI<2>;
141template class CohesiveZoneModeI<3>;
142
143} // namespace CohesiveZoneModeI
144} // namespace Fracture
145} // namespace MaterialLib
void computeConstitutiveRelation(double const t, ParameterLib::SpatialPosition const &x, double const aperture0, Eigen::Ref< Eigen::VectorXd const > sigma0, Eigen::Ref< Eigen::VectorXd const > w_prev, Eigen::Ref< Eigen::VectorXd const > w, Eigen::Ref< Eigen::VectorXd const > sigma_prev, Eigen::Ref< Eigen::VectorXd > sigma, Eigen::Ref< Eigen::MatrixXd > C, typename FractureModelBase< DisplacementDim >::MaterialStateVariables &material_state_variables) override
double computeDamage(double const damage_prev, double const w_n, double const w_np, double const w_nf)
double logPenalty(double const aperture0, double const aperture, double const aperture_cutoff)
Definition LogPenalty.h:49
double logPenaltyDerivative(double const aperture0, double const aperture, double const aperture_cutoff)
Definition LogPenalty.h:23