OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL > Class Template Reference

Velocity verlet particle dynamics with deposition modelling by checking domain bounds in cartesion direcion. More...

#include <particleDynamicsBase.h>

+ Inheritance diagram for olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL >:
+ Collaboration diagram for olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL >:

Public Member Functions

 VerletParticleDynamicsCubicBoundsDeposition (PhysR< T, PARTICLETYPE::d > &domainMin, PhysR< T, PARTICLETYPE::d > &domainMax, DEPOSITION_MODEL &depositionModel)
 Constructor.
 
void process (Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
 Procesisng step.
 
- Public Member Functions inherited from olb::particles::dynamics::ParticleDynamics< T, PARTICLETYPE >
virtual ~ParticleDynamics ()
 Destructor: virtual to enable inheritance.
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 

Detailed Description

template<typename T, typename PARTICLETYPE, typename DEPOSITION_MODEL>
class olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL >

Velocity verlet particle dynamics with deposition modelling by checking domain bounds in cartesion direcion.

Definition at line 295 of file particleDynamicsBase.h.

Constructor & Destructor Documentation

◆ VerletParticleDynamicsCubicBoundsDeposition()

template<typename T , typename PARTICLETYPE , typename DEPOSITION_MODEL >
olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL >::VerletParticleDynamicsCubicBoundsDeposition ( PhysR< T, PARTICLETYPE::d > & domainMin,
PhysR< T, PARTICLETYPE::d > & domainMax,
DEPOSITION_MODEL & depositionModel )

Constructor.

Definition at line 529 of file particleDynamicsBase.hh.

534 : _domainMin(domainMin), _domainMax(domainMax),
535 _depositionModel( depositionModel )
536{
537 this->getName() = "VerletParticleDynamicsCubicBoundsDeposition";
538}
std::string & getName()
read and write access to name

References olb::particles::dynamics::ParticleDynamics< T, PARTICLETYPE >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ process()

template<typename T , typename PARTICLETYPE , typename DEPOSITION_MODEL >
void olb::particles::dynamics::VerletParticleDynamicsCubicBoundsDeposition< T, PARTICLETYPE, DEPOSITION_MODEL >::process ( Particle< T, PARTICLETYPE > & particle,
T timeStepSize )
overridevirtual

Procesisng step.

Implements olb::particles::dynamics::ParticleDynamics< T, PARTICLETYPE >.

Definition at line 543 of file particleDynamicsBase.hh.

544{
545 using namespace particles::access;
546 static_assert( providesActive<PARTICLETYPE>(), "Field ACTIVE has to be provided");
547
548 //Check if active
549 if (particle.template getField<descriptors::DYNBEHAVIOUR,descriptors::ACTIVE>()) {
550
551 auto force = getForce( particle );
552 auto velocity = getVelocity( particle );
553
554 //Check domain contact and check deposition
555 bool deposition = false;
556 doAtCubicBoundPenetration( particle, _domainMin, _domainMax,
557 [&](unsigned iDim, Vector<T,PARTICLETYPE::d>& normal, T distToBound ) {
558 //Check deposition
559 deposition = deposition || _depositionModel.checkDeposition(velocity,normal);
560 //Wall contact treatment
561 if (!deposition) {
562 auto radius = getRadius( particle );
563 T penetrationDepth = -distToBound;
564 T velNormal = -normal[iDim]*velocity[iDim]; //Necessary for damping
565 T forceNormal = _depositionModel.contactForceSphereHalfSpaceDampened(
566 radius, penetrationDepth, velNormal );
567 force[iDim] = forceNormal*normal[iDim];
568 }
569 });
570 particle.template setField<descriptors::FORCING,descriptors::FORCE>( force );
571
572 //Run verlet or deactivate depending on deposition
573 if (!deposition) {
574 //Calculate acceleration
575 auto acceleration = getAcceleration( particle );
576 //Note position before calculating movement
577 auto positionPre = getPosition( particle );
578 //Check for angular components
579 if constexpr ( providesAngle<PARTICLETYPE>() ) {
580 //Calculate angular acceleration
581 auto angularAcceleration = getAngAcceleration( particle );
582 //Verlet algorithm
584 particle, timeStepSize, acceleration, angularAcceleration );
585 //Update rotation matrix
586 updateRotationMatrix( particle );
587 }
588 else {
589 //Verlet algorithm without angle
591 particle, timeStepSize, acceleration );
592 }
593 }
594 else {
595 particle.template setField<descriptors::DYNBEHAVIOUR,descriptors::ACTIVE>( false );
596 particle.template setField<descriptors::MOBILITY,descriptors::VELOCITY>( 0. );
597 particle.template setField<descriptors::MOBILITY,descriptors::ACCELERATION_STRD>( 0. );
598 if constexpr ( providesAngle<PARTICLETYPE>() ) {
599 particle.template setField<descriptors::MOBILITY,descriptors::ANG_VELOCITY>( 0. );
600 particle.template setField<descriptors::MOBILITY,descriptors::ANG_ACC_STRD>( 0. );
601 }
602 }
603 }
604}
Vector< T, PARTICLETYPE::d > getForce(Particle< T, PARTICLETYPE > particle)
Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > getAngAcceleration(Particle< T, PARTICLETYPE > particle)
T getRadius(Particle< T, PARTICLETYPE > &particle)
Vector< T, PARTICLETYPE::d > getVelocity(Particle< T, PARTICLETYPE > particle)
Vector< T, PARTICLETYPE::d > getAcceleration(Particle< T, PARTICLETYPE > particle)
Vector< T, PARTICLETYPE::d > getPosition(Particle< T, PARTICLETYPE > particle)
void velocityVerletIntegration(Particle< T, PARTICLETYPE > &particle, T delTime, Vector< T, PARTICLETYPE::d > acceleration, Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > angularAcceleration)
void updateRotationMatrix(Particle< T, PARTICLETYPE > &particle)
void doAtCubicBoundPenetration(Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > domainMin, Vector< T, PARTICLETYPE::d > domainMax, F boundTreatment)
Helper functions.

References olb::particles::dynamics::doAtCubicBoundPenetration(), olb::particles::dynamics::updateRotationMatrix(), and olb::particles::dynamics::velocityVerletIntegration().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: