OpenLB 1.8.1
Loading...
Searching...
No Matches
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<bool useCubicBounds = false, typename T , typename PARTICLETYPE , typename F >
void doAtParticleWallContactSpheroid (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, F f)
 
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.
 
template<bool useCubicBounds = false, typename T , typename PARTICLETYPE >
void wallCaptureSpheroidSubgrid (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
 
template<typename T , typename PARTICLETYPE >
void wallCaptureMaterialAwareSpheroidSubgrid (Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
 Wall capture 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 auto latticeR = sGeometry.getCuboidDecomposition().getFloorLatticeR(position);
71 bool foundPos = latticeR.operator bool();
72 if (!foundPos) {
73 std::cerr << "Position (" << position << ") not found!" << std::endl;
74 } else {
75 //Check whether responsible iC
76 bool isLocal = sGeometry.getLoadBalancer().isLocal((*latticeR)[0]);
77 if(isLocal){
78 //Check if in vicinity of specified material numbers
79 bool vicinity = materialVicinity<T,D>(materialIndicator, *latticeR);
80 return vicinity;
81 }
82 }
83 return false;
84}

References olb::particles::access::getPosition(), and materialVicinity().

+ 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.
Definition aliases.h:254
Plain old scalar vector.

References velocityWallReflection().

+ Here is the call graph for this function:

◆ 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 67 of file boundaryHandling.h.

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

◆ doAtParticleWallContactSpheroid()

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

Definition at line 138 of file boundaryHandling.h.

142{
143 using namespace descriptors;
144 //Retrieve quantities
145 auto position = particle.template getField<GENERAL,POSITION>();
146 T radius = particle.template getField<PHYSPROPERTIES,RADIUS>();
147 //VERSION A: Use signed distance functions of indicator
148 if constexpr (!useCubicBounds){
149 STLtriangle<T> tri;
150 //the minus sign is because the signedDistance is defined negative when inside the geometry!
151 T distCenterToWall = solidBoundary.getIndicator()->signedDistance(position);//is positive, if inside, due to negative IndicatorInverse
152
153
154
155 if(distCenterToWall < radius)//deposition for sure
156 {
157 std::cout << "Simple var: Dist to wall < radius and distance is " <<distCenterToWall << " from axis " << std::sqrt(std::pow(position[1],2) + std::pow(position[2],2 )) << " point " << position << " deposited!" << std::endl;
158 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
159 Vector<T,3> normal;//auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
160 T penetrationDepth = -distCenterToWall;
161 f( particle, normal, penetrationDepth );
162 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
163 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
164 f( particle, normal );
165 } else {
166 f( particle );
167 }
168 }
169 else if (distCenterToWall > radius*particle.template getField<NUMERICPROPERTIES,BETA>())//no deposition possible
170 {
171
172 return;}
173 else
174 {
175
176 Vector<T,3> orientation = particle.template getField<NUMERICPROPERTIES,ORIENTATION>();
177 T beta = particle.template getField<NUMERICPROPERTIES,BETA> ();
178 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
179 if (eler::elipsoidDeposition(radius, beta, distCenterToWall, orientation, normal))
180 {
181 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
182 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
183 T penetrationDepth = -distCenterToWall;
184 f( particle, normal, penetrationDepth );
185 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
186 auto normal = getNormalOnClosestSurface( solidBoundary, position, radius );
187 f( particle, normal );
188 } else {
189 f( particle );
190 }
191
192 }
193
194 }
195 }
196 //VERSION B: Use origin and end of cubic indicator bounds (min, max)
197 else {
198 auto origin = solidBoundary.getIndicator()->getMin();
199 auto end = solidBoundary.getIndicator()->getMax();
200 for (int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
201 T posParticleStart = position[iDim] - radius;
202 T posParticleEnd = position[iDim] + radius;
203 //Retrieve distance for lower and upper limit
204 T distToWallOrig = posParticleStart - origin[iDim];
205 T distToWallEnd = end[iDim] - posParticleEnd;
206 //Set up normal
207 Vector<T,PARTICLETYPE::d> normal(0.);
208 //Evaluate distances
209 if (distToWallOrig<=0){
210 normal[iDim] = 1;
211 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
212 T penetrationDepth = -distToWallOrig;
213 f( particle, normal, penetrationDepth );
214 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
215 f( particle, normal );
216 } else {
217 f( particle );
218 }
219 } else if (distToWallEnd<=0){
220 normal[iDim] = -1;
221 if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&,T>){
222 T penetrationDepth = -distToWallEnd;
223 f( particle, normal, penetrationDepth );
224 } else if constexpr (std::is_invocable_v<F,Particle<T,PARTICLETYPE>&,Vector<T,PARTICLETYPE::d>&>){
225 f( particle, normal );
226 } else {
227 f( particle );
228 }
229 }
230 }
231 } //constexpr if (!useCubicBounds)
232}

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

+ Here is the call graph for this function:
+ Here is the caller 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 183 of file particleBoundaries.h.

185{
186 using namespace descriptors;
187 //Execute wall treatment
188 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
189 [&]( Particle<T,PARTICLETYPE>& particle,
191 //Deactivate particle
192 access::setInactive( particle );
193 });
194}

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

+ Here is the call graph for this function:
+ Here is the caller 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 221 of file particleBoundaries.h.

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

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

+ Here is the call 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 42 of file boundaryHandling.h.

44{
45 T delXofCentralDifference = 1.e-8*referenceLength;
46 return solidBoundary.getIndicator()->surfaceNormalExact(position, delXofCentralDifference);
47}

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 50 of file boundaryHandling.h.

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

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 238 of file boundaryHandling.h.

241{
242 auto normalWall = getNormalOnClosestSurface( solidBoundary, position, referenceLength );
243 auto orientation = util::angleBetweenVectors( normalWall, normalToBeComparedTo );
244 return orientation;
245}

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 139 of file particleBoundaries.h.

141{
142 using namespace descriptors;
143 //Check whether still active
144 bool isActive = access::isActive( particle );
145 if (isActive){
146 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
147 if (vicinity){
148 //Deactivate particle
149 access::setInactive( particle );
150 access::setRestingParticle( particle );
151 }
152 }
153}

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 243 of file particleBoundaries.h.

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

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 200 of file particleBoundaries.h.

202{
203 using namespace descriptors;
204 //Check whether still active
205 bool isActive = access::isActive( particle );
206 if (isActive){
207 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
208 if (vicinity){
209 //Deactivate particle
210 access::setInactive( particle );
211 }
212 }
213}

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}
+ Here is the caller graph for this function:

◆ 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 doAtParticleWallContact(), 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:
+ Here is the caller 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 bool isActive = particle.template getField<DYNBEHAVIOUR,ACTIVE>();
121 if (isActive){
122 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
123 [&]( Particle<T,PARTICLETYPE>& particle,
125 //Deactivate particle
126
127 access::setInactive( particle );
128 access::setRestingParticle( particle );
129 });
130 }
131
132}

References doAtParticleWallContact(), 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:

◆ 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 271 of file particleBoundaries.h.

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

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

+ 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 162 of file particleBoundaries.h.

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

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

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

◆ wallCaptureMaterialAwareSpheroidSubgrid()

template<typename T , typename PARTICLETYPE >
void olb::particles::boundaries::wallCaptureMaterialAwareSpheroidSubgrid ( 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
  • represents combination of wallCapture and materialCapture
  • intended to use aprior material check to speed up complex SolidBoudaries carying STLs

Definition at line 318 of file particleBoundaries.h.

321{
322 using namespace descriptors;
323 static_assert(PARTICLETYPE::template providesNested<DYNBEHAVIOUR,ACTIVE>(), "Field DYNBEHAVIOUR:ACTIVE has to be provided");
324 //Check whether still active
325 bool isActive = particle.template getField<DYNBEHAVIOUR,ACTIVE>();
326 if (isActive){
327 bool vicinity = checkMaterialVicinity( materialIndicator, particle );
328 if (vicinity){
329 //Apply wall capture
330 //constexpr bool useCubicBounds=false;
331 doAtParticleWallContactSpheroid(particle, solidBoundary,
332 [&] ( Particle<T,PARTICLETYPE>& particle,
333 Vector<T,PARTICLETYPE::d>& normal ) {
334 //Deactivate particle
335 particle.template setField<DYNBEHAVIOUR,ACTIVE>( false );
336 }
337 );
338 }
339 }
340}
void doAtParticleWallContactSpheroid(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, F f)

References checkMaterialVicinity(), and doAtParticleWallContactSpheroid().

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

◆ wallCaptureSpheroidSubgrid()

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

Definition at line 297 of file particleBoundaries.h.

299{
300 using namespace descriptors;
301 static_assert(PARTICLETYPE::template providesNested<DYNBEHAVIOUR,ACTIVE>(), "Field DYNBEHAVIOUR:ACTIVE has to be provided");
302
303 doAtParticleWallContactSpheroid<useCubicBounds>( particle, solidBoundary,
304 [&]( Particle<T,PARTICLETYPE>& particle,
306 //Deactivate particle
307 particle.template setField<DYNBEHAVIOUR,ACTIVE>( false );
308 });
309}

References doAtParticleWallContactSpheroid().

+ 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 doAtParticleWallContact(), 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: