OpenLB 1.7
Loading...
Searching...
No Matches
Functions
olb::particles::boundaries Namespace Reference

Functions

template<typename T , unsigned D>
Vector< T, D > getNormalOnClosestSurface (SolidBoundary< T, D > &solidBoundary, Vector< T, D > &position, T referenceLength)
 
template<typename T , typename PARTICLETYPE >
Vector< T, PARTICLETYPE::d > getNormalOnClosestSurface (SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, Particle< T, PARTICLETYPE > &particle)
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE , typename F >
void doAtParticleWallContact (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, F f)
 Generic treatment of particle wall contact.
 
template<typename T , unsigned D>
Vector< T, utilities::dimensions::convert< D >::rotation > getRelativeSurfaceOrientation (SolidBoundary< T, D > &solidBoundary, Vector< T, D > &position, Vector< T, D > &normalToBeComparedTo, T referenceLength)
 
template<typename T , unsigned D>
bool materialVicinity (SuperIndicatorMaterial< T, D > &materialIndicator, LatticeR< D+1 > &latticeR)
 
template<typename T , typename PARTICLETYPE >
bool checkMaterialVicinity (SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator, Particle< T, PARTICLETYPE > &particle)
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void velocityWallReflection (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, T coefficientOfRestitution=1.0)
 Velocity wall reflection.
 
template<typename T , typename PARTICLETYPE >
void cuboidVelocityWallReflection (Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > origin, Vector< T, PARTICLETYPE::d > end)
 Alias for cubic version of velocity wall reflection.
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void wallSlip (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
 Wall slip.
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void wallCapture (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
 Wall capture.
 
template<typename T , typename PARTICLETYPE >
void materialCapture (Particle< T, PARTICLETYPE > &particle, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
 Wall capture based on material rather than SolidBoundary.
 
template<typename T , typename PARTICLETYPE >
void wallCaptureMaterialAware (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
 Wall capture with material awareness.
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void escape (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
 Escape.
 
template<typename T , typename PARTICLETYPE >
void materialEscape (Particle< T, PARTICLETYPE > &particle, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
 Escape boundary based on material rather than SolidBoundary.
 
template<typename T , typename PARTICLETYPE >
void escapeMaterialAware (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
 Escape boundary with material awareness.
 
template<typename T , typename PARTICLETYPE >
void materialCaptureAndEscape (Particle< T, PARTICLETYPE > &particle, SuperIndicatorMaterial< T, PARTICLETYPE::d > &captureMaterialIndicator, SuperIndicatorMaterial< T, PARTICLETYPE::d > &escapeMaterialIndicator)
 Escape and capture based on material rather than SolidBoundary.
 
template<typename T , typename PARTICLETYPE >
void wallCaptureAndEscapeMaterialAware (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &captureMaterialIndicator, SuperIndicatorMaterial< T, PARTICLETYPE::d > &escapeMaterialIndicator)
 Escape boundary with material awareness.
 

Function Documentation

◆ checkMaterialVicinity()

template<typename T , typename PARTICLETYPE >
bool olb::particles::boundaries::checkMaterialVicinity ( SuperIndicatorMaterial< T, PARTICLETYPE::d > & materialIndicator,
Particle< T, PARTICLETYPE > & particle )

Definition at line 60 of file materialHandling.h.

63{
64 constexpr unsigned D = PARTICLETYPE::d;
65 //Retrieve particle position
66 auto position = access::getPosition( particle );
67 //Retrieve super geometry
68 auto& sGeometry = materialIndicator.getSuperGeometry();
69 //Get lattice position
70 LatticeR<D+1> latticeR;
71 bool foundPos = sGeometry.getCuboidGeometry().getFloorLatticeR(position, latticeR);
72 if (!foundPos) {std::cerr << "LatticeR (" << latticeR << ") not found!" << std::endl; }
73 //Check whether responsible iC
74 bool isLocal = sGeometry.getLoadBalancer().isLocal(latticeR[0]);
75 if(isLocal){
76 //Check if in vicinity of specified material numbers
77 bool vicinity = materialVicinity<T,D>( materialIndicator, latticeR );
78 return vicinity;
79 }
80 return false;
81}
Plain old scalar vector.
Definition vector.h:47

References olb::particles::access::getPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cuboidVelocityWallReflection()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::cuboidVelocityWallReflection ( Particle< T, PARTICLETYPE > & particle,
Vector< T, PARTICLETYPE::d > origin,
Vector< T, PARTICLETYPE::d > end )

Alias for cubic version of velocity wall reflection.

  • mainly used as legacy support

Definition at line 70 of file particleBoundaries.h.

72{
73 //Create solid wall
74 Vector<T,PARTICLETYPE::d> extent = end-origin;
75 IndicatorCuboid3D<T> cuboid(extent, origin);
76 std::unique_ptr<IndicatorF<T,PARTICLETYPE::d>> boundaryIndicator =
77 std::make_unique<IndicInverse<T,PARTICLETYPE::d>>(cuboid);
78 SolidBoundary<T,PARTICLETYPE::d> solidBoundary(std::move(boundaryIndicator), 2, 0);
79 //Execute velocity wall reflection
80 velocityWallReflection<true>( particle, solidBoundary );
81}
indicator function for a 3d-cuboid, parallel to the planes x=0, y=0, z=0.

◆ doAtParticleWallContact()

template<bool useCubicBounds = false, typename T , typename PARTICLETYPE , typename F >
void olb::particles::boundaries::doAtParticleWallContact ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
F f )

Generic treatment of particle wall contact.

  • evaluation of penetration by
    • Version A: signed distance function
    • Version B: simple min/max cubic bounds evaluation
  • can be used for:
    • f( particle, normal, penetrationDepth )
    • f( particle, normal )
    • f( particle )

Definition at line 65 of file boundaryHandling.h.

69{
70 using namespace descriptors;
71 //Retrieve quantities
72 auto position = access::getPosition( particle );
73 T radius = access::getRadius( particle );
74 //VERSION A: Use signed distance functions of indicator
75 if constexpr (!useCubicBounds){
76 T distToWall = solidBoundary.getIndicator()->signedDistance(position)-radius;
77 if (distToWall<=0){
78
79 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
80 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
81 T penetrationDepth = -distToWall;
82 f( particle, normal, penetrationDepth );
83 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
84 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
85 f( particle, normal );
86 } else {
87 f( particle );
88 }
89
90 }
91 }
92 //VERSION B: Use origin and end of cubic indicator bounds (min, max)
93 else {
94 auto origin = solidBoundary.getIndicator()->getMin();
95 auto end = solidBoundary.getIndicator()->getMax();
96 for (int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
97 T posParticleStart = position[iDim] - radius;
98 T posParticleEnd = position[iDim] + radius;
99 //Retrieve distance for lower and upper limit
100 T distToWallOrig = posParticleStart - origin[iDim];
101 T distToWallEnd = end[iDim] - posParticleEnd;
102 //Set up normal
103 Vector<T,PARTICLETYPE::d> normal(0.);
104 //Evaluate distances
105 if (distToWallOrig<=0){
106 normal[iDim] = 1;
107 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
108 T penetrationDepth = -distToWallOrig;
109 f( particle, normal, penetrationDepth );
110 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
111 f( particle, normal );
112 } else {
113 f( particle );
114 }
115 } else if (distToWallEnd<=0){
116 normal[iDim] = -1;
117 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
118 T penetrationDepth = -distToWallEnd;
119 f( particle, normal, penetrationDepth );
120 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
121 f( particle, normal );
122 } else {
123 f( particle );
124 }
125 }
126 }
127 } //constexpr if (!useCubicBounds)
128}
Vector< T, D > getNormalOnClosestSurface(SolidBoundary< T, D > &solidBoundary, Vector< T, D > &position, T referenceLength)
IndicatorF< T, D > * getIndicator()
Definition wall.hh:42

References olb::SolidBoundary< T, D >::getIndicator(), getNormalOnClosestSurface(), olb::particles::access::getPosition(), and olb::particles::access::getRadius().

+ Here is the call graph for this function:

◆ escape()

template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void olb::particles::boundaries::escape ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary )

Escape.

  • setting particle field ACTIVE=false

Definition at line 178 of file particleBoundaries.h.

180{
181 using namespace descriptors;
182 //Execute wall treatment
183 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
184 [&]( Particle<T,PARTICLETYPE>& particle,
186 //Deactivate particle
187 access::setInactive( particle );
188 });
189}

References olb::particles::access::setInactive().

+ Here is the call graph for this function:

◆ escapeMaterialAware()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::escapeMaterialAware ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & materialIndicator )

Escape boundary with material awareness.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at wall impact
  • represents combination of wallCapture and materialCapture
  • intended to use aprior material check to speed up complex SolidBoudaries carying STLs

Definition at line 216 of file particleBoundaries.h.

219{
220 using namespace descriptors;
221 //Check whether still active
222 bool isActive = access::isActive( particle );
223 if (isActive){
224 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
225 if (vicinity){
226 constexpr bool useCubicBounds=false;
227 boundaries::escape<useCubicBounds>(particle, solidBoundary);
228 }
229 }
230}
bool checkMaterialVicinity(SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator, Particle< T, PARTICLETYPE > &particle)

References checkMaterialVicinity(), and olb::particles::access::isActive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNormalOnClosestSurface() [1/2]

template<typename T , unsigned D>
Vector< T, D > olb::particles::boundaries::getNormalOnClosestSurface ( SolidBoundary< T, D > & solidBoundary,
Vector< T, D > & position,
T referenceLength )

Definition at line 40 of file boundaryHandling.h.

42{
43 T delXofCentralDifference = 1.e-8*referenceLength;
44 return solidBoundary.getIndicator()->surfaceNormal(position, delXofCentralDifference);
45}

References olb::SolidBoundary< T, D >::getIndicator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNormalOnClosestSurface() [2/2]

template<typename T , typename PARTICLETYPE >
Vector< T, PARTICLETYPE::d > olb::particles::boundaries::getNormalOnClosestSurface ( SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
Particle< T, PARTICLETYPE > & particle )

Definition at line 48 of file boundaryHandling.h.

50{
51 auto position = access::getPosition( particle );
52 auto radius = access::getRadius( particle );
53 return getNormalOnClosestSurface( solidBoundary, position, radius );
54}

References getNormalOnClosestSurface(), olb::particles::access::getPosition(), and olb::particles::access::getRadius().

+ Here is the call graph for this function:

◆ getRelativeSurfaceOrientation()

template<typename T , unsigned D>
Vector< T, utilities::dimensions::convert< D >::rotation > olb::particles::boundaries::getRelativeSurfaceOrientation ( SolidBoundary< T, D > & solidBoundary,
Vector< T, D > & position,
Vector< T, D > & normalToBeComparedTo,
T referenceLength )

Definition at line 134 of file boundaryHandling.h.

137{
138 auto normalWall = getNormalOnClosestSurface( solidBoundary, position, referenceLength );
139 auto orientation = util::angleBetweenVectors( normalWall, normalToBeComparedTo );
140 return orientation;
141}

References olb::util::angleBetweenVectors(), and getNormalOnClosestSurface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ materialCapture()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::materialCapture ( Particle< T, PARTICLETYPE > & particle,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & materialIndicator )

Wall capture based on material rather than SolidBoundary.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at material contact
  • setting resting particle

Definition at line 134 of file particleBoundaries.h.

136{
137 using namespace descriptors;
138 //Check whether still active
139 bool isActive = access::isActive( particle );
140 if (isActive){
141 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
142 if (vicinity){
143 //Deactivate particle
144 access::setInactive( particle );
145 access::setRestingParticle( particle );
146 }
147 }
148}

References checkMaterialVicinity(), olb::particles::access::isActive(), olb::particles::access::setInactive(), and olb::particles::access::setRestingParticle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ materialCaptureAndEscape()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::materialCaptureAndEscape ( Particle< T, PARTICLETYPE > & particle,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & captureMaterialIndicator,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & escapeMaterialIndicator )

Escape and capture based on material rather than SolidBoundary.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at material contact
  • setting resting particle (only capture)

Definition at line 238 of file particleBoundaries.h.

241{
242 using namespace descriptors;
243 //Check whether still active
244 bool isActive = access::isActive( particle );
245 if (isActive){
246 bool vicinity = checkMaterialVicinity( captureMaterialIndicator, particle );
247 if (vicinity){
248 access::setInactive( particle );
249 access::setRestingParticle( particle );
250 }
251 else {
252 vicinity = checkMaterialVicinity( escapeMaterialIndicator, particle );
253 if (vicinity){
254 access::setInactive( particle );
255 }
256 }
257 }
258}

References checkMaterialVicinity(), olb::particles::access::isActive(), olb::particles::access::setInactive(), and olb::particles::access::setRestingParticle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ materialEscape()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::materialEscape ( Particle< T, PARTICLETYPE > & particle,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & materialIndicator )

Escape boundary based on material rather than SolidBoundary.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at material contact

Definition at line 195 of file particleBoundaries.h.

197{
198 using namespace descriptors;
199 //Check whether still active
200 bool isActive = access::isActive( particle );
201 if (isActive){
202 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
203 if (vicinity){
204 //Deactivate particle
205 access::setInactive( particle );
206 }
207 }
208}

References checkMaterialVicinity(), olb::particles::access::isActive(), and olb::particles::access::setInactive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ materialVicinity()

template<typename T , unsigned D>
bool olb::particles::boundaries::materialVicinity ( SuperIndicatorMaterial< T, D > & materialIndicator,
LatticeR< D+1 > & latticeR )

Definition at line 40 of file materialHandling.h.

41{
42 static_assert((D==2 || D==3), "Dimension unknown!");
43 static_assert(D!=2, "2D VERSION NOT IMPLEMENTED YET");
44 if constexpr(D==2){
45 //TODO: implement 2D version
46 } else if constexpr(D==3){
47 return (materialIndicator(latticeR[0],latticeR[1]+1,latticeR[2], latticeR[3] ) ||
48 materialIndicator(latticeR[0],latticeR[1]+1,latticeR[2], latticeR[3]+1 ) ||
49 materialIndicator(latticeR[0],latticeR[1]+1,latticeR[2]+1,latticeR[3] ) ||
50 materialIndicator(latticeR[0],latticeR[1]+1,latticeR[2]+1,latticeR[3]+1 ) ||
51 materialIndicator(latticeR[0],latticeR[1],latticeR[2], latticeR[3] ) ||
52 materialIndicator(latticeR[0],latticeR[1],latticeR[2], latticeR[3]+1 ) ||
53 materialIndicator(latticeR[0],latticeR[1],latticeR[2]+1, latticeR[3] ) ||
54 materialIndicator(latticeR[0],latticeR[1],latticeR[2]+1, latticeR[3]+1 ));
55 }
56}

◆ velocityWallReflection()

template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void olb::particles::boundaries::velocityWallReflection ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
T coefficientOfRestitution = 1.0 )

Velocity wall reflection.

  • applying resurfacing for current timeStep
  • inverting normal velocity component at wall impact for consequtive timeStep

Definition at line 41 of file particleBoundaries.h.

44{
45 using namespace descriptors;
46 //Execute wall treatment
47 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
48 [&]( Particle<T,PARTICLETYPE>& particle,
49 Vector<T,PARTICLETYPE::d>& normal, T penetrationDepth ){
50 //Retrieve velocity
51 auto velocity = access::getVelocity( particle );
52 auto position = access::getPosition( particle );
53 //Modify velocity and set after-reflection position
54 for (int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
55 //1. Resurface
56 position[iDim] += normal[iDim] * 2.*penetrationDepth;
57 //2. Reflection
58 velocity[iDim] += std::abs(normal[iDim]) * -2.*velocity[iDim];
59 velocity[iDim] *= coefficientOfRestitution;
60 }
61 //Apply velocity
62 access::setVelocity( particle, velocity );
63 access::setPosition( particle, position );
64 });
65}

References olb::particles::access::getPosition(), olb::particles::access::getVelocity(), olb::particles::access::setPosition(), and olb::particles::access::setVelocity().

+ Here is the call graph for this function:

◆ wallCapture()

template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void olb::particles::boundaries::wallCapture ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary )

Wall capture.

  • setting particle field ACTIVE=false at wall impact
  • setting resting particle

Definition at line 115 of file particleBoundaries.h.

117{
118 using namespace descriptors;
119 //Execute wall treatment
120 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
121 [&]( Particle<T,PARTICLETYPE>& particle,
123 //Deactivate particle
124 access::setInactive( particle );
125 access::setRestingParticle( particle );
126 });
127}

References olb::particles::access::setInactive(), and olb::particles::access::setRestingParticle().

+ Here is the call graph for this function:

◆ wallCaptureAndEscapeMaterialAware()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::wallCaptureAndEscapeMaterialAware ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & captureMaterialIndicator,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & escapeMaterialIndicator )

Escape boundary with material awareness.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at wall impact
  • represents combination of wallCapture and materialCapture
  • intended to use aprior material check to speed up complex SolidBoudaries carying STLs

Definition at line 266 of file particleBoundaries.h.

270{
271 using namespace descriptors;
272 //Check whether still active
273 bool isActive = access::isActive( particle );
274 if (isActive){
275 bool vicinity = checkMaterialVicinity( captureMaterialIndicator, particle );
276 if (vicinity){
277 constexpr bool useCubicBounds=false;
278 boundaries::wallCapture<useCubicBounds>(particle, solidBoundary);
279 }
280 else {
281 vicinity = checkMaterialVicinity( escapeMaterialIndicator, particle );
282 if (vicinity){
283 constexpr bool useCubicBounds=false;
284 boundaries::escape<useCubicBounds>(particle, solidBoundary);
285 }
286 }
287 }
288}

References checkMaterialVicinity(), and olb::particles::access::isActive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wallCaptureMaterialAware()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::wallCaptureMaterialAware ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary,
SuperIndicatorMaterial< T, PARTICLETYPE::d > & materialIndicator )

Wall capture with material awareness.

  • implies necessity of SuperGeometry, so no DEM only possible
  • setting particle field ACTIVE=false at wall impact
  • setting resting particle
  • represents combination of wallCapture and materialCapture
  • intended to use aprior material check to speed up complex SolidBoudaries carying STLs

Definition at line 157 of file particleBoundaries.h.

160{
161 using namespace descriptors;
162 //Check whether still active
163 bool isActive = access::isActive( particle );
164 if (isActive){
165 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
166 if (vicinity){
167 //Apply wall capture
168 constexpr bool useCubicBounds=false;
169 wallCapture<useCubicBounds>(particle, solidBoundary);
170 }
171 }
172}

References checkMaterialVicinity(), and olb::particles::access::isActive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wallSlip()

template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void olb::particles::boundaries::wallSlip ( Particle< T, PARTICLETYPE > & particle,
SolidBoundary< T, PARTICLETYPE::d > & solidBoundary )

Wall slip.

  • applying resurfacing for current timeStep
  • setting normal velocity component to 0 at wall impact for consequtive timeStep

Definition at line 87 of file particleBoundaries.h.

89{
90 using namespace descriptors;
91 //Execute wall treatment
92 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
93 [&]( Particle<T,PARTICLETYPE>& particle,
94 Vector<T,PARTICLETYPE::d>& normal, T penetrationDepth ){
95 //Retrieve velocity
96 auto velocity = access::getVelocity( particle );
97 auto position = access::getPosition( particle );
98 //Modify velocity and set after-reflection position
99 for (int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
100 //1. Resurface
101 position[iDim] += normal[iDim] * 2.*penetrationDepth;
102 //2. Velocity swallow //TODO: include momentum transfer treatment
103 velocity[iDim] = 0.;
104 }
105 //Apply velocity
106 access::setVelocity( particle, velocity );
107 access::setPosition( particle, position );
108 });
109}

References olb::particles::access::getPosition(), olb::particles::access::getVelocity(), olb::particles::access::setPosition(), and olb::particles::access::setVelocity().

+ Here is the call graph for this function: