ESyS-Particle  2.3
RotThermFricInteraction.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __ROTTHERMFRICTIONINTERACTION_H
14 #define __ROTTHERMFRICTIONINTERACTION_H
15 
16 // -- project includes --
18 #include "Model/RotThermParticle.h"
19 #include "Model/InteractionParam.h"
20 #include "Foundation/vec3.h"
21 #include "Model/IGParam.h"
22 
23 // -- I/O includes --
24 #include <iostream>
25 using std::ostream;
26 
27 
28 //double calc_angle( double , double ) ;
29 
30 
35 {
37 
39  const std::string &name,
40  double k,
41  double mu_d,
42  double mu_s,
43  double k_s,
44  double diffusivity,
45  double dt
46  );
47 
48  double k;
49  double mu_d; // sliding frictional coefficient
50  double mu_s; // max static frictional coefficient
51  double k_s;
52  double dt;
53  double diffusivity ;
54 
55  virtual std::string getTypeString() const
56  {
57  return "RotThermFriction";
58  }
59 
60  inline void setTimeStepSize(double deltaT)
61  {
62  dt = deltaT;
63  }
64 };
65 
70 {
71  public: // types
73 
75  typedef pair<bool,double> (CRotThermFrictionInteraction::* CheckedScalarFieldFunction)() const;
77 
79  static ScalarFieldFunction getScalarFieldFunction(const string&);
80  static VectorFieldFunction getVectorFieldFunction(const string&);
81 
82  inline void setTimeStepSize(double deltaT)
83  {
84  m_dt = deltaT;
85  }
86 // protected:
87  private:
88 
89  double m_k;
90  double m_r0;
91  double m_mu_d;
92  double m_mu_s;
93  double m_ks;
94  double m_dt;
101  double m_E_diss;
102  double m_diffusivity;
104  //Quaternion m_init_q1, m_init_q2;
105  //Vec3 m_init_pos1 , m_init_pos2;
106 
107  public:
111 
112  static string getType() {return "RotThermFriction";};
113 
114  virtual void calcForces();
115  void calcHeatFrict();
116  void calcHeatTrans();
117  virtual bool isPersistent();
118 
119  void calcNormalForce();
120  double getAbsForceDeficit()const;
121  double getPotentialEnergy()const;
122  double getSlipping()const;
123  double getTouching()const;
124  double getSticking()const;
125  double getDissipatedEnergy() const;
126  inline Vec3 getDs() {return m_ds;}
127  virtual Vec3 getPos() const {return m_cpos;}
128  Vec3 getForce() const;
129  Vec3 getNormalForce() const;
130 
131  friend ostream& operator<<(ostream&,const CRotThermFrictionInteraction&);
133 
134  // checkpointing
135  virtual void saveRestartData(std::ostream &oStream);
136  virtual void loadRestartData(std::istream &iStream);
137 };
138 
139 #endif //__ROTFRICTIONINTERACTION_H
static ScalarFieldFunction getScalarFieldFunction(const string &)
Definition: RotThermFricInteraction.cpp:381
double m_diffusivity
thermal diffusivity
Definition: RotThermFricInteraction.h:102
CRotThermFrictionIGP()
Definition: RotThermFricInteraction.cpp:22
double k_s
Definition: RotThermFricInteraction.h:51
Definition: RotThermParticle.h:54
double(CRotThermFrictionInteraction::* ScalarFieldFunction)() const
Definition: RotThermFricInteraction.h:74
Definition: vec3.h:46
virtual ~CRotThermFrictionInteraction()
Definition: RotThermFricInteraction.cpp:111
Definition: RotThermFricInteraction.h:69
CRotThermFrictionInteraction()
Definition: RotThermFricInteraction.cpp:52
Abstract base class for InteractionGroup parameters.
Definition: IGParam.h:28
static string getType()
Definition: RotThermFricInteraction.h:112
virtual void saveRestartData(std::ostream &oStream)
Definition: RotThermFricInteraction.cpp:492
void calcNormalForce()
Definition: RotThermFricInteraction.cpp:250
Definition: RotThermFricInteraction.h:34
double getTouching() const
Definition: RotThermFricInteraction.cpp:292
double mu_s
Definition: RotThermFricInteraction.h:50
double m_E_diss
dissipated energy
Definition: RotThermFricInteraction.h:101
static CheckedScalarFieldFunction getCheckedScalarFieldFunction(const string &)
Definition: RotThermFricInteraction.cpp:405
bool m_is_touching
contact status of the interaction
Definition: RotThermFricInteraction.h:100
double getAbsForceDeficit() const
Definition: RotThermFricInteraction.cpp:242
Vec3 m_cpos
contact position
Definition: RotThermFricInteraction.h:97
Definition: RotThermPairInteraction.h:23
void calcHeatTrans()
Definition: RotThermFricInteraction.cpp:335
double m_mu_s
coefficient of static friction
Definition: RotThermFricInteraction.h:92
Vec3(CRotThermFrictionInteraction::* VectorFieldFunction)() const
Definition: RotThermFricInteraction.h:76
Vec3 m_ds
tangitial displacement at this time step
Definition: RotThermFricInteraction.h:103
friend ostream & operator<<(ostream &, const CRotThermFrictionInteraction &)
Definition: RotThermFricInteraction.cpp:540
Vec3 m_normal_force
current normal force
Definition: RotThermFricInteraction.h:98
double m_ks
shear stiffness (Cundall)
Definition: RotThermFricInteraction.h:93
double mu_d
Definition: RotThermFricInteraction.h:49
double diffusivity
Definition: RotThermFricInteraction.h:53
virtual bool isPersistent()
Definition: RotThermFricInteraction.cpp:231
void setTimeStepSize(double deltaT)
Definition: RotThermFricInteraction.h:82
Vec3 m_force_deficit
difference between fric. force & force necessary for slip
Definition: RotThermFricInteraction.h:96
void calcHeatFrict()
Definition: RotThermFricInteraction.cpp:353
double getSticking() const
Definition: RotThermFricInteraction.cpp:302
pair< bool, double >(CRotThermFrictionInteraction::* CheckedScalarFieldFunction)() const
Definition: RotThermFricInteraction.h:75
bool m_is_slipping
static/dynamic status of the interaction
Definition: RotThermFricInteraction.h:99
Vec3 getDs()
Definition: RotThermFricInteraction.h:126
double k
Definition: RotThermFricInteraction.h:48
double m_mu_d
coefficient of dynamic friction
Definition: RotThermFricInteraction.h:91
virtual void loadRestartData(std::istream &iStream)
Definition: RotThermFricInteraction.cpp:519
Vec3 getForce() const
Definition: RotThermFricInteraction.cpp:316
void setTimeStepSize(double deltaT)
Definition: RotThermFricInteraction.h:60
virtual void calcForces()
Definition: RotThermFricInteraction.cpp:118
virtual std::string getTypeString() const
Definition: RotThermFricInteraction.h:55
double getPotentialEnergy() const
Definition: RotThermFricInteraction.cpp:270
virtual Vec3 getPos() const
Definition: RotThermFricInteraction.h:127
CRotThermFrictionIGP ParameterType
Definition: RotThermFricInteraction.h:72
double dt
Definition: RotThermFricInteraction.h:52
static VectorFieldFunction getVectorFieldFunction(const string &)
Definition: RotThermFricInteraction.cpp:417
double m_r0
equilibrium distance
Definition: RotThermFricInteraction.h:90
double getDissipatedEnergy() const
Definition: RotThermFricInteraction.cpp:311
Vec3 getNormalForce() const
Definition: RotThermFricInteraction.cpp:325
double getSlipping() const
Definition: RotThermFricInteraction.cpp:282
double m_dt
time step
Definition: RotThermFricInteraction.h:94
double m_k
spring constant
Definition: RotThermFricInteraction.h:89
Vec3 m_Ffric
current frictional force
Definition: RotThermFricInteraction.h:95
Abstract base/interface class for packed messages to be used in TML_Pack.
Definition: packed_message_interface.h:28