suanPan
SimpleSand.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 ******************************************************************************/
31#ifndef SIMPLESAND_H
32#define SIMPLESAND_H
33
35
37 const double elastic_modulus; // elastic modulus
38 const double poissons_ratio; // poisson's ratio
39 const double m = .01;
40 const double a = -.7;
41 const double h = 5.;
42 const double ac = 1.25;
43 const double nb = 1.1;
44 const double nd = 3.5;
45 const double vc = 1.915;
46 const double pc = -130.;
47 const double lc = .02;
48 const double v0 = 2.;
49};
50
51class SimpleSand final : protected DataSimpleSand, public Material3D {
52 static constexpr unsigned max_iteration = 20u;
53 static const mat unit_dev_tensor;
54
55 static constexpr uword sa = 0, sb = 1;
56 static const span sc, sd;
57
58 const double shear = elastic_modulus / (2. + 2. * poissons_ratio); // shear modulus
59 const double double_shear = 2. * shear; // double shear
60 const double bulk = elastic_modulus / (3. - 6. * poissons_ratio);
61
62public:
64 unsigned, // tag
65 double, // elastic modulus
66 double, // poissons ratio
67 double, // m
68 double, // A
69 double, // h
70 double, // alpha_c
71 double, // n_b
72 double, // n_d
73 double, // v_c
74 double, // p_c
75 double, // lambda_c
76 double, // v_0
77 double = 0. // density
78 );
79
80 int initialize(const shared_ptr<DomainBase>&) override;
81
83
84 [[nodiscard]] double get_parameter(ParameterType) const override;
85
86 int update_trial_status(const vec&) override;
87
88 int clear_status() override;
89 int commit_status() override;
90 int reset_status() override;
91
92 void print() override;
93};
94
95#endif
96
ParameterType
Definition: ParameterType.h:21
The Material3D class.
Definition: Material3D.h:37
The SimpleSand class.
Definition: SimpleSand.h:51
void print() override
Definition: SimpleSand.cpp:170
int update_trial_status(const vec &) override
Definition: SimpleSand.cpp:41
int initialize(const shared_ptr< DomainBase > &) override
Definition: SimpleSand.cpp:29
int clear_status() override
Definition: SimpleSand.cpp:146
double get_parameter(ParameterType) const override
Definition: SimpleSand.cpp:39
unique_ptr< Material > get_copy() override
Definition: SimpleSand.cpp:37
int reset_status() override
Definition: SimpleSand.cpp:162
SimpleSand(unsigned, double, double, double, double, double, double, double, double, double, double, double, double, double=0.)
Definition: SimpleSand.cpp:25
int commit_status() override
Definition: SimpleSand.cpp:154
Definition: SimpleSand.h:36
const double v0
Definition: SimpleSand.h:48
const double nd
Definition: SimpleSand.h:44
const double lc
Definition: SimpleSand.h:47
const double elastic_modulus
Definition: SimpleSand.h:37
const double pc
Definition: SimpleSand.h:46
const double poissons_ratio
Definition: SimpleSand.h:38
const double ac
Definition: SimpleSand.h:42
const double vc
Definition: SimpleSand.h:45
const double m
Definition: SimpleSand.h:39
const double h
Definition: SimpleSand.h:41
const double a
Definition: SimpleSand.h:40
const double nb
Definition: SimpleSand.h:43