suanPan
Loading...
Searching...
No Matches
Subloading1D.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 ******************************************************************************/
28#ifndef SUBLOADING1D_H
29#define SUBLOADING1D_H
30
32
34 class Saturation {
35 static const double root_one_half;
36
37 const double rate, bound;
38
39 public:
40 Saturation(const double R, const double B)
41 : rate(R)
42 , bound(B) {}
43
44 [[nodiscard]] double r() const { return rate * root_one_half; }
45
46 [[nodiscard]] double b() const { return bound; }
47
48 [[nodiscard]] double rb() const { return r() * b(); }
49 };
50
51 const double elastic; // elastic modulus
54 const double u;
55 const double cv;
56 const double mu;
57 const double nv;
58
59 const std::vector<Saturation> b, c;
60};
61
62class Subloading1D final : protected DataSubloading1D, public Material1D {
63 static constexpr unsigned max_iteration = 20u;
64 static constexpr double z_bound = 1E-15;
65 static const double rate_bound;
66
67 static vec2 yield_ratio(double);
68
69 const double* incre_time = nullptr;
70
71 const bool is_viscous = mu > 0. && nv > 0.;
72
73public:
75 unsigned, // tag
76 DataSubloading1D&&, // data
77 double = 0. // density
78 );
79
80 int initialize(const shared_ptr<DomainBase>&) override;
81
82 unique_ptr<Material> get_copy() override;
83
84 int update_trial_status(const vec&) override;
85
86 int clear_status() override;
87 int commit_status() override;
88 int reset_status() override;
89
90 void print() override;
91};
92
93#endif
94
Definition Subloading1D.h:34
double rb() const
Definition Subloading1D.h:48
double r() const
Definition Subloading1D.h:44
double b() const
Definition Subloading1D.h:46
Saturation(const double R, const double B)
Definition Subloading1D.h:40
A Material1D class.
Definition Material1D.h:36
A Subloading1D material class.
Definition Subloading1D.h:62
void print() override
Definition Subloading1D.cpp:197
int commit_status() override
Definition Subloading1D.cpp:181
unique_ptr< Material > get_copy() override
Definition Subloading1D.cpp:46
int clear_status() override
Definition Subloading1D.cpp:173
int initialize(const shared_ptr< DomainBase > &) override
Definition Subloading1D.cpp:36
int reset_status() override
Definition Subloading1D.cpp:189
int update_trial_status(const vec &) override
Definition Subloading1D.cpp:48
Definition Subloading1D.h:33
const double saturation_kin
Definition Subloading1D.h:53
const double m_iso
Definition Subloading1D.h:52
const double k_iso
Definition Subloading1D.h:52
const std::vector< Saturation > b
Definition Subloading1D.h:59
const double cv
Definition Subloading1D.h:55
const double u
Definition Subloading1D.h:54
const double m_kin
Definition Subloading1D.h:53
const std::vector< Saturation > c
Definition Subloading1D.h:59
const double saturation_iso
Definition Subloading1D.h:52
const double k_kin
Definition Subloading1D.h:53
const double initial_kin
Definition Subloading1D.h:53
const double mu
Definition Subloading1D.h:56
const double nv
Definition Subloading1D.h:57
const double elastic
Definition Subloading1D.h:51
const double initial_iso
Definition Subloading1D.h:52