14 #ifndef MODEL_EWALLINTERACTION_HPP
15 #define MODEL_EWALLINTERACTION_HPP
33 f*=3.141592654*this->
m_p->getRad();
45 double dist=(this->m_p->getPos()-this->m_wall->getOrigin())*this->m_wall->getNormal();
48 if(dist<this->m_p->getRad()){
49 Vec3 force=m_k*(this->m_p->getRad()-dist)*this->m_wall->getNormal();
50 Vec3 pos=this->m_p->getPos()-dist*this->m_wall->getNormal();
75 this->m_p->applyForce(force,pos);
76 if(this->m_inner_flag) this->m_wall->addForce(-1.0*force);
87 double dist=(this->m_p->getPos()-this->m_wall->getOrigin())*this->m_wall->getNormal();
88 if(dist<this->m_p->getRad()){
89 force=m_k*(this->m_p->getRad()-dist)*this->m_wall->getNormal();
103 double dist=(this->m_p->getPos()-this->m_wall->getOrigin())*this->m_wall->getNormal();
104 if(dist<this->m_p->getRad()){
virtual double getStiffness()
Definition: EWallInteraction.hpp:100
static bool getDo2dCalculations()
Definition: Particle.h:181
T * m_p
Definition: WallInteraction.h:32
Abstract base for all interactions between a particle and a wall.
Definition: WallInteraction.h:29
base class for all walls
Definition: Wall.h:39
CElasticWallInteraction()
double m_k
spring constant
Definition: EWallInteraction.h:33
virtual Vec3 getForce()
Definition: EWallInteraction.hpp:84
virtual void calcForces()
Definition: EWallInteraction.hpp:42