suanPan
Loading...
Searching...
No Matches
NonlinearK4.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 ******************************************************************************/
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 = true, apply_crack_closing = true;
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(double&);
50 void compute_crack_close_branch();
51
52public:
54 unsigned, // tag
55 double, // elastic modulus
56 double, // hardening parameter
57 double, // density
58 bool, // apply damage
59 bool // apply crack closing
60 );
61
62 int initialize(const shared_ptr<DomainBase>&) override;
63
64 [[nodiscard]] double get_parameter(ParameterType) const override;
65
66 int update_trial_status(const vec&) override;
67
68 int clear_status() override;
69 int commit_status() override;
70 int reset_status() override;
71
72 void print() override;
73};
74
76 const double hardening_t, hardening_d;
77 const double f_t, f_c, k_peak, f_y;
78 const double zeta_t, zeta_c;
79 const double hardening_c = (f_c - f_y) / k_peak;
80};
81
82class ConcreteK4 final : protected DataConcreteK4, public NonlinearK4 {
83 [[nodiscard]] vec2 compute_tension_backbone(double) const override;
84 [[nodiscard]] vec2 compute_compression_backbone(double) const override;
85
86 [[nodiscard]] vec2 compute_tension_damage(double) const override;
87 [[nodiscard]] vec2 compute_compression_damage(double) const override;
88
89public:
91 unsigned, // tag
92 double, // elastic modulus
93 double, // hardening parameter
94 vec&&, // parameters
95 double = 0., // density
96 bool = true, // apply damage
97 bool = true // apply crack closing
98 );
99
100 unique_ptr<Material> get_copy() override;
101};
102
103#endif
104
ParameterType
Definition ParameterType.h:21
Definition NonlinearK4.h:82
unique_ptr< Material > get_copy() override
Definition NonlinearK4.cpp:201
A Material1D class.
Definition Material1D.h:36
A ConcreteK4 material class.
Definition NonlinearK4.h:38
void print() override
Definition NonlinearK4.cpp:168
int update_trial_status(const vec &) override
Definition NonlinearK4.cpp:125
int reset_status() override
Definition NonlinearK4.cpp:160
int commit_status() override
Definition NonlinearK4.cpp:152
double get_parameter(ParameterType) const override
Definition NonlinearK4.cpp:120
int initialize(const shared_ptr< DomainBase > &) override
Definition NonlinearK4.cpp:112
int clear_status() override
Definition NonlinearK4.cpp:144
Definition NonlinearK4.h:75
const double k_peak
Definition NonlinearK4.h:77
const double hardening_c
Definition NonlinearK4.h:79
const double f_c
Definition NonlinearK4.h:77
const double f_t
Definition NonlinearK4.h:77
const double zeta_t
Definition NonlinearK4.h:78
const double zeta_c
Definition NonlinearK4.h:78
const double hardening_d
Definition NonlinearK4.h:76
const double hardening_t
Definition NonlinearK4.h:76
const double f_y
Definition NonlinearK4.h:77
Definition NonlinearK4.h:34
const double hardening_k
Definition NonlinearK4.h:35
const double elastic_modulus
Definition NonlinearK4.h:35