OGS
FractureModels/LinearElasticIsotropic.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
6#include "LogPenalty.h"
7
8namespace MaterialLib
9{
10namespace Fracture
11{
12template <int DisplacementDim>
14 double const t,
16 double const aperture0,
17 Eigen::Ref<Eigen::VectorXd const>
18 sigma0,
19 Eigen::Ref<Eigen::VectorXd const>
20 /*w_prev*/,
21 Eigen::Ref<Eigen::VectorXd const>
22 w,
23 Eigen::Ref<Eigen::VectorXd const>
24 /*sigma_prev*/,
25 Eigen::Ref<Eigen::VectorXd>
26 sigma,
27 Eigen::Ref<Eigen::MatrixXd>
28 C,
30 material_state_variables)
31{
32 material_state_variables.reset();
33
34 const int index_ns = DisplacementDim - 1;
35 C.setZero();
36 for (int i = 0; i < index_ns; i++)
37 {
38 C(i, i) = _mp.shear_stiffness(t, x)[0];
39 }
40
41 sigma.noalias() = C * w;
42
43 double const aperture = w[index_ns] + aperture0;
44
45 sigma.coeffRef(index_ns) =
46 _mp.normal_stiffness(t, x)[0] * w[index_ns] *
47 logPenalty(aperture0, aperture, _penalty_aperture_cutoff);
48
49 C(index_ns, index_ns) =
50 _mp.normal_stiffness(t, x)[0] *
52
53 sigma.noalias() += sigma0;
54
55 // correction for an opening fracture
56 if (_tension_cutoff && sigma[index_ns] > 0)
57 {
58 C.setZero();
59 sigma.setZero();
60 material_state_variables.setTensileStress(true);
61 }
62}
63
64template class LinearElasticIsotropic<2>;
65template class LinearElasticIsotropic<3>;
66
67} // namespace Fracture
68} // 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 logPenalty(double const aperture0, double const aperture, double const aperture_cutoff)
Definition LogPenalty.h:43
double logPenaltyDerivative(double const aperture0, double const aperture, double const aperture_cutoff)
Definition LogPenalty.h:17