62 double const degradation,
double const bulk_modulus,
double const mu,
65 static int const KelvinVectorSize =
73 auto const& P_dev = Invariants::deviatoric_projection;
74 KelvinVector
const epsd_curr = P_dev * eps;
77 double const eps_curr_trace = Invariants::trace(eps);
79 KelvinMatrix C_tensile = KelvinMatrix::Zero();
80 KelvinMatrix C_compressive = KelvinMatrix::Zero();
82 auto strain_energy_computation_vol = [&](
auto&& macaulay)
84 auto macaulay_squared = [&macaulay](
double x)
85 {
return boost::math::pow<2>(macaulay(x)); };
86 return bulk_modulus / 2 * macaulay_squared(eps_curr_trace);
89 auto stress_computation_vol = [&](
auto&& macaulay)
90 {
return bulk_modulus * macaulay(eps_curr_trace) * Invariants::identity2; };
92 auto hs = [&](
double const v) {
return heaviside(v); };
98 double const strain_energy_tensile = strain_energy_computation_vol(mt) +
99 mu * epsd_curr.transpose() * epsd_curr;
101 KelvinVector
const sigma_tensile =
102 stress_computation_vol(mt) + 2 * mu * epsd_curr;
104 KelvinVector
const sigma_compressive = stress_computation_vol(mc);
106 C_tensile.template topLeftCorner<3, 3>().setConstant(bulk_modulus *
108 C_tensile.noalias() += 2 * mu * P_dev * KelvinMatrix::Identity();
110 C_compressive.template topLeftCorner<3, 3>().setConstant(
111 bulk_modulus * (1 - hs(eps_curr_trace)));
113 double const elastic_energy =
114 bulk_modulus / 2 * eps_curr_trace * eps_curr_trace +
115 mu * epsd_curr.transpose() * epsd_curr;
116 KelvinVector
const sigma_real =
117 degradation * sigma_tensile + sigma_compressive;
119 KelvinMatrix
const D = degradation * C_tensile + C_compressive;
121 return std::make_tuple(sigma_real, sigma_tensile, D, strain_energy_tensile,
122 elastic_energy, C_tensile, C_compressive);
139 double const degradation,
140 double const bulk_modulus,
144 static int const KelvinVectorSize =
152 auto const& P_dev = Invariants::deviatoric_projection;
153 KelvinVector
const epsd_curr = P_dev * eps;
156 double const eps_curr_trace = Invariants::trace(eps);
158 KelvinMatrix C_tensile = KelvinMatrix::Zero();
159 KelvinMatrix C_compressive = KelvinMatrix::Zero();
161 double const strain_energy_tensile =
162 bulk_modulus / 2 * eps_curr_trace * eps_curr_trace +
163 mu * epsd_curr.transpose() * epsd_curr;
164 double const elastic_energy = degradation * strain_energy_tensile;
165 KelvinVector
const sigma_tensile =
166 bulk_modulus * eps_curr_trace * Invariants::identity2 +
168 C_tensile.template topLeftCorner<3, 3>().setConstant(bulk_modulus);
169 C_tensile.noalias() += 2 * mu * P_dev * KelvinMatrix::Identity();
170 KelvinVector
const sigma_real = degradation * sigma_tensile;
172 KelvinMatrix
const D = degradation * C_tensile + C_compressive;
174 return std::make_tuple(sigma_real, sigma_tensile, D, strain_energy_tensile,
175 elastic_energy, C_tensile, C_compressive);
192 double const degradation,
193 double const bulk_modulus,
197 static int const KelvinVectorSize =
205 auto const& P_dev = Invariants::deviatoric_projection;
206 KelvinVector
const epsd_curr = P_dev * eps;
209 double const eps_curr_trace = Invariants::trace(eps);
211 KelvinMatrix C_tensile = KelvinMatrix::Zero();
212 KelvinMatrix C_compressive = KelvinMatrix::Zero();
214 KelvinVector
const sigma_tensile =
215 bulk_modulus * eps_curr_trace * Invariants::identity2 +
220 Eigen::SelfAdjointEigenSolver<
decltype(sigma_tensor)>
221 selfAdjoint_eigen_solver(sigma_tensor);
222 double const max_principle_stress =
223 selfAdjoint_eigen_solver
227 double const E0 = 9.0 * mu * bulk_modulus / (3.0 * bulk_modulus + mu);
228 auto hs = [&](
double const v) {
return heaviside(v); };
230 double const strain_energy_tensile = 0.5 * max_principle_stress *
231 max_principle_stress *
232 hs(max_principle_stress) / E0;
233 double const elastic_energy =
234 degradation * (bulk_modulus / 2 * eps_curr_trace * eps_curr_trace +
235 mu * epsd_curr.transpose() * epsd_curr);
237 C_tensile.template topLeftCorner<3, 3>().setConstant(bulk_modulus);
238 C_tensile.noalias() += 2 * mu * P_dev * KelvinMatrix::Identity();
239 KelvinVector
const sigma_real = degradation * sigma_tensile;
241 KelvinMatrix
const D = degradation * C_tensile + C_compressive;
242 return std::make_tuple(sigma_real, sigma_tensile, D, strain_energy_tensile,
243 elastic_energy, C_tensile, C_compressive);