34 #ifndef _libDEM_KratosFlatBond_hpp_
35 #define _libDEM_KratosFlatBond_hpp_
54 #include "custom_constitutive/hyper_elastic_isotropic_ogden_1d.h"
55 #include "custom_constitutive/hyper_elastic_isotropic_henky_1d.h"
56 #include "custom_constitutive/truss_plasticity_constitutive_law.h"
57 #include "custom_constitutive/elastic_isotropic_plane_stress_uncoupled_shear.h"
58 #include "custom_constitutive/hyper_elastic_isotropic_kirchhoff_3d.h"
59 #include "custom_constitutive/hyper_elastic_isotropic_kirchhoff_plane_stress_2d.h"
60 #include "custom_constitutive/hyper_elastic_isotropic_kirchhoff_plane_strain_2d.h"
61 #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_3d.h"
62 #include "custom_constitutive/hyper_elastic_isotropic_neo_hookean_plane_strain_2d.h"
63 #include "custom_constitutive/linear_elastic_orthotropic_2D_law.h"
64 #include "custom_constitutive/small_strain_j2_plasticity_3d.h"
65 #include "custom_constitutive/small_strain_j2_plasticity_plane_strain_2d.h"
66 #include "custom_constitutive/small_strain_isotropic_damage_3d.h"
67 #include "custom_constitutive/small_strain_isotropic_damage_implex_3d.h"
68 #include "custom_constitutive/small_strain_isotropic_damage_traction_only_3d.h"
69 #include "custom_constitutive/small_strain_isotropic_damage_traction_only_implex_3d.h"
70 #include "custom_constitutive/wrinkling_linear_2d_law.h"
71 #include "custom_constitutive/multi_linear_elastic_1d_law.h"
72 #include "custom_constitutive/multi_linear_isotropic_plane_stress_2d.h"
74 #include "custom_constitutive/small_strain_isotropic_damage_plane_strain_2d.h"
75 #include "custom_constitutive/small_strain_isotropic_plasticity_factory.h"
76 #include "custom_constitutive/small_strain_kinematic_plasticity_factory.h"
77 #include "custom_constitutive/finite_strain_isotropic_plasticity_factory.h"
78 #include "custom_constitutive/small_strain_isotropic_damage_factory.h"
79 #include "custom_constitutive/viscous_generalized_maxwell.h"
80 #include "custom_constitutive/viscous_generalized_kelvin.h"
81 #include "custom_constitutive/generic_small_strain_viscoplasticity_3d.h"
82 #include "custom_constitutive/generic_small_strain_isotropic_plasticity.h"
83 #include "custom_constitutive/generic_finite_strain_isotropic_plasticity.h"
84 #include "custom_constitutive/generic_finite_strain_kinematic_plasticity.h"
85 #include "custom_constitutive/generic_small_strain_isotropic_damage.h"
86 #include "custom_constitutive/generic_small_strain_d_plus_d_minus_damage.h"
87 #include "custom_constitutive/generic_small_strain_kinematic_plasticity.h"
88 #include "custom_constitutive/generic_small_strain_high_cycle_fatigue_law.h"
89 #include "custom_constitutive/plasticity_isotropic_kinematic_j2.h"
90 #include "custom_constitutive/plane_stress_d_plus_d_minus_damage_masonry_2d.h"
91 #include "custom_constitutive/d_plus_d_minus_damage_masonry_3d.h"
92 #include "custom_constitutive/generic_small_strain_plastic_damage_model.h"
93 #include "custom_constitutive/generic_small_strain_orthotropic_damage.h"
94 #include "custom_constitutive/serial_parallel_rule_of_mixtures_law.h"
96 #include "custom_constitutive/constitutive_laws_integrators/generic_constitutive_law_integrator_damage.h"
97 #include "custom_constitutive/constitutive_laws_integrators/generic_constitutive_law_integrator_plasticity.h"
98 #include "custom_constitutive/constitutive_laws_integrators/generic_constitutive_law_integrator_kinematic_plasticity.h"
99 #include "custom_constitutive/constitutive_laws_integrators/d+d-constitutive_law_integrators/generic_compression_constitutive_law_integrator.h"
100 #include "custom_constitutive/constitutive_laws_integrators/d+d-constitutive_law_integrators/generic_tension_constitutive_law_integrator.h"
102 #include "custom_constitutive/yield_surfaces/generic_yield_surface.h"
103 #include "custom_constitutive/yield_surfaces/von_mises_yield_surface.h"
104 #include "custom_constitutive/yield_surfaces/modified_mohr_coulomb_yield_surface.h"
105 #include "custom_constitutive/yield_surfaces/mohr_coulomb_yield_surface.h"
106 #include "custom_constitutive/yield_surfaces/rankine_yield_surface.h"
107 #include "custom_constitutive/yield_surfaces/simo_ju_yield_surface.h"
108 #include "custom_constitutive/yield_surfaces/drucker_prager_yield_surface.h"
109 #include "custom_constitutive/yield_surfaces/tresca_yield_surface.h"
111 #include "custom_constitutive/plastic_potentials/generic_plastic_potential.h"
112 #include "custom_constitutive/plastic_potentials/von_mises_plastic_potential.h"
113 #include "custom_constitutive/plastic_potentials/tresca_plastic_potential.h"
114 #include "custom_constitutive/plastic_potentials/modified_mohr_coulomb_plastic_potential.h"
115 #include "custom_constitutive/plastic_potentials/mohr_coulomb_plastic_potential.h"
116 #include "custom_constitutive/plastic_potentials/drucker_prager_plastic_potential.h"
117 #include "custom_constitutive/plastic_potentials/rankine_plastic_potential.h"
119 #include "geometries/line_3d_2.h"
121 #include "custom_constitutive/generic_anisotropic_3d_law.h"
134 class KratosFlatBond :
public Bond,
135 public Core::Register<KratosFlatBond>,
136 public Physic::CriticalTimeStep
139 GRANOO_CLASS(DEM::KratosFlatBond, Bond);
141 enum Type{DAMAGE, PLASTIC, ORTHOTROPIC};
145 using Node = Kratos::Node<3>;
146 using ConstElGeom = Kratos::Line3D2<Node>;
147 using ConstLawParam = Kratos::ConstitutiveLaw::Parameters;
150 using ConstLawDamage = Kratos::GenericSmallStrainIsotropicDamage<Kratos::GenericConstitutiveLawIntegratorDamage<Kratos::RankineYieldSurface<Kratos::MohrCoulombPlasticPotential<6>>>>;
152 using ConstLawPlastic = Kratos::GenericSmallStrainIsotropicPlasticity <Kratos::GenericConstitutiveLawIntegratorPlasticity<Kratos::VonMisesYieldSurface<Kratos::VonMisesPlasticPotential<6>>>>;
154 using ConstLawOrtho = Kratos::GenericAnisotropic3DLaw;
159 KratosFlatBond(Element& el1, Element& el2, Type type,
bool build_voronoi_bond =
true);
160 KratosFlatBond(Element& el1, Element& el2,
bool build_voronoi_bond =
true);
161 virtual ~KratosFlatBond();
164 void update_strain_tensor();
165 void compute_load_from_stress_tensor();
166 void compute_stress_from_kratos_constituve_law();
167 virtual void compute_load();
168 double get_linear_stiffness()
const;
169 double get_angular_stiffness()
const;
170 virtual double compute_critical_time_step()
const;
171 virtual std::string info()
const;
174 GRANOO_ACCESS(young_modulus ,
double , _mat[Kratos::YOUNG_MODULUS ] );
175 GRANOO_ACCESS(poisson_ratio ,
double , _mat[Kratos::POISSON_RATIO ] );
176 GRANOO_ACCESS(yield_stress ,
double , _mat[Kratos::YIELD_STRESS ] );
177 GRANOO_ACCESS(fracture_energy ,
double , _mat[Kratos::FRACTURE_ENERGY] );
178 GRANOO_ACCESS(damage ,
double , _damage );
179 GRANOO_ACCESS(plastic_dissipation ,
double , _plastic_dissipation );
180 GRANOO_ACCESS(damage_threshold ,
double , _damage_threshold );
181 GRANOO_ACCESS(current_stress_vector , Geom::Vector , _current_stress_vector );
182 GRANOO_ACCESS( local_strain_tensor , Geom::SymTensor, _local_strain_tensor );
183 GRANOO_ACCESS(global_strain_tensor , Geom::SymTensor, _global_strain_tensor );
184 GRANOO_ACCESS( local_stress_tensor , Geom::SymTensor, _local_stress_tensor );
185 GRANOO_ACCESS(global_stress_tensor , Geom::SymTensor, _global_stress_tensor );
186 GRANOO_ACCESS(global_stress_tensor_test , Geom::SymTensor, _global_stress_tensor_test );
187 GRANOO_ACCESS(global_stress_tensor_diff , Geom::SymTensor, _global_stress_tensor_diff );
188 GRANOO_ACCESS(type , Type , _type );
190 void set_ortho_elastic_constant(Kratos::Vector& v){_mat_ortho[Kratos::ORTHOTROPIC_ELASTIC_CONSTANTS] = v;}
192 void set_characteristic_length(
double l0);
193 void auto_compute_characteristic_length();
194 void set_linear_softening();
195 void set_exponential_softening();
200 KratosFlatBond() =
delete;
201 KratosFlatBond(
const KratosFlatBond&) =
delete;
202 KratosFlatBond & operator=(
const KratosFlatBond &) =
delete;
206 friend class boost::serialization::access;
207 template<
class Archive>
void serialize(Archive&,
const unsigned int);
210 VoronoiBond* _voronoi_bond;
212 double _plastic_dissipation;
213 double _damage_threshold;
216 Geom::Vector _current_stress_vector;
217 Geom::SymTensor _local_strain_tensor;
218 Geom::SymTensor _global_strain_tensor;
219 Geom::SymTensor _local_stress_tensor;
220 Geom::SymTensor _global_stress_tensor;
221 Geom::SymTensor _global_stress_tensor_test;
222 Geom::SymTensor _global_stress_tensor_diff;
224 ConstLawDamage _damage_law;
225 ConstLawPlastic _plastic_law;
226 ConstLawOrtho& _orthotropic_law;
227 ConstLawParam _param;
231 Kratos::Vector _strain_vector;
232 Kratos::Vector _stress_vector;
233 Kratos::Matrix _const_matrix;
234 Kratos::Matrix _def_gradient_matrix;
235 Kratos::Properties _mat;
236 Kratos::Properties& _mat_ortho;
241 template<
class Archive>
void
242 KratosFlatBond::serialize(Archive & ar,
const unsigned int version) {
243 ar & boost::serialization::base_object<Bond>(*
this);
244 ar & _mat[Kratos::YOUNG_MODULUS ];
245 ar & _mat[Kratos::POISSON_RATIO ];
246 ar & _mat[Kratos::YIELD_STRESS ];
247 ar & _mat[Kratos::FRACTURE_ENERGY];
249 ar & _plastic_dissipation;
250 ar & _local_strain_tensor;
251 ar & _global_strain_tensor;
252 ar & _local_stress_tensor;
253 ar & _global_stress_tensor;
254 ar & _global_stress_tensor_test;
255 ar & _global_stress_tensor_diff;
274 #include <boost/serialization/version.hpp>
281 namespace serialization
284 template<
class Archive>
286 const GranOO3::DEM::KratosFlatBond *
t,
287 const unsigned int) {
290 const GranOO3::DEM::KratosFlatBond::Type type =
t->get_type();
297 template<
class Archive>
299 GranOO3::DEM::KratosFlatBond *
t,
300 const unsigned int) {
303 GranOO3::DEM::KratosFlatBond::Type type;
307 ::new(
t)GranOO3::DEM::KratosFlatBond(*de1,*de2, type,
false);
314 GRANOO_CLASS_DECLARE_TPL(DEM::KratosFlatBond);
BOOST_CLASS_VERSION(GranOO3::Core::Base, 1) namespace GranOO3
Definition: Base.hpp:277
a base class that represents an element
Definition: Element.hpp:55
Definition: Common.hpp:198
void save_construct_data(Archive &ar, const GranOO3::Core::Pair< type > *t, const unsigned int)
Definition: Pair.hpp:207
void load_construct_data(Archive &ar, GranOO3::Core::Pair< type > *t, const unsigned int)
Definition: Pair.hpp:217
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t+t)") define_sfop3(16