suanPan
VAFCRP.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2025 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  ******************************************************************************/
38 #ifndef VAFCRP_H
39 #define VAFCRP_H
40 
42 
43 struct DataVAFCRP {
44  const double elastic_modulus; // elastic modulus
45  const double poissons_ratio; // poisson's ratio
46  const double yield; // yield stress
47  const double saturated;
48  const double hardening;
49  const double m;
50  const double mu;
51  const double epsilon;
52  const vec a, b;
53 };
54 
55 class VAFCRP final : protected DataVAFCRP, public Material3D {
56  static constexpr unsigned max_iteration = 20u;
57  static const double root_three_two;
58  static const mat unit_dev_tensor;
59 
60  const double* incre_time = nullptr;
61 
62  const unsigned size = static_cast<unsigned>(a.size());
63 
64  const double shear = elastic_modulus / (2. + 2. * poissons_ratio); // shear modulus
65  const double double_shear = 2. * shear;
66  const double three_shear = 3. * shear;
67  const double root_six_shear = sqrt(6.) * shear;
68 
69 public:
70  VAFCRP(
71  unsigned, // tag
72  DataVAFCRP&&, // material data
73  double = 0. // density
74  );
75 
76  int initialize(const shared_ptr<DomainBase>&) override;
77 
78  unique_ptr<Material> get_copy() override;
79 
80  [[nodiscard]] double get_parameter(ParameterType) const override;
81 
82  int update_trial_status(const vec&) override;
83 
84  int clear_status() override;
85  int commit_status() override;
86  int reset_status() override;
87 
88  void print() override;
89 };
90 
91 #endif
92 
ParameterType
Definition: ParameterType.h:21
The Material3D class.
Definition: Material3D.h:37
The VAFCRP class defines a nonlinear hardening material with mixed hardening (isotropic and kinematic...
Definition: VAFCRP.h:55
void print() override
Definition: VAFCRP.cpp:148
unique_ptr< Material > get_copy() override
Definition: VAFCRP.cpp:40
int update_trial_status(const vec &) override
Definition: VAFCRP.cpp:44
VAFCRP(unsigned, DataVAFCRP &&, double=0.)
Definition: VAFCRP.cpp:26
double get_parameter(ParameterType) const override
Definition: VAFCRP.cpp:42
int clear_status() override
Definition: VAFCRP.cpp:124
int initialize(const shared_ptr< DomainBase > &) override
Definition: VAFCRP.cpp:30
int reset_status() override
Definition: VAFCRP.cpp:140
int commit_status() override
Definition: VAFCRP.cpp:132
Definition: VAFCRP.h:43
const double epsilon
Definition: VAFCRP.h:51
const double saturated
Definition: VAFCRP.h:47
const double mu
Definition: VAFCRP.h:50
const double poissons_ratio
Definition: VAFCRP.h:45
const double m
Definition: VAFCRP.h:49
const double elastic_modulus
Definition: VAFCRP.h:44
const vec b
Definition: VAFCRP.h:52
const double hardening
Definition: VAFCRP.h:48
const double yield
Definition: VAFCRP.h:46
const vec a
Definition: VAFCRP.h:52