ESyS-Particle  4.0.1
ViscWallInteraction.hpp
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 
14 #ifndef MODEL_VISCWALLINTERACTION_HPP
15 #define MODEL_VISCWALLINTERACTION_HPP
16 
17 #include "Model/ViscWallInteraction.h"
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