OGS
PhaseFieldProcessData.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <Eigen/Core>
14#include <memory>
15#include <utility>
16
20
21namespace MaterialLib
22{
23namespace Solids
24{
25template <int DisplacementDim>
26struct MechanicsBase;
27}
28} // namespace MaterialLib
29namespace ProcessLib
30{
31template <typename T>
32struct Parameter;
33
34namespace PhaseField
35{
37{
38 AT1,
39 AT2,
41};
42
44{
45 Linear,
47};
48
57
59{
60public:
61 virtual ~DegradationDerivative() = default;
62 virtual double degradation(double const d_ip,
63 double const k,
64 double const ls) = 0; /* degradation_df0 */
65 virtual double degradation_df1(double const d_ip, double const ls) = 0;
66 virtual double degradation_df2(double const d_ip, double const ls) = 0;
67};
68
70{
71public:
72 double degradation(double const d_ip,
73 double const k,
74 double const /* ls */) override
75 {
76 return d_ip * d_ip * (1. - k) + k;
77 };
78 double degradation_df1(double const d_ip, double const /* ls */) override
79 {
80 return 2. * d_ip;
81 };
82 double degradation_df2(double const /* d_ip */,
83 double const /* ls */) override
84 {
85 return 2.;
86 };
87};
88
90{
91private:
92 double const lch;
94
95public:
96 COHESIVE_DegradationDerivative(double const Parameter_lch,
97 SofteningCurve Parameter_softening_curve)
98 : lch(Parameter_lch), softening_curve(Parameter_softening_curve){};
99 double degradation(double const d_ip,
100 double const k,
101 double const ls) override
102 {
103 double const m1 = 4.0 * lch / acos(-1.) / ls;
104 switch (softening_curve)
105 {
107 {
108 double const m2 = std::pow(2., 5. / 3.) - 3.;
109 double const n = 2.5;
110 return std::pow(d_ip, n) /
111 (std::pow(d_ip, n) +
112 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip))) *
113 (1.0 - k) +
114 k;
115 }
116 default:
117 {
118 double const m2 = -0.5;
119 double const n = 2.;
120 return std::pow(d_ip, n) /
121 (std::pow(d_ip, n) +
122 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip))) *
123 (1. - k) +
124 k;
125 }
126 }
127 };
128 double degradation_df1(double const d_ip, double const ls) override
129 {
130 double const m1 = 4.0 * lch / acos(-1.) / ls;
131 switch (softening_curve)
132 {
134 {
135 double const m2 = std::pow(2., 5. / 3.) - 3.;
136 double const n = 2.5;
137 double const a1 = std::pow(d_ip, n) +
138 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip));
139 double const a2 = n * std::pow(d_ip, n - 1.) -
140 2. * m1 * m2 * (1. - d_ip) - m1;
141 return (n * std::pow(d_ip, n - 1.) * a1 -
142 std::pow(d_ip, n) * a2) /
143 (a1 * a1);
144 }
145 default:
146 {
147 double const m2 = -0.5;
148 double const n = 2.;
149 double const a1 = std::pow(d_ip, n) +
150 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip));
151 double const a2 = n * std::pow(d_ip, n - 1.) -
152 2. * m1 * m2 * (1. - d_ip) - m1;
153 return (n * std::pow(d_ip, n - 1.) * a1 -
154 std::pow(d_ip, n) * a2) /
155 (a1 * a1);
156 }
157 }
158 };
159 double degradation_df2(double const d_ip, double const ls) override
160 {
161 double const m1 = 4.0 * lch / acos(-1.) / ls;
162 switch (softening_curve)
163 {
165 {
166 double const m2 = std::pow(2., 5. / 3.) - 3.;
167 double const n = 2.5;
168 double a1 = std::pow(d_ip, n) +
169 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip));
170 double a2 = n * std::pow(d_ip, n - 1.) -
171 2. * m1 * m2 * (1. - d_ip) - m1;
172 return (2. * a2 * a2 * std::pow(d_ip, n) -
173 a1 * std::pow(d_ip, n) *
174 (2. * m1 * m2 +
175 n * std::pow(d_ip, n - 2.) * (n - 1.)) -
176 2. * a1 * a2 * n * std::pow(d_ip, n - 1.) +
177 a1 * a1 * n * std::pow(d_ip, n - 2.) * (n - 1.)) /
178 (std::pow(a1, 3));
179 }
180 default:
181 {
182 double const m2 = -0.5;
183 double const n = 2.;
184 double const a1 = std::pow(d_ip, n) +
185 m1 * (1. - d_ip) * (1. + m2 * (1. - d_ip));
186 double const a2 = n * std::pow(d_ip, n - 1.) -
187 2. * m1 * m2 * (1. - d_ip) - m1;
188 return (2. * a2 * a2 * std::pow(d_ip, n) -
189 a1 * std::pow(d_ip, n) *
190 (2. * m1 * m2 +
191 n * std::pow(d_ip, n - 2.) * (n - 1.)) -
192 2. * a1 * a2 * n * std::pow(d_ip, n - 1.) +
193 a1 * a1 * n * std::pow(d_ip, n - 2.) * (n - 1.)) /
194 (std::pow(a1, 3));
195 }
196 }
197 };
198};
199
200template <int DisplacementDim>
238
239} // namespace PhaseField
240} // namespace ProcessLib
double degradation_df2(double const, double const) override
double degradation_df1(double const d_ip, double const) override
double degradation(double const d_ip, double const k, double const) override
double degradation(double const d_ip, double const k, double const ls) override
double degradation_df2(double const d_ip, double const ls) override
COHESIVE_DegradationDerivative(double const Parameter_lch, SofteningCurve Parameter_softening_curve)
double degradation_df1(double const d_ip, double const ls) override
virtual double degradation(double const d_ip, double const k, double const ls)=0
virtual double degradation_df1(double const d_ip, double const ls)=0
virtual double degradation_df2(double const d_ip, double const ls)=0
ParameterLib::Parameter< double > const & solid_density
ParameterLib::Parameter< double > const & crack_resistance
std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > > solid_materials
ParameterLib::Parameter< double > const & crack_length_scale
ParameterLib::Parameter< double > const & residual_stiffness
Eigen::Matrix< double, DisplacementDim, 1 > const specific_body_force
MeshLib::PropertyVector< int > const *const material_ids
std::unique_ptr< DegradationDerivative > degradation_derivative