OpenLB 1.7
Loading...
Searching...
No Matches
particleDynamicsBase.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2021 Nicolas Hafen, Mathias J. Krause
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#ifndef PARTICLE_DYNAMICS_BASE_H
25#define PARTICLE_DYNAMICS_BASE_H
26
27namespace olb {
28
29namespace particles {
30
31namespace dynamics {
32
33
35template<typename T, typename PARTICLETYPE>
38 virtual ~ParticleDynamics() { }
40 virtual void process(Particle<T,PARTICLETYPE>& particle, T timeStepSize) =0;
42 std::string& getName();
44 std::string const& getName() const;
45private:
46 std::string _name;
47};
48
50template<typename T, typename PARTICLETYPE>
51class NoParticleDynamics : public ParticleDynamics<T,PARTICLETYPE> {
52public:
53 NoParticleDynamics( T rhoDummy );
55 void process(Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
56};
57
59template<typename T, typename PARTICLETYPE, typename PCONDITION=conditions::active_particles>
60class VerletParticleDynamics : public ParticleDynamics<T,PARTICLETYPE> {
61public:
65 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
66};
67
69template<typename T, typename PARTICLETYPE, typename PCONDITION=conditions::active_particles>
71public:
75 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
76};
77
79template<typename T, typename PARTICLETYPE, typename PCONDITION=conditions::active_particles>
81public:
85 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
86};
87
88template<typename T, typename PARTICLETYPE, typename PCONDITION=conditions::active_particles>
89class VerletParticleDynamicsRotor : public ParticleDynamics<T,PARTICLETYPE> {
90public:
94 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
95private:
97};
98
100template<typename T, typename PARTICLETYPE, bool useCubicBounds=false,
101 typename PCONDITION=conditions::active_particles>
103 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
104public:
108 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
109private:
110 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
111};
112
114template<typename T, typename PARTICLETYPE, bool useCubicBounds=false,
115 typename PCONDITION=conditions::active_particles>
117 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
118public:
122 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
123private:
124 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
125};
126
129template<typename T, typename PARTICLETYPE,
130 typename PCONDITION=conditions::active_particles>
132 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
133public:
138 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
139private:
140 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _materialIndicator;
141};
142
145template<typename T, typename PARTICLETYPE,
146 typename PCONDITION=conditions::active_particles>
148 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
149public:
154 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
155private:
156 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
157 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _materialIndicator;
158};
159
160
162template<typename T, typename PARTICLETYPE, bool useCubicBounds=false,
163 typename PCONDITION=conditions::active_particles>
165 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
166public:
170 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
171private:
172 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
173};
174
177template<typename T, typename PARTICLETYPE,
178 typename PCONDITION=conditions::active_particles>
180 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
181public:
184 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> materialIndicator );
186 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
187private:
188 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _materialIndicator;
189};
190
193template<typename T, typename PARTICLETYPE,
194 typename PCONDITION=conditions::active_particles>
196 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
197public:
200 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> materialIndicator );
202 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
203private:
204 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
205 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _materialIndicator;
206};
207
208
211template<typename T, typename PARTICLETYPE,
212 typename PCONDITION=conditions::active_particles>
214 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
215public:
218 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> captureMaterialIndicator,
219 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> escapeMaterialIndicator );
221 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
222private:
223 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _captureMaterialIndicator;
224 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _escapeMaterialIndicator;
225};
226
229template<typename T, typename PARTICLETYPE,
230 typename PCONDITION=conditions::active_particles>
232 : public VerletParticleDynamics<T,PARTICLETYPE,PCONDITION> {
233public:
236 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> captureMaterialIndicator,
237 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> escapeMaterialIndicator );
239 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
240private:
241 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
242 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _captureMaterialIndicator;
243 std::shared_ptr<SuperIndicatorMaterial<T,PARTICLETYPE::d>> _escapeMaterialIndicator;
244};
245
246
251template<typename T, typename PARTICLETYPE>
253 : public VerletParticleDynamics<T,PARTICLETYPE,conditions::active_particles> {
254public:
257 Vector<T,PARTICLETYPE::d>& mainFlowDirection,
258 T tiltThreshold = 0.3*M_PI );
260 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
261private:
262 SolidBoundary<T,PARTICLETYPE::d>& _solidBoundary;
263 Vector<T,PARTICLETYPE::d> _mainFlowDirection;
264 T _tiltThreshold; //Tilt angle initiating particle release
265};
266
267
268
269
270//TODO: REWORK FOLLOWING DYNAMICS ACCORDING TO OBOVE ONES
271
272
273//TODO: remove for release
277template<typename T, typename PARTICLETYPE>
279public:
282 PhysR<T,PARTICLETYPE::d>& domainMax );
284 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
285private:
286 PhysR<T,PARTICLETYPE::d> _domainMin;
287 PhysR<T,PARTICLETYPE::d> _domainMax;
288};
289
290
291//TODO: remove for release
294template<typename T, typename PARTICLETYPE, typename DEPOSITION_MODEL>
296public:
299 PhysR<T,PARTICLETYPE::d>& domainMax, DEPOSITION_MODEL& depositionModel );
301 void process (Particle<T,PARTICLETYPE>& particle, T timeStepSize) override;
302private:
303 PhysR<T,PARTICLETYPE::d> _domainMin;
304 PhysR<T,PARTICLETYPE::d> _domainMax;
305 DEPOSITION_MODEL& _depositionModel;
306};
307
308} //namespace dynamics
309
310} //namespace particles
311
312} //namespace olb
313
314#endif
#define M_PI
Plain old scalar vector.
Definition vector.h:47
No particle dynamics equivalent to no lattice dynamics.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Processing step.
Verlet dynamics for particles aware of their DYNAMIC_STATE.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
ParticleDetachmentDynamics(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, Vector< T, PARTICLETYPE::d > &mainFlowDirection, T tiltThreshold=0.3 *M_PI)
Constructor.
Velocity verlet particle dynamics with limitation of position and velocity by checking domain bounds ...
VerletParticleDynamicsCubicBoundsAdhesion(PhysR< T, PARTICLETYPE::d > &domainMin, PhysR< T, PARTICLETYPE::d > &domainMax)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
Velocity verlet particle dynamics with deposition modelling by checking domain bounds in cartesion di...
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.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsEscape(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Constructor.
Standard dynamics with wall capture and material number checks.
VerletParticleDynamicsMaterialAwareEscape(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > materialIndicator)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
Standard dynamics with wall capture nd escape and material number checks.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsMaterialAwareWallCaptureAndEscape(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > captureMaterialIndicator, std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > escapeMaterialIndicator)
Constructor.
Standard dynamics with wall capture and material number checks.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsMaterialAwareWallCapture(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary, std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > >)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsMaterialCaptureAndEscape(std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > captureMaterialIndicator, std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > escapeMaterialIndicator)
Constructor.
VerletParticleDynamicsMaterialCapture(std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > >)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsMaterialEscape(std::shared_ptr< SuperIndicatorMaterial< T, PARTICLETYPE::d > > materialIndicator)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
Verlet particle dynamics only considering rotation (ignoring translation)
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsRotor(Vector< T, PARTICLETYPE::d > angVel)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
Verlet particle dynamics only considering translation (ignoring rotation)
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsVelocityWallReflection(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
VerletParticleDynamicsWallCapture(SolidBoundary< T, PARTICLETYPE::d > &solidBoundary)
Constructor.
void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize) override
Procesisng step.
Top level namespace for all of OpenLB.
std::conditional_t< D==2, SuperIndicatorMaterial2D< T >, SuperIndicatorMaterial3D< T > > SuperIndicatorMaterial
Definition aliases.h:298
std::string & getName()
read and write access to name
virtual void process(Particle< T, PARTICLETYPE > &particle, T timeStepSize)=0
Implementation of the processing step.
virtual ~ParticleDynamics()
Destructor: virtual to enable inheritance.