suanPan
BWBN.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2023 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 BWBN_H
32 #define BWBN_H
33 
35 
36 struct DataBWBN {
37  const vec pool;
38 };
39 
40 class BWBN final : DataBWBN, public Material1D {
41  static constexpr unsigned max_iteration = 20;
42 
43  const double& elastic_modulus = pool(0);
44  const double& yield_stress = pool(1);
45  const double& hardening = pool(2);
46  const double& beta = pool(3);
47  const double& n = pool(4);
48  const double& nu_i = pool(5);
49  const double& nu_rate = pool(6);
50  const double& eta_i = pool(7);
51  const double& eta_rate = pool(8);
52  const double& phi_i = pool(9);
53  const double& phi_rate = pool(10);
54  const double& zeta = pool(11);
55  const double& a_rate = pool(12);
56  const double& p = pool(13);
57  const double& q = pool(14);
58  const double& lambda = pool(15);
59 
60  const double modulus_a = hardening * elastic_modulus;
61  const double modulus_b = yield_stress - hardening * yield_stress;
62  const double modulus_c = modulus_b / elastic_modulus;
63  const double yield_strain = yield_stress / elastic_modulus;
64 
65 public:
66  BWBN(unsigned, // tag
67  vec&&, // parameter
68  double // density
69  );
70 
71  int initialize(const shared_ptr<DomainBase>&) override;
72 
73  unique_ptr<Material> get_copy() override;
74 
75  int update_trial_status(const vec&) override;
76 
77  int clear_status() override;
78  int commit_status() override;
79  int reset_status() override;
80 
81  void print() override;
82 };
83 
84 #endif
85 
The BWBN class.
Definition: BWBN.h:40
int initialize(const shared_ptr< DomainBase > &) override
Definition: BWBN.cpp:24
int update_trial_status(const vec &) override
Definition: BWBN.cpp:34
int clear_status() override
Definition: BWBN.cpp:132
BWBN(unsigned, vec &&, double)
Definition: BWBN.cpp:20
int commit_status() override
Definition: BWBN.cpp:140
unique_ptr< Material > get_copy() override
Definition: BWBN.cpp:32
void print() override
Definition: BWBN.cpp:156
int reset_status() override
Definition: BWBN.cpp:148
A Material1D class.
Definition: Material1D.h:36
Definition: BWBN.h:36
const vec pool
Definition: BWBN.h:37