SPHinXsys  alpha version
contact_dynamics.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------------------*
2  * SPHinXsys *
3  * --------------------------------------------------------------------------*
4  * SPHinXsys (pronunciation: s'finksis) is an acronym from Smoothed Particle *
5  * Hydrodynamics for industrial compleX systems. It provides C++ APIs for *
6  * physical accurate simulation and aims to model coupled industrial dynamic *
7  * systems including fluid, solid, multi-body dynamics and beyond with SPH *
8  * (smoothed particle hydrodynamics), a meshless computational method using *
9  * particle discretization. *
10  * *
11  * SPHinXsys is partially funded by German Research Foundation *
12  * (Deutsche Forschungsgemeinschaft) DFG HU1527/6-1, HU1527/10-1 *
13  * and HU1527/12-1. *
14  * *
15  * Portions copyright (c) 2017-2020 Technical University of Munich and *
16  * the authors' affiliations. *
17  * *
18  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
19  * not use this file except in compliance with the License. You may obtain a *
20  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
21  * *
22  * --------------------------------------------------------------------------*/
30 #ifndef CONTACT_DYNAMICS_H
31 #define CONTACT_DYNAMICS_H
32 
33 #include "general_solid_dynamics.h"
34 
35 namespace SPH
36 {
37  class SPHBody;
38  class Kernel;
39  namespace solid_dynamics
40  {
41  typedef DataDelegateContact<SolidBody, SolidParticles, Solid, SolidBody, SolidParticles, Solid> ContactDynamicsData;
42  typedef DataDelegateContact<SolidBody, SolidParticles, ElasticSolid, SolidBody, SolidParticles, Solid> ContactWithWallData;
43 
49  {
50  public:
51  explicit SelfContactDensitySummation(SolidBodyRelationSelfContact &self_contact_relation);
52  virtual ~SelfContactDensitySummation(){};
53 
54  protected:
55  StdLargeVec<Real> self_contact_density_;
56  StdLargeVec<Real> &mass_;
57  Real offset_W_ij_;
58 
59  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
60  };
61 
67  {
68  public:
69  explicit ContactDensitySummation(SolidBodyRelationContact &solid_body_contact_relation);
70  virtual ~ContactDensitySummation(){};
71 
72  protected:
73  StdLargeVec<Real> contact_density_;
74  StdLargeVec<Real> &mass_;
75  StdVec<StdLargeVec<Real> *> contact_mass_;
76  StdVec<Real> offset_W_ij_;
77 
78  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
79  };
80 
87  {
88  public:
89  explicit ShellContactDensity(SolidBodyRelationContact &solid_body_contact_relation);
90  virtual ~ShellContactDensity(){};
91 
92  protected:
93  StdLargeVec<Real> contact_density_;
94  StdVec<StdLargeVec<Vecd> *> contact_pos_;
95  StdLargeVec<Vecd> &pos_;
96 
97  Kernel *kernel_;
98  Real spacing_ref_, boundary_factor_;
99 
100  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
101 
103  Real x_0 = 0.774596669241483377035853079956;
104  Real x_1 = 0.000000000000000000000000000000;
105  Real x_2 = -x_0;
106 
107  Real w_0 = 0.555555555555555555555555555556;
108  Real w_1 = 0.888888888888888888888888888889;
109  Real w_2 = w_0;
110  };
111 
117  {
118  public:
119  explicit SelfContactForce(SolidBodyRelationSelfContact &self_contact_relation);
120  virtual ~SelfContactForce(){};
121 
122  protected:
123  StdLargeVec<Real> &mass_, &self_contact_density_, &Vol_;
124  StdLargeVec<Vecd> &acc_prior_, &vel_;
125  Real contact_impedance_;
126 
127  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
128  };
129 
135  {
136  public:
137  explicit ContactForce(SolidBodyRelationContact &solid_body_contact_relation);
138  virtual ~ContactForce(){};
139 
140  protected:
141  StdLargeVec<Real> &contact_density_, &Vol_, &mass_;
142  StdLargeVec<Vecd> &acc_prior_;
143  StdVec<StdLargeVec<Real> *> contact_contact_density_, contact_Vol_;
144 
145  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
146  };
147 
155  {
156  public:
157  explicit ContactForceFromWall(SolidBodyRelationContact &solid_body_contact_relation);
158  virtual ~ContactForceFromWall(){};
159 
160  protected:
161  StdLargeVec<Real> &contact_density_, &Vol_, &mass_;
162  StdLargeVec<Vecd> &acc_prior_;
163  StdVec<StdLargeVec<Real> *> contact_Vol_;
164 
165  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
166  };
167 
173  {
174  public:
175  explicit ContactForceToWall(SolidBodyRelationContact &solid_body_contact_relation);
176  virtual ~ContactForceToWall(){};
177 
178  protected:
179  StdLargeVec<Real> &Vol_, &mass_;
180  StdLargeVec<Vecd> &acc_prior_;
181  StdVec<StdLargeVec<Real> *> contact_contact_density_, contact_Vol_;
182 
183  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
184  };
185 
192  {
193  public:
194  PairwiseFrictionFromWall(BaseBodyRelationContact &contact_relation, Real eta);
196 
197  protected:
198  Real eta_;
199  StdLargeVec<Real> &Vol_, &mass_;
200  StdLargeVec<Vecd> &vel_;
201  StdVec<StdLargeVec<Real> *> wall_Vol_;
202  StdVec<StdLargeVec<Vecd> *> wall_vel_n_, wall_n_;
203 
204  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
205  };
206 
214  {
215  public:
216  explicit DynamicContactForceWithWall(SolidBodyRelationContact &solid_body_contact_relation, Real penalty_strength = 1.0);
217  virtual ~DynamicContactForceWithWall(){};
218 
219  protected:
220  StdLargeVec<Real> &Vol_, &mass_;
221  StdLargeVec<Vecd> &vel_, &acc_prior_;
222  StdVec<StdLargeVec<Real> *> contact_Vol_;
223  StdVec<StdLargeVec<Vecd> *> contact_vel_n_, contact_n_;
224  Real penalty_strength_;
225  Real impedance_, reference_pressure_;
226 
227  virtual void Interaction(size_t index_i, Real dt = 0.0) override;
228  };
229  }
230 }
231 #endif // CONTACT_DYNAMICS_H
Here, we define the algorithm classes for solid dynamics.
Damping to wall by which the wall velocity is not updated and the mass of wall particle is not consid...
Definition: contact_dynamics.h:191
prepare data for inner particle dynamics
Definition: base_particle_dynamics.h:216
Abstract class for particle interaction involving in a body part.
Definition: particle_dynamics_bodypart.h:88
The base relation between a SPH body and its contact SPH bodies.
Definition: base_body_relation.h:136
Computing the contact force from a rigid wall. Note that the body surface of the wall should be updat...
Definition: contact_dynamics.h:154
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:258
Computing the contact force with a rigid wall. Note that the body surface of the wall should be updat...
Definition: contact_dynamics.h:213
Abstract base class of a general SPH kernel function which is a smoothed Dirac delta function...
Definition: base_kernel.h:63
Computing the self-contact force.
Definition: contact_dynamics.h:116
Real x_0
Definition: contact_dynamics.h:103
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:181
This is for the splitting algorithm.
Definition: particle_dynamics_algorithms.h:202
Real eta_
Definition: contact_dynamics.h:195
Computing the summation density due to solid self-contact model.
Definition: contact_dynamics.h:48
prepare data for contact particle dynamics
Definition: base_particle_dynamics.h:240
Computing the summation density due to solid-solid contact model.
Definition: contact_dynamics.h:66
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:102
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:298
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:221
Computing the contact force.
Definition: contact_dynamics.h:134
Computing the contact density due to shell contact using a surface integral being solved by Gauss-Leg...
Definition: contact_dynamics.h:86
The relation for self contact of a solid body.
Definition: inner_body_relation.h:82
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:70
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:145
Computing contact force acting on a rigid wall.
Definition: contact_dynamics.h:172
The relation between a solid body and its contact solid bodies.
Definition: contact_body_relation.h:61
virtual void Interaction(size_t index_i, Real dt=0.0) override
Definition: contact_dynamics.cpp:361
Definition: solid_body_supplementary.cpp:9