ESyS-Particle  2.3.4
ViscWallInteraction.hpp
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
10 // //
12 
13 
14 #ifndef MODEL_VISCWALLINTERACTION_HPP
15 #define MODEL_VISCWALLINTERACTION_HPP
16 
18 
28 template <class T>
30  AWallInteraction<T>(p,w,iflag)
31 {
32  m_nu=nu;
33 }
34 
41 template <class T>
43 {
44  Vec3 vp=this->m_p->getVel();
45  Vec3 vw=this->m_wall->getVel();
46 
47  Vec3 force=m_nu*this->m_p->getMass()*(vp-vw);
48  Vec3 pos=this->m_p->getPos();
49 
50  this->m_p->applyForce(force,pos);
51  if(this->m_inner_flag) this->m_wall->addForce(force);
52 }
53 
57 template <class T>
59 {
60  Vec3 vp=this->m_p->getVel();
61  Vec3 vw=this->m_wall->getVel();
62 
63  Vec3 force=m_nu*this->m_p->getMass()*(vw-vp);
64 
65  return force;
66 }
67 
68 #endif
CWall
base class for all walls
Definition: Wall.h:40
CViscWallInteraction::m_nu
double m_nu
viscosity
Definition: ViscWallInteraction.h:31
AWallInteraction
Abstract base for all interactions between a particle and a wall.
Definition: WallInteraction.h:30
CViscWallInteraction::calcForces
virtual void calcForces()
Definition: ViscWallInteraction.hpp:42
CViscWallInteraction::getForce
virtual Vec3 getForce()
Definition: ViscWallInteraction.hpp:58
ViscWallInteraction.h
CViscWallInteraction::CViscWallInteraction
CViscWallInteraction(T *, CWall *, double, bool)
Definition: ViscWallInteraction.hpp:29
Vec3
Definition: vec3.h:47