Go to the documentation of this file.
38 this->m_sphere=spherep;
45 console.
XDebug() <<
"calculating " << m_interactions.size() <<
" elastic sphere body forces\n" ;
49 it != m_interactions.end();
60 console.
XDebug() <<
"CESphereBodyInteractionGroup::Update()\n" ;
63 <<
"CESphereBodyInteractionGroup::Update: sphere body origin = " << this->m_sphere->getCentre()
64 <<
", sphere body radius = " << this->m_sphere->getRadius() <<
"\n" ;
68 m_interactions.erase(m_interactions.begin(),m_interactions.end());
69 this->m_inner_count=0;
76 bool iflag=PPA->
isInInner((*iter)->getPos());
78 this->m_inner_count+=(iflag ? 1 : 0);
81 console.
XDebug() <<
"end CESphereBodyInteractionGroup::Update()\n";
96 console.
Warning() <<
"No force applied to sphere body in CESphereBodyInteractionGroup::applyForce, which will not converge. If ramping the force, start with a nonzero value.\n";
109 iter!=m_interactions.end();
111 k_local+=
iter->getStiffness();
115 m_k_global=this->m_comm->sum_all(k_local);
122 iter!=m_interactions.end();
127 F_local+=(f_i*O_f)*O_f;
133 double fgx=this->m_comm->sum_all(F_local.
X());
134 double fgy=this->m_comm->sum_all(F_local.
Y());
135 double fgz=this->m_comm->sum_all(F_local.
Z());
144 this->m_sphere->moveBy(d*O_f);
150 this->m_sphere->moveBy(d*O_f);
153 }
while((it<50)&&(ef>1e-3));
156 console.
Warning() <<
"applyForce doesn't converge, global stiffness: " << m_k_global <<
" applied force: " << F <<
"\n";
164 ost <<
"CESphereBodyInteractionGroup" << endl << flush;
165 ost << *(IG.m_sphere) << endl << flush;
ParticleListHandle getParticlesNearSphere(Vec3 c, double r)
Get list of particles near a sphere body. Forwards to NTable::getParticlesNearSphere.
Definition: pp_array.h:193
double getSpringConst() const
Definition: ElasticInteraction.h:36
unbonded elastic interaction between a particle and a wall
Definition: ESphereBodyInteraction.h:31
VEC3_INLINE Vec3 unit() const
Definition: vec3.hpp:225
virtual void Update(ParallelParticleArray< T > *)
Definition: ESphereBodyInteractionGroup.hpp:57
double m_k
Elastic modulus.
Definition: ESphereBodyInteractionGroup.h:59
VEC3_INLINE double norm() const
Definition: vec3.hpp:211
VEC3_INLINE double & X()
Definition: vec3.h:119
NeighborTable< T >::particlelist::iterator ParticleListIterator
Definition: pp_array.h:80
parrallel particle storage array with neighborsearch and variable exchange
Definition: pp_array.h:75
Console & XDebug()
set verbose level of next message to "xdg"
VEC3_INLINE double & Z()
Definition: vec3.h:121
Abstract Base class for a group of interactions between particles and a sphere body.
Definition: SphereBodyIG.h:31
virtual void calcForces()
Definition: ESphereBodyInteractionGroup.hpp:42
CESphereBodyInteractionGroup(TML_Comm *)
Definition: ESphereBodyInteractionGroup.hpp:21
Console & Warning()
set verbose level of next message to "wrn"
base class for spherical non-inertial bodies (similar to simple walls)
Definition: SphereBody.h:40
VEC3_INLINE double & Y()
Definition: vec3.h:120
Template class for a handle/ref. counted pointer.
Definition: handle.h:27
Interaction group parameters for CESphereBodyInteractionGroups.
Definition: ESphereBodyInteractionGroup.h:33
ostream & operator<<(ostream &ost, const CESphereBodyInteractionGroup< T > &IG)
Definition: ESphereBodyInteractionGroup.hpp:162
virtual bool isInInner(const Vec3 &)
Definition: pp_array.hpp:208
boost::python::object iter(const boost::python::object &pyOb)
Definition: Util.h:25
abstract base class for communicator
Definition: comm.h:47
virtual void applyForce(const Vec3 &)
Definition: ESphereBodyInteractionGroup.hpp:92
Console console
Definition: console.cpp:25
Class for a group of unbonded,elastic interactions between particles and a sphere body.
Definition: ESphereBodyInteractionGroup.h:56