ESyS-Particle  4.0.1
HertzianViscoElasticFrictionInteraction.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
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 __HERTZIANVISCOELASTICFRICTIONINTERACTION_H
14 #define __HERTZIANVISCOELASTICFRICTIONINTERACTION_H
15 
16 #include "Model/IGParam.h"
17 #include "Model/Interaction.h"
18 #include "Model/Particle.h"
19 #include "Foundation/vec3.h"
20 
21 #include <iostream>
22 #include <utility>
23 
28 {
29 public:
31 
33  const std::string &name,
34  double A,
35  double E,
36  double nu,
37  double fricCoef,
38  double shearK,
39  double dT
40  );
41 
42  virtual std::string getTypeString() const
43  {
44  return "HertzianViscoElasticFriction";
45  }
46 
47  void setTimeStepSize(double dt);
48 
49  double m_A; // Dissipative constant
50  double m_E; // Young's modulus
51  double m_nu; // Poisson ratio
52  double mu; // Friction coefficient
53  double k_s; // Shear coefficient
54  double dt;
55 };
56 
64 {
65  public: // types
67 
68  typedef
69  double (CHertzianViscoElasticFrictionInteraction::* ScalarFieldFunction)(
70  ) const;
71  typedef
72  std::pair<bool,double>
73  (CHertzianViscoElasticFrictionInteraction::* CheckedScalarFieldFunction)(
74  ) const;
75  typedef
76  Vec3 (CHertzianViscoElasticFrictionInteraction::* VectorFieldFunction)(
77  ) const;
78 
79  static ScalarFieldFunction getScalarFieldFunction(const string&);
80  static CheckedScalarFieldFunction getCheckedScalarFieldFunction(
81  const string&
82  );
83  static VectorFieldFunction getVectorFieldFunction(const string&);
84 
85  protected:
86  double m_A;
87  double m_E;
88  double m_nu;
89  double m_r0;
90  double m_mu;
91  double m_ks;
92  double m_dt;
97  double m_dn;
100  double m_E_diss;
101 
102  public:
106  CParticle*,
107  CParticle*,
109  );
111 
112  static string getType() {return "HertzianViscoElasticFriction";};
113 
114  virtual void calcForces();
115  virtual bool isPersistent();
116 
117  void setTimeStepSize(double dt);
118 
119  std::pair<bool,double> getAbsFrictionalForce() const;
120  std::pair<bool,double> getAbsFN() const;
121  std::pair<bool,double> getAbsMuFN() const;
122  std::pair<bool,double> getSlipVelocity() const;
123  std::pair<bool,double> getNormalStress() const;
124  std::pair<bool,double> getMaxFricStress() const;
125  std::pair<bool,double> getAbsFrictionalStress() const;
126 
127  double getAbsForceDeficit() const;
128  double getPotentialEnergy() const;
129  double getSlipping()const;
130  double getSticking()const;
131  double getDissipatedEnergy() const;
132  double Count() const;
133  Vec3 getForce() const;
134  Vec3 getNormalForce() const;
135  virtual Vec3 getPos() const {return m_cpos;};
136 
137  std::pair<bool,double> getMuEff(const Vec3&,const Vec3&) const;
138  std::pair<bool,double> getMuEffXY() const
139  {
140  return getMuEff(Vec3(1.0,0.0,0.0),Vec3(0.0,1.0,0.0));
141  };
142  std::pair<bool,double> getMuEffXZ() const
143  {
144  return getMuEff(Vec3(1.0,0.0,0.0),Vec3(0.0,0.0,1.0));
145  };
146 
147  friend std::ostream& operator<<(
148  std::ostream&,
150  );
151  friend class TML_PackedMessageInterface;
152 };
153 
154 #endif //__HERTZIANVISCOELASTICFRICTIONINTERACTION_H