suanPan
NonlinearK4.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2024 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 ******************************************************************************/
29#ifndef NONLINEARK4_H
30#define NONLINEARK4_H
31
33
36};
37
38class NonlinearK4 : protected DataNonlinearK4, public Material1D {
39 static constexpr unsigned max_iteration = 20u;
40
41 const bool apply_damage, apply_crack_closing, objective_damage;
42
43 [[nodiscard]] virtual vec2 compute_tension_backbone(double) const = 0;
44 [[nodiscard]] virtual vec2 compute_compression_backbone(double) const = 0;
45
46 [[nodiscard]] virtual vec2 compute_tension_damage(double) const = 0;
47 [[nodiscard]] virtual vec2 compute_compression_damage(double) const = 0;
48
49 int compute_plasticity();
50 void compute_crack_close_branch();
51
52protected:
53 [[nodiscard]] double objective_scale(double, double) const;
54
55public:
57 unsigned, // tag
58 double, // elastic modulus
59 double, // hardening parameter
60 double, // density
61 bool, // apply damage
62 bool, // apply crack closing
63 bool // objective damage
64 );
65
66 int initialize(const shared_ptr<DomainBase>&) override;
67
68 [[nodiscard]] double get_parameter(ParameterType) const override;
69
70 int update_trial_status(const vec&) override;
71
72 int clear_status() override;
73 int commit_status() override;
74 int reset_status() override;
75
76 void print() override;
77};
78
80 const double hardening_t, hardening_d;
81 const double f_t, f_c, k_peak, f_y;
82 const double zeta_t, zeta_c;
83 const double hardening_c = (f_c - f_y) / k_peak;
84};
85
86class ConcreteK4 final : protected DataConcreteK4, public NonlinearK4 {
87 [[nodiscard]] vec2 compute_tension_backbone(double) const override;
88 [[nodiscard]] vec2 compute_compression_backbone(double) const override;
89
90 [[nodiscard]] vec2 compute_tension_damage(double) const override;
91 [[nodiscard]] vec2 compute_compression_damage(double) const override;
92
93public:
95 unsigned, // tag
96 double, // elastic modulus
97 double, // hardening parameter
98 vec&&, // parameters
99 double = 0., // density
100 bool = true, // apply damage
101 bool = true, // apply crack closing
102 bool = false // objective damage
103 );
104
106};
107
108#endif
109
ParameterType
Definition: ParameterType.h:21
Definition: NonlinearK4.h:86
unique_ptr< Material > get_copy() override
Definition: NonlinearK4.cpp:211
ConcreteK4(unsigned, double, double, vec &&, double=0., bool=true, bool=true, bool=false)
Definition: NonlinearK4.cpp:207
A Material1D class.
Definition: Material1D.h:36
A ConcreteK4 material class.
Definition: NonlinearK4.h:38
void print() override
Definition: NonlinearK4.cpp:178
int update_trial_status(const vec &) override
Definition: NonlinearK4.cpp:135
int reset_status() override
Definition: NonlinearK4.cpp:170
int commit_status() override
Definition: NonlinearK4.cpp:162
NonlinearK4(unsigned, double, double, double, bool, bool, bool)
Definition: NonlinearK4.cpp:115
double get_parameter(ParameterType) const override
Definition: NonlinearK4.cpp:130
double objective_scale(double, double) const
Definition: NonlinearK4.cpp:108
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearK4.cpp:122
int clear_status() override
Definition: NonlinearK4.cpp:154
Definition: NonlinearK4.h:79
const double k_peak
Definition: NonlinearK4.h:81
const double hardening_c
Definition: NonlinearK4.h:83
const double f_c
Definition: NonlinearK4.h:81
const double f_t
Definition: NonlinearK4.h:81
const double zeta_t
Definition: NonlinearK4.h:82
const double zeta_c
Definition: NonlinearK4.h:82
const double hardening_d
Definition: NonlinearK4.h:80
const double hardening_t
Definition: NonlinearK4.h:80
const double f_y
Definition: NonlinearK4.h:81
Definition: NonlinearK4.h:34
const double hardening_k
Definition: NonlinearK4.h:35
const double elastic_modulus
Definition: NonlinearK4.h:35