24#ifndef PARTICLE_SYSTEM_3D_H
25#define PARTICLE_SYSTEM_3D_H
51template<
typename T,
typename DESCRIPTOR>
52class SuperLatticeInterpPhysVelocity3D;
54template<
typename T,
template<
typename U>
class PARTICLETYPE>
56template<
typename T,
template<
typename U>
class PARTICLETYPE>
58template<
typename T,
template<
typename U>
class PARTICLETYPE>
59class ParticleSystem3D;
60template<
typename T,
template<
typename U>
class PARTICLETYPE>
61class SuperParticleSystem3D;
62template<
typename T,
template<
typename U>
class PARTICLETYPE>
63class SuperParticleSysVtuWriter;
65class SuperParticleSysVtuWriterMag;
72template<
typename T,
template<
typename U>
class PARTICLETYPE>
76 void eraseInactiveParticles();
94 virtual void simulate(T deltatime,
bool scale =
false);
98 int material,
int subSteps,
bool scale );
102 int material,
int subSteps,
bool scale );
104 virtual void simulate(T deltatime, std::set<int> sActivityOfParticle,
bool scale =
false);
133 const PARTICLETYPE<T>&
operator[](
const int i)
const;
136 template<
typename DESCRIPTOR>
143 void setPosExt(std::vector<T> physPos, std::vector<T> physExtend);
165 bool operator() (std::pair<size_t, T> i, std::pair<size_t, T> j)
167 return (i.second < j.second);
203 void explicitEuler(T dT, std::set<int> sActivityOfParticle,
bool scale =
false)
251 void resetMag(std::set<int> sActivityOfParticle) {};
283 std::list<std::shared_ptr<Force3D<T, PARTICLETYPE> > >
_forces;
284 std::list<std::shared_ptr<Boundary3D<T, PARTICLETYPE> > >
_boundaries;
AnalyticalConst: DD -> XD, where XD is defined by value.size()
Abstact base class for BaseBackCouplingModel.
Prototype for all particle boundaries.
Prototype for all particle forces.
Abstact base class for all the forward-coupling models Its raison d'etre consists of not being temple...
class for marking output with some text
bool executeBackwardCoupling(BackCouplingModel< T, PARTICLETYPE > &backwardCoupling, int material, int subSteps=1)
void partialElasticImpact(T restitutionCoeff)
Resets existing particle overlaps in the event of a collision and applies the physics of an partial e...
void clearParticles()
Removes all particles from system.
void setPosExt(std::vector< T > physPos, std::vector< T > physExtend)
Set global coordinates and extends of Particlesystem (SI units)
void setVelToFluidVel(SuperLatticeInterpPhysVelocity3D< T, DESCRIPTOR > &)
Set velocity of all particles to fluid velocity.
void computeForce()
Compute all forces on particles.
std::deque< PARTICLETYPE< T > > & getParticles()
returns deque of particles (no shadow particles) contained in a particleSystem3D
bool executeForwardCoupling(ForwardCouplingModel< T, PARTICLETYPE > &forwardCoupling)
std::list< std::shared_ptr< ParticleOperation3D< T, PARTICLETYPE > > > _particleOperations
std::list< std::shared_ptr< Boundary3D< T, PARTICLETYPE > > > _boundaries
std::list< std::shared_ptr< Force3D< T, PARTICLETYPE > > > getForcesPointer()
returns shared pointer of forces
int sizeInclShadow() const
Get number of particles including shadow particles in ParticleSystem.
std::deque< PARTICLETYPE< T > * > getShadowParticlesPointer()
returns deque of pointer to all shadow particles contained in a particleSystem3D
void addParticle(PARTICLETYPE< T > &p)
Add a particle to ParticleSystem.
std::deque< PARTICLETYPE< T > * > getParticlesPointer()
returns deque of pointer to particles (not shadow particles) contained in a particleSystem3D
void setVelToAnalyticalVel(AnalyticalConst3D< T, T > &)
Set particle velocity to analytical velocity (e.g. as initial condition.
void explicitEuler(T dT, bool scale=false)
Integration method: explicit Euler if scale = true, velocity is scaled to maximal velocity maximal ve...
virtual void simulate(T deltatime, bool scale=false)
void setOverlapZero()
Collision models: Todo: enable for parallel mode Resets existing particle overlaps in the event of a ...
void addShadowParticle(PARTICLETYPE< T > &p)
std::deque< PARTICLETYPE< T > * > getAllParticlesPointer()
returns deque of pointer to all particles (incl.
void integrateTorque(T dT)
int numOfForces()
Get number of linked forces in ParticleSystem.
std::vector< T > _physPos
void printDeep(std::string message="")
virtual void simulateWithTwoWayCoupling_Davide(T dT, ForwardCouplingModel< T, PARTICLETYPE > &forwardCoupling, BackCouplingModel< T, PARTICLETYPE > &backCoupling, int material, int subSteps, bool scale)
virtual ~ParticleSystem3D()
Destructor for ParticleSystem.
void velocityVerlet2(T dT)
int size()
Get number of particles in ParticleSystem.
void computeForce(std::set< int > sActivityOfParticle)
void saveToFile(std::string name)
Save particle positions to file.
void partialElasticImpactV2(T restitutionCoeff)
Applies the physics of an partial elastic impact while multiple particle overlapping only to the part...
void resetMag(std::set< int > sActivityOfParticle)
void velocityVerlet1(T dT)
Integration methods, each need a special template particle.
struct olb::ParticleSystem3D::getMinDistPart getMinDistPartObj
void updateParticleDistribution()
std::deque< PARTICLETYPE< T > > _particles
void computeBoundary()
Compute boundary contact.
std::vector< T > _physExtend
void removeParticle(typename std::deque< PARTICLETYPE< T > >::iterator &p)
std::list< std::shared_ptr< Force3D< T, PARTICLETYPE > > > _forces
virtual void simulateWithTwoWayCoupling_Mathias(T dT, ForwardCouplingModel< T, PARTICLETYPE > &forwardCoupling, BackCouplingModel< T, PARTICLETYPE > &backCoupling, int material, int subSteps, bool scale)
void integrateTorqueMag(T dT)
void addBoundary(std::shared_ptr< Boundary3D< T, PARTICLETYPE > > pB)
Add a boundary to ParticleSystem.
ContactDetection< T, PARTICLETYPE > * _contactDetection
ParticleSystem3D()=default
Default constructor for ParticleSystem.
int numOfActiveParticles()
Get number of active particles in ParticleSystem.
void setOverlapZeroForCombinationWithMechContactForce()
For the combined use of setOverlapZero() and a mechanic contact force.
void computeParticleOperation()
Compute operations on particles.
SuperGeometry< T, 3 > & _superGeometry
const std::vector< T > & getPhysPos()
Get global coordinates and extends of Particlesystem (SI units)
void addForce(std::shared_ptr< Force3D< T, PARTICLETYPE > > pF)
Add a force to ParticleSystem.
ContactDetection< T, PARTICLETYPE > * getDetection()
std::deque< PARTICLETYPE< T > > _shadowParticles
std::deque< std::list< PARTICLETYPE< T > * > > _Agglomerates
Deque of Lists of agglomerated particles.
void getMinDistParticle(std::vector< std::pair< size_t, T > > ret_matches)
int countMaterial(int mat=1)
Get number of particles in vicinity of material number mat.
void initAggloParticles()
Adds new generated particles to the list of non agglomerated Particles.
void findAgglomerates()
Detects and manages particle agglomerates.
void setContactDetection(ContactDetection< T, PARTICLETYPE > &contactDetection)
Set boundary detection algorithm (for future features)
void explicitEuler(T dT, std::set< int > sActivityOfParticle, bool scale=false)
PARTICLETYPE< T > & operator[](const int i)
Get reference to a particle in the ParticleSystem runs over all particles incl.
ContactDetection< T, PARTICLETYPE > * getContactDetection()
void setStoredValues()
Stores old particle positions - is used in ..._ActExt.
const std::vector< T > & getPhysExtend()
void addParticleOperation(std::shared_ptr< ParticleOperation3D< T, PARTICLETYPE > > pO)
Add an operation to ParticleSystem.
SimulateParticles< T, PARTICLETYPE > _sim
void partialElasticImpactForCombinationWithMechContactForce(T restitutionCoeff)
For the combined use of partialElasticImpact() and a mechanic contact force.
void integrateTorqueMag(T dT, std::set< int > sActivityOfParticle)
Representation of a statistic for a parallel 2D geometry.
The class superParticleSystem is the basis for particulate flows within OpenLB.
Top level namespace for all of OpenLB.
Groups all the include .h-files for 3D particles in the particles directory.
Sorts the vector of neighbor Particles by increasing distance.
bool operator()(std::pair< size_t, T > i, std::pair< size_t, T > j)
Representation of a parallel 2D geometry – header file.