suanPan
NonlinearDruckerPrager.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 NONLINEARDRUCKERPRAGER_H
32#define NONLINEARDRUCKERPRAGER_H
33
35#include <Toolbox/utility.h>
36
38 const double elastic_modulus; // elastic modulus
39 const double poissons_ratio; // poisson's ratio
40 const double eta_yield;
41 const double eta_flow;
42 const double xi;
43};
44
46 static constexpr unsigned max_iteration = 20u;
47 static const mat unit_dev_tensor;
48 static const mat unit_x_unit;
49
50 const double shear = elastic_modulus / (2. + 2. * poissons_ratio); // shear modulus
51 const double bulk = elastic_modulus / (3. - 6. * poissons_ratio); // bulk modulus
52 const double double_shear = 2. * shear; // double shear modulus
53
54 const double factor_a = shear + bulk * eta_flow * eta_yield;
55 const double factor_b = xi * xi / eta_flow / eta_yield;
56 const double factor_c = sqrt(2.) * shear * bulk;
57 const double factor_d = bulk * bulk * eta_flow * eta_yield;
58
59 const bool associated = suanpan::approx_equal(eta_yield, eta_flow);
60
61 [[nodiscard]] virtual double compute_c(double) const = 0;
62 [[nodiscard]] virtual double compute_dc(double) const = 0;
63
64public:
66 unsigned, // tag
67 double, // elastic modulus
68 double, // poisson's ratio
69 double, // eta_yield (hydrostatic stress related)
70 double, // eta_flow (dilatancy angle related)
71 double, // xi (cohesion related)
72 double = 0. // density
73 );
74
75 int initialize(const shared_ptr<DomainBase>&) override;
76
77 [[nodiscard]] double get_parameter(ParameterType) const override;
78
79 int update_trial_status(const vec&) override;
80
81 int clear_status() override;
82 int commit_status() override;
83 int reset_status() override;
84
85 void print() override;
86};
87
88#endif
89
ParameterType
Definition: ParameterType.h:21
The Material3D class.
Definition: Material3D.h:37
The NonlinearDruckerPrager class.
Definition: NonlinearDruckerPrager.h:45
double get_parameter(ParameterType) const override
Definition: NonlinearDruckerPrager.cpp:36
int commit_status() override
Definition: NonlinearDruckerPrager.cpp:126
void print() override
Definition: NonlinearDruckerPrager.cpp:142
int update_trial_status(const vec &) override
Definition: NonlinearDruckerPrager.cpp:38
int reset_status() override
Definition: NonlinearDruckerPrager.cpp:134
int initialize(const shared_ptr< DomainBase > &) override
Definition: NonlinearDruckerPrager.cpp:28
int clear_status() override
Definition: NonlinearDruckerPrager.cpp:118
NonlinearDruckerPrager(unsigned, double, double, double, double, double, double=0.)
Definition: NonlinearDruckerPrager.cpp:24
std::enable_if_t<!std::numeric_limits< T >::is_integer, bool > approx_equal(T x, T y, int ulp=2)
Definition: utility.h:60
Definition: NonlinearDruckerPrager.h:37
const double eta_yield
Definition: NonlinearDruckerPrager.h:40
const double elastic_modulus
Definition: NonlinearDruckerPrager.h:38
const double poissons_ratio
Definition: NonlinearDruckerPrager.h:39
const double xi
Definition: NonlinearDruckerPrager.h:42
const double eta_flow
Definition: NonlinearDruckerPrager.h:41