OpenLB 1.7
Loading...
Searching...
No Matches
dragModels3D.h
Go to the documentation of this file.
1/* Lattice Boltzmann sample, written in C++, using the OpenLB
2 * library
3 *
4 * Copyright (C) 2019 Davide Dapelo
5 * E-mail contact: info@openlb.net
6 * The most recent release of OpenLB can be downloaded at
7 * <http://www.openlb.net/>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25/* Drag force models for Lagrangian two-way coupling -- header file.
26 */
27
28#ifndef LB_DRAG_MODELS_H
29#define LB_DRAG_MODELS_H
30
32#include "ReynoldsNumbers3D.h"
33
34namespace olb {
35
39template<typename T, template<typename V> class Particle>
40class DragModel {
41public:
43 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.)=0;
44 virtual std::string name()=0;
45protected:
47 std::shared_ptr<ParticleReynoldsNumber<T, Particle> > _reP;
48};
49
54template<typename T, typename Lattice, template<typename V> class Particle>
55class DragModelBase : public DragModel<T,Particle> {
56public:
60 //virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globic)=0;
61protected:
62 UnitConverter<T, Lattice>& _converter; // reference to a UnitConverter
63};
64
67template<typename T, typename Lattice, template<typename V> class Particle>
68class StokesSimplifiedDragModel : public DragModelBase<T,Lattice,Particle> {
69public:
73 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override;
74 std::string name() override {return "StokesSimplifiedDragModel";}
75};
76
80template<typename T, typename Lattice, template<typename V> class Particle>
81class MorsiDragModel : public DragModelBase<T,Lattice,Particle> {
82public:
86 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override;
87 std::string name() override {return "MorsiDragModel";}
88};
89
93template<typename T, typename Lattice, template<typename V> class Particle>
94class PowerLawMorsiDragModel : public MorsiDragModel<T,Lattice,Particle> {
95public:
98 std::string name() override {return "PowerLawMorsiDragModel";}
99};
100
104template<typename T, typename Lattice, template<typename V> class Particle>
105class SchillerNaumannDragModel : public DragModelBase<T,Lattice,Particle> {
106public:
110 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override;
111 std::string name() override {return "SchillerNaumannDragModel";}
112};
113
117template<typename T, typename Lattice, template<typename V> class Particle>
119public:
122 std::string name() override {return "PowerLawSchillerNaumannDragModel";}
123};
124
128template<typename T, typename Lattice, template<typename V> class Particle>
129class DewsburyDragModel : public DragModelBase<T,Lattice,Particle> {
130public:
134 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override;
135 std::string name() override {return "DewsburyDragModel";}
136};
137
141template<typename T, typename Lattice, template<typename V> class Particle>
142class PowerLawDewsburyDragModel : public DewsburyDragModel<T,Lattice,Particle> {
143public:
146 std::string name() override {return "PowerLawDewsburyDragModel";}
147};
148
152template<typename T, typename Lattice, template<typename V> class Particle>
153class SunDragModel : public DragModelBase<T,Lattice,Particle> {
154public:
158 virtual T operator() (Particle<T>* p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override;
159 std::string name() override {return "SunDragModel";}
160};
161
165template<typename T, typename Lattice, template<typename V> class Particle>
166class PowerLawSunDragModel : public SunDragModel<T,Lattice,Particle> {
167public:
170 std::string name() override {return "PowerLawSunDragModel";}
171};
172
173
174}
175
176#endif
Class to compute the drag coefficient for gas bubbles in a liquid fluid phase as in Dewsbury et al.
DewsburyDragModel(UnitConverter< T, Lattice > &converter)
Constructor.
std::string name() override
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ......
Abstact class for all the drag models.
UnitConverter< T, Lattice > & _converter
Returns the scalar drag coefficient to overload.
DragModelBase(UnitConverter< T, Lattice > &converter)
Constructor.
Abstact base class for DragModelBase.
virtual std::string name()=0
std::shared_ptr< ParticleReynoldsNumber< T, Particle > > _reP
Functional to compute particle Reynolds number.
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.)=0
Returns the scalar drag coefficient to overload. globicFull = { globic, latticeRoundedP[0,...
Class to compute the standard drag coefficient as in Morsi and Alexander (1972).
MorsiDragModel(UnitConverter< T, Lattice > &converter)
Constructor.
std::string name() override
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ......
Class to compute the drag coefficient for gas bubbles in a liquid fluid phase as in Dewsbury et al.
std::string name() override
PowerLawDewsburyDragModel(UnitConverter< T, Lattice > &converter, SuperLattice< T, Lattice > &sLattice)
Constructor.
Class to compute the standard drag coefficient as in Morsi and Alexander (1972), in a power-law fluid...
PowerLawMorsiDragModel(UnitConverter< T, Lattice > &converter, SuperLattice< T, Lattice > &sLattice)
Constructor.
std::string name() override
Class to compute the standard drag coefficient as in Schiller and Naumann (1935), in a power-law flui...
PowerLawSchillerNaumannDragModel(UnitConverter< T, Lattice > &converter, SuperLattice< T, Lattice > &sLattice)
Constructor.
Class to compute the drag coefficient for gas bubbles in a liquid fluid phase as in Sun,...
PowerLawSunDragModel(UnitConverter< T, Lattice > &converter, SuperLattice< T, Lattice > &sLattice)
Constructor.
std::string name() override
Class to compute the standard drag coefficient as in Schiller and Naumann (1935).
SchillerNaumannDragModel(UnitConverter< T, Lattice > &converter)
Constructor.
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ......
std::string name() override
Class to compute a drag coefficient Cd=1.83 for low-Re Stokes drag.
std::string name() override
StokesSimplifiedDragModel(UnitConverter< T, Lattice > &converter)
Constructor.
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ......
Class to compute the drag coefficient for gas bubbles in a liquid fluid phase as in Sun,...
std::string name() override
virtual T operator()(Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ......
SunDragModel(UnitConverter< T, Lattice > &converter)
Constructor.
Super class maintaining block lattices for a cuboid decomposition.
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.