suanPan
NonlinearCDP.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 Theodore Chang
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
43 #ifndef NONLINEARCDP_H
44 #define NONLINEARCDP_H
45 
47 
50  const double g_t, g_c;
51  const double alpha, alpha_p, s0;
52 };
53 
54 class NonlinearCDP : protected DataNonlinearCDP, public Material3D {
55  static constexpr unsigned max_iteration = 20;
56  static const double root_three_two;
57  static constexpr double scale = .999; // to avoid overshoot
58  static const mat unit_dev_tensor;
59 
60  const double bulk = elastic_modulus / (3. - 6. * poissons_ratio);
61  const double double_shear = elastic_modulus / (1. + poissons_ratio);
62  const double three_alpha_p_bulk = 3. * alpha_p * bulk;
63  const double pfplambda = -3. * alpha * three_alpha_p_bulk - root_three_two * double_shear;
64  const double one_minus_alpha = 1. - alpha;
65 
66  const vec unit_alpha_p{alpha_p, alpha_p, alpha_p, 0., 0., 0.};
67 
68  static double compute_r(const vec&);
69  static vec compute_dr(const vec&);
70 
71  [[nodiscard]] inline double compute_s(double) const;
72 
86  [[nodiscard]] virtual podarray<double> compute_tension_backbone(double) const = 0;
87 
101  [[nodiscard]] virtual podarray<double> compute_compression_backbone(double) const = 0;
102 
103 public:
104  NonlinearCDP(unsigned, // tag
105  double, // elastic modulus
106  double, // poissons ratio
107  double, // normalized crack energy (+)
108  double, // normalized crush energy (+)
109  double, // dilatancy parameter
110  double, // biaxial compression strength ratio
111  double, // stiffness recovery
112  double // density
113  );
114 
115  int initialize(const shared_ptr<DomainBase>&) override;
116 
117  [[nodiscard]] double get_parameter(ParameterType) const override;
118 
119  int update_trial_status(const vec&) override;
120 
121  int clear_status() override;
122  int commit_status() override;
123  int reset_status() override;
124 
125  vector<vec> record(OutputType) override;
126 
127  void print() override;
128 };
129 
130 #endif
131 
OutputType
Definition: OutputType.h:21
ParameterType
Definition: ParameterType.h:21
The Material3D class.
Definition: Material3D.h:37
The NonlinearCDP class.
Definition: NonlinearCDP.h:54
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearCDP.cpp:46
int commit_status() override
Definition: NonlinearCDP.cpp:234
int clear_status() override
Definition: NonlinearCDP.cpp:226
void print() override
Definition: NonlinearCDP.cpp:262
int reset_status() override
Definition: NonlinearCDP.cpp:242
vector< vec > record(OutputType) override
Definition: NonlinearCDP.cpp:250
NonlinearCDP(unsigned, double, double, double, double, double, double, double, double)
Definition: NonlinearCDP.cpp:42
int update_trial_status(const vec &) override
Definition: NonlinearCDP.cpp:63
double get_parameter(ParameterType) const override
Definition: NonlinearCDP.cpp:54
Definition: NonlinearCDP.h:48
const double g_t
Definition: NonlinearCDP.h:50
const double alpha
Definition: NonlinearCDP.h:51
const double g_c
Definition: NonlinearCDP.h:50
const double elastic_modulus
Definition: NonlinearCDP.h:49
const double alpha_p
Definition: NonlinearCDP.h:51
const double s0
Definition: NonlinearCDP.h:51
const double poissons_ratio
Definition: NonlinearCDP.h:49