26#ifndef PARTICLE_BOUNDARIES_H
27#define PARTICLE_BOUNDARIES_H
40template<
bool useCubicBounds=false,
typename T,
typename PARTICLETYPE>
43 T coefficientOfRestitution=1.0 )
45 using namespace descriptors;
47 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
54 for (
int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
56 position[iDim] += normal[iDim] * 2.*penetrationDepth;
58 velocity[iDim] += std::abs(normal[iDim]) * -2.*velocity[iDim];
59 velocity[iDim] *= coefficientOfRestitution;
69template<
typename T,
typename PARTICLETYPE>
76 std::unique_ptr<IndicatorF<T,PARTICLETYPE::d>> boundaryIndicator =
77 std::make_unique<IndicInverse<T,PARTICLETYPE::d>>(cuboid);
80 velocityWallReflection<true>( particle, solidBoundary );
86template<
bool useCubicBounds=false,
typename T,
typename PARTICLETYPE>
90 using namespace descriptors;
92 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
99 for (
int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
101 position[iDim] += normal[iDim] * 2.*penetrationDepth;
114template<
bool useCubicBounds=false,
typename T,
typename PARTICLETYPE>
118 using namespace descriptors;
120 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
133template<
typename T,
typename PARTICLETYPE>
137 using namespace descriptors;
156template<
typename T,
typename PARTICLETYPE>
161 using namespace descriptors;
168 constexpr bool useCubicBounds=
false;
169 wallCapture<useCubicBounds>(particle, solidBoundary);
177template<
bool useCubicBounds=false,
typename T,
typename PARTICLETYPE>
181 using namespace descriptors;
183 doAtParticleWallContact<useCubicBounds>( particle, solidBoundary,
194template<
typename T,
typename PARTICLETYPE>
198 using namespace descriptors;
215template<
typename T,
typename PARTICLETYPE>
220 using namespace descriptors;
226 constexpr bool useCubicBounds=
false;
227 boundaries::escape<useCubicBounds>(particle, solidBoundary);
237template<
typename T,
typename PARTICLETYPE>
242 using namespace descriptors;
265template<
typename T,
typename PARTICLETYPE>
271 using namespace descriptors;
277 constexpr bool useCubicBounds=
false;
278 boundaries::wallCapture<useCubicBounds>(particle, solidBoundary);
283 constexpr bool useCubicBounds=
false;
284 boundaries::escape<useCubicBounds>(particle, solidBoundary);
indicator function for a 3d-cuboid, parallel to the planes x=0, y=0, z=0.
bool isActive(Particle< T, PARTICLETYPE > particle)
void setRestingParticle(Particle< T, PARTICLETYPE > particle)
Vector< T, PARTICLETYPE::d > getVelocity(Particle< T, PARTICLETYPE > particle)
void setVelocity(Particle< T, PARTICLETYPE > particle, Vector< T, PARTICLETYPE::d > velocity)
void setInactive(Particle< T, PARTICLETYPE > particle, bool value=true)
void setPosition(Particle< T, PARTICLETYPE > particle, Vector< T, PARTICLETYPE::d > position)
Vector< T, PARTICLETYPE::d > getPosition(Particle< T, PARTICLETYPE > particle)
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.
void wallCaptureMaterialAware(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
Wall capture with material awareness.
void escapeMaterialAware(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
Escape boundary with material awareness.
void materialEscape(Particle< T, PARTICLETYPE > &particle, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
Escape boundary based on material rather than SolidBoundary.
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.
void wallSlip(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Wall slip.
void velocityWallReflection(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, T coefficientOfRestitution=1.0)
Velocity wall reflection.
void cuboidVelocityWallReflection(Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > origin, Vector< T, PARTICLETYPE::d > end)
Alias for cubic version of velocity wall reflection.
void wallCapture(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Wall capture.
void materialCapture(Particle< T, PARTICLETYPE > &particle, SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator)
Wall capture based on material rather than SolidBoundary.
void escape(Particle< T, PARTICLETYPE > &particle, SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Escape.
bool checkMaterialVicinity(SuperIndicatorMaterial< T, PARTICLETYPE::d > &materialIndicator, Particle< T, PARTICLETYPE > &particle)
Top level namespace for all of OpenLB.
std::conditional_t< D==2, SuperIndicatorMaterial2D< T >, SuperIndicatorMaterial3D< T > > SuperIndicatorMaterial