OpenLB 1.7
Loading...
Searching...
No Matches
HaiderLevenspielParticle3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2016 Thomas Henn, Mathias J. Krause, Davide Dapelo
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 HAIDER_LEVENSPIEL_PARTICLE_3D_H
25#define HAIDER_LEVENSPIEL_PARTICLE_3D_H
26
27#include <set>
28#include <vector>
29#include <list>
30#include <deque>
31#include <string>
32#include <iostream>
34
35
36
37
38namespace olb {
39
40
42
43/*
44 * Rotating Particles
45 */
46template<typename T>
48public:
50 //HaiderLevenspielParticle3D(std::vector<T> pos, T mas = 1., T rad = 1.);
51 HaiderLevenspielParticle3D(std::vector<T> pos, std::vector<T> vel, T mas = 1., T rad = 1.);
53 HaiderLevenspielParticle3D(std::vector<T> pos, T mas = 1., T rad = 1., T _volume=1., T _surface = 1.);
54 inline T& getsphericity();
55 inline const T& getsphericity() const;
56 /* inline std::vector<T>& getTorque();
57 inline const std::vector<T>& getTorque() const;
58 void serialize(T serial[]);
59 void unserialize(T*);*/
60 inline T& getA()
61 {
62 return A;
63 };
64 inline T& getB()
65 {
66 return B;
67 };
68 inline T& getC()
69 {
70 return C;
71 };
72 inline T& getD()
73 {
74 return D;
75 };
76 void set_fluidVel(T fluidVel[3])
77 {
78 _fluidVel[0]=fluidVel[0];
79 _fluidVel[1]=fluidVel[1];
80 _fluidVel[2]=fluidVel[2];
81 }
82 T _fluidVel[3] = {};
83
84 static const int serialPartSize = 19;
85
86private:
87//set the radius to volume equivalent radius
88T sphericity;
89 T surface;
90 T volume;
91 //coeficients
92 T A = std::exp(2.3288-6.4581*sphericity + 2.4486*sphericity*sphericity);
93 T B = 0.0964 + 0.5565*sphericity;
94 T C = std::exp(4.905-13.8944*sphericity + 18.4222*sphericity*sphericity-10.2599*sphericity*sphericity*sphericity);
95 T D = std::exp(1.4681+12.2584*sphericity-20.7322*sphericity*sphericity+15.8855*sphericity*sphericity*sphericity);
96// T _fluidVel[3] = {};
97};
98
100
101template<typename T>
103public:
105 inline void simulate(T dT, bool scale = false);
106 inline void simulateWithTwoWayCoupling_Mathias ( T dT,
109 int material, int subSteps = 1, bool scale = false );
110 inline void simulateWithTwoWayCoupling_Davide ( T dT,
113 int material, int subSteps = 1, bool scale = false );
114// multiple collision models
115 inline void simulate(T dT, std::set<int> sActivityOfParticle, bool scale = false);
116
117private:
119
120};
121
122}
123#endif
124
Abstact base class for BaseBackCouplingModel.
Abstact base class for all the forward-coupling models Its raison d'etre consists of not being temple...
void simulateWithTwoWayCoupling_Mathias(T dT, ForwardCouplingModel< T, PARTICLETYPE > &forwardCoupling, BackCouplingModel< T, PARTICLETYPE > &backCoupling, int material, int subSteps=1, bool scale=false)
SimulateParticles(ParticleSystem3D< T, PARTICLETYPE > *ps)
void simulateWithTwoWayCoupling_Davide(T dT, ForwardCouplingModel< T, PARTICLETYPE > &forwardCoupling, BackCouplingModel< T, PARTICLETYPE > &backCoupling, int material, int subSteps=1, bool scale=false)
void simulate(T dT, bool scale=false)
Top level namespace for all of OpenLB.