suanPan
NonlinearPeric.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  ******************************************************************************/
31 #ifndef NONLINEARPERIC_H
32 #define NONLINEARPERIC_H
33 
35 
37  const double elastic_modulus; // elastic modulus
38  const double poissons_ratio; // poisson's ratio
39  const double mu;
40  const double epsilon;
41 };
42 
44  static constexpr unsigned max_iteration = 20;
45  static const double root_three_two;
46  static const mat unit_dev_tensor;
47  static const double unit_time;
48 
49  const double shear_modulus = elastic_modulus / (2. + 2. * poissons_ratio); // shear modulus
50  const double double_shear = 2. * shear_modulus; // double shear modulus
51  const double triple_shear = 3. * shear_modulus; // double shear modulus
52 
53  const double factor_a = mu * epsilon;
54 
55  const double* incre_time = nullptr;
56 
57  [[nodiscard]] virtual double compute_k(double) const = 0;
58  [[nodiscard]] virtual double compute_dk(double) const = 0;
59 
60 public:
61  NonlinearPeric(unsigned, // tag
62  double, // elastic modulus
63  double, // poisson's ratio
64  double = 0., // mu
65  double = 0., // epsilon
66  double = 0. // density
67  );
68 
69  int initialize(const shared_ptr<DomainBase>&) override;
70 
71  [[nodiscard]] double get_parameter(ParameterType) const override;
72 
73  int update_trial_status(const vec&) override;
74 
75  int clear_status() override;
76  int commit_status() override;
77  int reset_status() override;
78 
79  void print() override;
80 };
81 
82 #endif
83 
ParameterType
Definition: ParameterType.h:21
The Material3D class.
Definition: Material3D.h:37
The NonlinearPeric class.
Definition: NonlinearPeric.h:43
int clear_status() override
Definition: NonlinearPeric.cpp:99
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearPeric.cpp:31
NonlinearPeric(unsigned, double, double, double=0., double=0., double=0.)
Definition: NonlinearPeric.cpp:27
int commit_status() override
Definition: NonlinearPeric.cpp:107
void print() override
Definition: NonlinearPeric.cpp:123
int update_trial_status(const vec &) override
Definition: NonlinearPeric.cpp:50
int reset_status() override
Definition: NonlinearPeric.cpp:115
double get_parameter(ParameterType) const override
Definition: NonlinearPeric.cpp:41
Definition: NonlinearPeric.h:36
const double poissons_ratio
Definition: NonlinearPeric.h:38
const double elastic_modulus
Definition: NonlinearPeric.h:37
const double epsilon
Definition: NonlinearPeric.h:40
const double mu
Definition: NonlinearPeric.h:39