GranOO  3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
SinterNeck_Martin.hpp
Go to the documentation of this file.
1 // This file is part of GranOO, a workbench for DEM simulation.
2 //
3 // Author(s) : - Damien Andre IRCER/UNILIM, Limoges France
4 // <damien.andre@unilim.fr>
5 // - Jean-luc Charles Arts et Metiers ParisTech, CNRS, I2M, Bordeaux France
6 // <jean-luc.charles@ensam.eu>
7 // - Jeremie Girardot Arts et Metiers ParisTech, CNRS, I2M, Bordeaux France
8 // <jeremie.girardot@ensam.eu>
9 // - Cedric Hubert LAMIH/UPHF, Valenciennes France
10 // <cedric.hubert@uphf.fr>
11 // - Ivan Iordanoff Arts et Metiers ParisTech, CNRS, I2M, Bordeaux France
12 // <ivan.iordanoff@ensam.eu>
13 //
14 // Copyright (C) 2008-2019 D. Andre, JL. Charles, J. Girardot, C. Hubert, I. Iordanoff
15 //
16 // This program is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 // This program is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with this program. If not, see <http://www.gnu.org/licenses/>.
28 
29 
30 #ifndef _libDEM_SinterNeck_Martin_hpp_
31 #define _libDEM_SinterNeck_Martin_hpp_
32 
33 #include <string>
34 #include <vector>
35 
36 
37 
38 
40 
41 namespace GranOO3
42 {
43  namespace DEM
44  {
45 
46 
47  class SinterNeck_Martin : public SinterNeck,
48  public Core::Register< SinterNeck_Martin >
49  {
50 
51  GRANOO_CLASS(DEM::SinterNeck_Martin, SinterNeck);
52 
53 
54  public:
55  //CONSTRUCTORS & DESTRUCTORS
56  SinterNeck_Martin(Element& el1, Element& el2);
57  virtual ~SinterNeck_Martin();
58 
59  //USEFULL
60  virtual void compute_load();
61  virtual std::string info() const;
62 
63  // UPDATE PARAMETERS
64  void update_delta_b();
65 
66  //ACCESSORS
67  GRANOO_ACCESS(delta_b_x_D0b, double, _delta_b_x_D0b ); // initial diffusion flux
68  GRANOO_ACCESS(Qb , double, _Qb ); // activation energy
69  GRANOO_ACCESS(beta , double, _beta ); // model parameter
70  GRANOO_ACCESS(alpha , double, _alpha ); // model parameter
71  GRANOO_ACCESS(vt , double, _vt ); // tangential relative velocity
72  GRANOO_ACCESS(eta , double, _eta ); // dimensionless viscous parameter
73  GRANOO_ACCESS(Ft , double, _Ft ); // tangential viscous force
74  GRANOO_ACCESS(t , Geom::Vector, _t ); // tangential direction
75 
76  private:
77  SinterNeck_Martin() = delete;
78  SinterNeck_Martin(const SinterNeck_Martin& frame) = delete;
80 
81  private:
82  //SERIALIZATION
84  template<class Archive> void save(Archive&, const unsigned int ) const;
85  template<class Archive> void load(Archive&, const unsigned int);
87 
88  protected:
90  double _delta_b_x_D0b = 0.; // initial diffusion flux (δb.D0b: Martin)
91  double _Qb = 0.; // activation energy ( Qb: Martin)
92 
94  double _beta = 4.0; // model parameter (α: Martin)
95  double _alpha = 4.5; // model parameter (β: Martin)
96 
98  double _vt = 0.; // tangential relative velocity (du/dt: Martin)
99 
101  double _eta = 0.; // dimensionless viscous parameter (η: Martin)
102  double _Ft = 0.; // tangential viscous force
103 
105  Geom::Vector _t = Geom::Vector(0.,0.,0.); // tangential direction
106 
107  };
108 
109 
110  template<class Archive> void
111  SinterNeck_Martin::save(Archive& ar, const unsigned int v) const {
112  ar << boost::serialization::base_object<SinterNeck>(*this);
113  ar << _delta_b_x_D0b;
114  ar << _Qb;
115  ar << _beta;
116  ar << _alpha;
117  ar << _vt;
118  ar << _eta;
119  ar << _Ft;
120  ar << _t;
121  }
122 
123  template<class Archive> void
124  SinterNeck_Martin::load(Archive& ar, const unsigned int v) {
125  ar >> boost::serialization::base_object<SinterNeck>(*this);
126  ar >> _delta_b_x_D0b;
127  ar >> _Qb;
128  ar >> _beta;
129  ar >> _alpha;
130  ar >> _vt;
131  ar >> _eta;
132  ar >> _Ft;
133  ar >> _t;
134  }
135 
136 
137  }
138 }
139 
140 
141 #include <boost/serialization/version.hpp>
143 
144 // need placement new snippet because no default constructor exist
145 namespace boost
146 {
147  namespace serialization
148  {
149 
150  template<class Archive>
151  void save_construct_data(Archive & ar,
153  const unsigned int) {
154  const GranOO3::DEM::Element* de1 = &t->get_element1();
155  const GranOO3::DEM::Element* de2 = &t->get_element2();
156  ar << de1;
157  ar << de2;
158  }
159 
160  template<class Archive>
161  void load_construct_data(Archive & ar,
163  const unsigned int) {
164  GranOO3::DEM::Element* de1 = nullptr;
165  GranOO3::DEM::Element* de2 = nullptr;
166  ar >> de1;
167  ar >> de2;
168  ::new(t)GranOO3::DEM::SinterNeck_Martin(*de1,*de2);
169  }
170 
171  }
172 } // namespace ...
173 
174 namespace GranOO3
175 {
176  GRANOO_CLASS_DECLARE_TPL(DEM::SinterNeck_Martin);
177 }
178 
179 
180 #endif
181 
182 
BOOST_CLASS_VERSION(GranOO3::DEM::SinterNeck_Martin, 0) namespace boost
Definition: SinterNeck_Martin.hpp:142
Definition: SetOf.hpp:346
a base class that represents an element
Definition: Element.hpp:55
Definition: SinterNeck_Martin.hpp:49
double _alpha
Definition: SinterNeck_Martin.hpp:95
double _vt
Definition: SinterNeck_Martin.hpp:98
double _Ft
Definition: SinterNeck_Martin.hpp:102
Geom::Vector _t
Definition: SinterNeck_Martin.hpp:105
virtual std::string info() const
Display some useful info in the terminal
Definition: SinterNeck_Martin.cpp:130
SinterNeck_Martin(const SinterNeck_Martin &frame)=delete
SinterNeck_Martin & operator=(const SinterNeck_Martin &)=delete
double _eta
Definition: SinterNeck_Martin.hpp:101
friend class boost::serialization::access
Definition: SinterNeck_Martin.hpp:83
void save(Archive &, const unsigned int) const
Definition: SinterNeck_Martin.hpp:111
void update_delta_b()
Definition: SinterNeck_Martin.cpp:65
virtual void compute_load()
compute the reaction force and torque of the bond
Definition: SinterNeck_Martin.cpp:70
void load(Archive &, const unsigned int)
Definition: SinterNeck_Martin.hpp:124
virtual ~SinterNeck_Martin()
Definition: SinterNeck_Martin.cpp:61
double _Qb
Definition: SinterNeck_Martin.hpp:91
double _delta_b_x_D0b
Definition: SinterNeck_Martin.hpp:90
double _beta
Definition: SinterNeck_Martin.hpp:94
Definition: SinterNeck.hpp:55
Definition: Vector.hpp:75
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
Definition: Pair.hpp:202
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