-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathmohr_coulomb.h
More file actions
187 lines (160 loc) · 6.86 KB
/
mohr_coulomb.h
File metadata and controls
187 lines (160 loc) · 6.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#ifndef MPM_MATERIAL_MOHR_COULOMB_H_
#define MPM_MATERIAL_MOHR_COULOMB_H_
#include <cmath>
#include <limits>
#include "Eigen/Dense"
#include "infinitesimal_elasto_plastic.h"
namespace mpm {
namespace mohrcoulomb {
//! Failure state
enum FailureState { Elastic = 0, Shear = 1, Tensile = 2, Separated = 3 };
} // namespace mohrcoulomb
//! MohrCoulomb class
//! \brief Mohr Coulomb material model
//! \details Mohr Coulomb material model with softening
//! \tparam Tdim Dimension
template <unsigned Tdim>
class MohrCoulomb : public InfinitesimalElastoPlastic<Tdim> {
public:
//! Define a vector of 6 dof
using Vector6d = Eigen::Matrix<double, 6, 1>;
//! Define a Matrix of 6 x 6
using Matrix6x6 = Eigen::Matrix<double, 6, 6>;
//! Constructor with id and material properties
//! \param[in] material_properties Material properties
MohrCoulomb(unsigned id, const Json& material_properties);
//! Destructor
~MohrCoulomb() override{};
//! Delete copy constructor
MohrCoulomb(const MohrCoulomb&) = delete;
//! Delete assignement operator
MohrCoulomb& operator=(const MohrCoulomb&) = delete;
//! Initialise history variables
//! \retval state_vars State variables with history
mpm::dense_map initialise_state_variables() override;
//! State variables
std::vector<std::string> state_variables() const override;
//! Initialise material
//! \brief Function that initialise material to be called at the beginning of
//! time step
void initialise(mpm::dense_map* state_vars) override {
(*state_vars).at("yield_state") = 0;
};
//! Compute stress
//! \param[in] stress Stress
//! \param[in] dstrain Strain
//! \param[in] particle Constant point to particle base
//! \param[in] state_vars History-dependent state variables
//! \retval updated_stress Updated value of stress
Vector6d compute_stress(const Vector6d& stress, const Vector6d& dstrain,
const ParticleBase<Tdim>* ptr,
mpm::dense_map* state_vars, double dt) override;
//! Compute stress invariants (j2, j3, rho, theta, and epsilon)
//! \param[in] stress Stress
//! \param[in] state_vars History-dependent state variables
//! \retval status of computation of stress invariants
bool compute_stress_invariants(const Vector6d& stress,
mpm::dense_map* state_vars);
//! Compute yield function and yield state
//! \param[in] state_vars History-dependent state variables
//! \retval yield_type Yield type (elastic, shear or tensile)
mpm::mohrcoulomb::FailureState compute_yield_state(
Eigen::Matrix<double, 2, 1>* yield_function,
const mpm::dense_map& state_vars);
//! Compute dF/dSigma and dP/dSigma
//! \param[in] yield_type Yield type (elastic, shear or tensile)
//! \param[in] state_vars History-dependent state variables
//! \param[in] stress Stress
//! \param[in] df_dsigma dF/dSigma
//! \param[in] dp_dsigma dP/dSigma
//! \param[in] dp_dq dP / dq
//! \param[in] softening Softening parameter
void compute_df_dp(mpm::mohrcoulomb::FailureState yield_type,
const mpm::dense_map* state_vars, const Vector6d& stress,
Vector6d* df_dsigma, Vector6d* dp_dsigma, double* dp_dq,
double* softening);
protected:
//! material id
using Material<Tdim>::id_;
//! Material properties
using Material<Tdim>::properties_;
//! Logger
using Material<Tdim>::console_;
private:
//! Compute elastic tensor
//! \param[in] state_vars History-dependent state variables
Matrix6x6 compute_elastic_tensor(mpm::dense_map* state_vars);
//! Compute constitutive relations matrix for elasto-plastic material
//! \param[in] stress Stress
//! \param[in] dstrain Strain
//! \param[in] particle Constant point to particle base
//! \param[in] state_vars History-dependent state variables
//! \param[in] dt Time step increment
//! \param[in] hardening Boolean to consider hardening, default=true. If
//! perfect-plastic tensor is needed pass false
//! \retval dmatrix Constitutive relations mattrix
Matrix6x6 compute_elasto_plastic_tensor(const Vector6d& stress,
const Vector6d& dstrain,
const ParticleBase<Tdim>* ptr,
mpm::dense_map* state_vars, double dt,
bool hardening = true) override;
//! Inline ternary function to check negative or zero numbers
inline double check_low(double val) {
return (val > 1.0e-15 ? val : 1.0e-15);
}
void update_softening_parameters(mpm::dense_map* state_vars);
std::tuple<Vector6d, double, bool> compute_single_surface_return(
mpm::mohrcoulomb::FailureState yield_type,
const Eigen::Matrix<double, 2, 1>& yield_function,
const Vector6d& current_stress,
const Matrix6x6& de,
mpm::dense_map* state_vars);
//! Compute corner return mapping for multi-surface failure
std::tuple<Vector6d, double, bool> compute_corner_return(
const Vector6d& current_stress,
const Matrix6x6& de,
mpm::dense_map* state_vars);
//! Density
double density_{std::numeric_limits<double>::max()};
//! Grain density
double grain_density_{std::numeric_limits<double>::max()};
//! Minimum packing fraction
double minimum_packing_fraction_{0.0};
//! Youngs modulus
double youngs_modulus_{std::numeric_limits<double>::max()};
//! Bulk modulus
double bulk_modulus_{std::numeric_limits<double>::max()};
//! Shear modulus
double shear_modulus_{std::numeric_limits<double>::max()};
//! Poisson ratio
double poisson_ratio_{std::numeric_limits<double>::max()};
//! Maximum friction angle phi
double phi_peak_{std::numeric_limits<double>::max()};
//! Maximum dilation angle psi
double psi_peak_{std::numeric_limits<double>::max()};
//! Maximum cohesion
double cohesion_peak_{std::numeric_limits<double>::max()};
//! Residual friction angle phi
double phi_residual_{std::numeric_limits<double>::max()};
//! Residual dilation angle psi
double psi_residual_{std::numeric_limits<double>::max()};
//! Residual cohesion
double cohesion_residual_{std::numeric_limits<double>::max()};
//! Peak plastic deviatoric strain
double pdstrain_peak_{std::numeric_limits<double>::max()};
//! Residual plastic deviatoric strain
double pdstrain_residual_{std::numeric_limits<double>::max()};
//! Tension cutoff
double tension_cutoff_{std::numeric_limits<double>::max()};
//! softening
bool softening_{false};
//! Failure state map
std::map<int, mpm::mohrcoulomb::FailureState> yield_type_ = {
{0, mpm::mohrcoulomb::FailureState::Elastic},
{1, mpm::mohrcoulomb::FailureState::Shear},
{2, mpm::mohrcoulomb::FailureState::Tensile},
{3, mpm::mohrcoulomb::FailureState::Separated}};
}; // MohrCoulomb class
} // namespace mpm
#include "mohr_coulomb.tcc"
#endif // MPM_MATERIAL_MOHR_COULOMB_H_