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

Velocity verlet particle dynamics with limitation of position and velocity by checking domain bounds in cartesion direcion and simple adhesive force threshold allowing particles only to move when both a normal and tangential force threshold have been surpassed. More...

#include <particleDynamicsBase.h>

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

Public Member Functions

 VerletParticleDynamicsCubicBoundsAdhesion (PhysR< T, PARTICLETYPE::d > &domainMin, PhysR< T, PARTICLETYPE::d > &domainMax)
 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>
class olb::particles::dynamics::VerletParticleDynamicsCubicBoundsAdhesion< T, PARTICLETYPE >

Velocity verlet particle dynamics with limitation of position and velocity by checking domain bounds in cartesion direcion and simple adhesive force threshold allowing particles only to move when both a normal and tangential force threshold have been surpassed.

Definition at line 278 of file particleDynamicsBase.h.

Constructor & Destructor Documentation

◆ VerletParticleDynamicsCubicBoundsAdhesion()

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

Constructor.

Definition at line 437 of file particleDynamicsBase.hh.

441 : _domainMin(domainMin), _domainMax(domainMax)
442{
443 this->getName() = "VerletParticleDynamicsCubicBoundsAdhesion";
444}
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 >
void olb::particles::dynamics::VerletParticleDynamicsCubicBoundsAdhesion< T, PARTICLETYPE >::process ( Particle< T, PARTICLETYPE > & particle,
T timeStepSize )
overridevirtual

Procesisng step.

  • In order to move, both normal and at least one of the tangential adhesion force components have to be surpassed, thus adhesionSuperior = adhesionSuperior || bothTangentalSuperior.
  • Carefull, when debugging: Dont't use << bool, but rather explicit if (bool){ << true } outputs.

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

Definition at line 457 of file particleDynamicsBase.hh.

459{
460 using namespace particles::access;
461 //Calculate acceleration
462 auto acceleration = getAcceleration( particle );
463 //Note position before calculating movement (and store in dynStatePre)
464 DynState<T,PARTICLETYPE> dynStatePre( getPosition(particle) );
465
466 //Check for angular components
467 if constexpr ( providesAngle<PARTICLETYPE>() ) {
468 //Calculate angular acceleration
469 auto angularAcceleration = getAngAcceleration( particle );
470 //Note angle before calculating rotation (and store in dynStatePre)
471 dynStatePre.angle = getAngle( particle );
472 //Verlet algorithm
474 particle, timeStepSize, acceleration, angularAcceleration );
475 } else {
476 //Verlet algorithm
478 particle, timeStepSize, acceleration);
479 }
480
481 //Retrieve force and adhesion threshold
482 auto force = getForce( particle );
483 auto adhesionThreshold = getAdhesion( particle );
484
485 //Check domain contact and potentially reset to positionPre and velocity zero
486 bool adhesionSuperior = false;
487 doAtCubicBoundPenetration( particle, _domainMin, _domainMax,
488 [&](unsigned iDim, Vector<T,PARTICLETYPE::d>& normal, T distToBound ) {
489 //Reset (only!) penetration direction
490 resetDirection( particle, dynStatePre.position, iDim );
491 //Check adhesion in normal direction
492 //-only consider contributions pointing from the surface (normalForce > 0)
493 // to ensure, that pressing on particles does not release them
494 T normalForce = force[iDim]*normal[iDim];
495 if (normalForce > 0 && normalForce < adhesionThreshold[0] ){
496 adhesionSuperior = true;
497 }
498 //Check adhesion in all tangential directions
499 // - info: checks in both directions in both positive and negative direction
500 bool bothTangentalSuperior = true;
501 for (int iDimT=1; iDimT<PARTICLETYPE::d; ++iDimT) {
502 int jDim = (iDim+iDimT)%PARTICLETYPE::d;
503 if (std::abs(force[jDim]) >= adhesionThreshold[1]){ //Tangential direction (absolute)
504 bothTangentalSuperior = false;
505 }
506 }
507 //Combine normal and tangential evaluation
508 adhesionSuperior = adhesionSuperior || bothTangentalSuperior;
509 });
510
511 if constexpr ( providesAngle<PARTICLETYPE>() ) {
512 //Check whether adhesion is superior
513 if (adhesionSuperior){
514 resetMovement( particle, dynStatePre.position, dynStatePre.angle );
515 }
516 //Update rotation matrix
517 updateRotationMatrix( particle );
518 } else {
519 //Check whether adhesion is superior
520 if (adhesionSuperior){ resetMovement( particle, dynStatePre.position); }
521 }
522
523}
Vector< T, PARTICLETYPE::d > getForce(Particle< T, PARTICLETYPE > particle)
Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > getAngAcceleration(Particle< T, PARTICLETYPE > particle)
Vector< T, PARTICLETYPE::d > getAcceleration(Particle< T, PARTICLETYPE > particle)
Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > getAngle(Particle< T, PARTICLETYPE > particle)
Vector< T, PARTICLETYPE::d > getPosition(Particle< T, PARTICLETYPE > particle)
Vector< T, 2 > getAdhesion(Particle< T, PARTICLETYPE > particle)
void resetMovement(Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > positionPre, Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > anglePre=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.))
void velocityVerletIntegration(Particle< T, PARTICLETYPE > &particle, T delTime, Vector< T, PARTICLETYPE::d > acceleration, Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > angularAcceleration)
void resetDirection(Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > positionPre, int iDir)
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::resetDirection(), olb::particles::dynamics::resetMovement(), 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: