suanPan
ConcreteCM.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  ******************************************************************************/
33 #ifndef CONCRETECM_H
34 #define CONCRETECM_H
35 
37 
38 class ConcreteCM final : public Material1D {
39  enum class Status {
40  NONE,
41  CBACKBONE,
42  TBACKBONE,
43  CUNLOAD,
44  TUNLOAD,
45  CSUBUNLOAD,
46  TSUBUNLOAD,
47  CRELOAD,
48  TRELOAD,
49  CTRANS,
50  TTRANS
51  };
52 
53  Status trial_load_status = Status::NONE, current_load_status = Status::NONE;
54 
55  const double c_stress, c_strain, t_stress, t_strain;
56 
57  const double elastic_modulus, c_m, c_n, t_m, t_n;
58 
59  const bool linear_trans;
60 
61  [[nodiscard]] podarray<double> compute_compression_backbone(double);
62  [[nodiscard]] podarray<double> compute_tension_backbone(double);
63  [[nodiscard]] podarray<double> compute_compression_unload(double);
64  [[nodiscard]] podarray<double> compute_tension_unload(double);
65  [[nodiscard]] podarray<double> compute_compression_reload(double);
66  [[nodiscard]] podarray<double> compute_tension_reload(double);
67  [[nodiscard]] podarray<double> compute_compression_subunload(double);
68  [[nodiscard]] podarray<double> compute_tension_subunload(double);
69  [[nodiscard]] podarray<double> compute_transition(double, double, double, double, double, double, double) const;
70 
71  void update_compression_unload(double);
72  void update_tension_unload(double);
73  void update_connect();
74 
75 public:
76  ConcreteCM(unsigned, // tag
77  double, // elastic modulus
78  double, // peak stress in negative
79  double, // crack stress in positive
80  double, // NC
81  double, // NT
82  double = -2E-3, // peak strain in negative
83  double = 1E-4, // crack strain in positive
84  bool = false, // if to use linear transition
85  double = 0. // density
86  );
87 
88  int initialize(const shared_ptr<DomainBase>&) override;
89 
90  unique_ptr<Material> get_copy() override;
91 
92  [[nodiscard]] double get_parameter(ParameterType) const override;
93 
94  int update_trial_status(const vec&) override;
95 
96  int clear_status() override;
97  int commit_status() override;
98  int reset_status() override;
99 
100  void print() override;
101 };
102 
103 #endif
104 
ParameterType
Definition: ParameterType.h:21
A ConcreteCM material class.
Definition: ConcreteCM.h:38
int update_trial_status(const vec &) override
Definition: ConcreteCM.cpp:332
ConcreteCM(unsigned, double, double, double, double, double, double=-2E-3, double=1E-4, bool=false, double=0.)
Definition: ConcreteCM.cpp:301
int reset_status() override
Definition: ConcreteCM.cpp:520
double get_parameter(ParameterType) const override
Definition: ConcreteCM.cpp:324
int clear_status() override
Definition: ConcreteCM.cpp:502
unique_ptr< Material > get_copy() override
Definition: ConcreteCM.cpp:322
int commit_status() override
Definition: ConcreteCM.cpp:511
int initialize(const shared_ptr< DomainBase > &) override
Definition: ConcreteCM.cpp:314
void print() override
Definition: ConcreteCM.cpp:529
A Material1D class.
Definition: Material1D.h:36
@ NONE