$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* This file is part of the Palabos library. 00002 * 00003 * Copyright (C) 2011 FlowKit Sarl 00004 * Avenue de Chailly 23 00005 * 1012 Lausanne, Switzerland 00006 * E-mail contact: contact@flowkit.com 00007 * 00008 * The most recent release of Palabos can be downloaded at 00009 * <http://www.palabos.org/> 00010 * 00011 * The library Palabos is free software: you can redistribute it and/or 00012 * modify it under the terms of the GNU Affero General Public License as 00013 e* published by the Free Software Foundation, either version 3 of the 00014 * License, or (at your option) any later version. 00015 * 00016 * The library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Affero General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Affero General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 /* Main author: Orestis Malaspinas 00026 */ 00027 00032 #ifndef ADVECTION_DIFFUSION_DYNAMICS_H 00033 #define ADVECTION_DIFFUSION_DYNAMICS_H 00034 00035 #include "core/globalDefs.h" 00036 #include "core/dynamics.h" 00037 00038 namespace plb { 00039 00041 template<typename T, template<typename U> class Descriptor> 00042 class AdvectionDiffusionDynamics : public BasicBulkDynamics<T,Descriptor> { 00043 public: 00044 AdvectionDiffusionDynamics(T omega_); 00045 00046 /* *************** Collision, Equilibrium, and Non-equilibrium ******* */ 00047 00049 virtual void regularize(Cell<T,Descriptor>& cell, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00050 T jSqr, Array<T,SymmetricTensor<T,Descriptor>::n> const& PiNeq, T thetaBar=T() ) const; 00051 00052 /* *************** Additional moments, intended for internal use ***** */ 00053 00055 virtual T computeEbar(Cell<T,Descriptor> const& cell) const; 00056 00057 /* *************** Switch between population and moment representation ****** */ 00058 00060 virtual plint numDecomposedVariables(plint order) const { return 0; } 00061 00063 virtual void decompose(Cell<T,Descriptor> const& cell, std::vector<T>& rawData, plint order) const { } 00064 00066 virtual void recompose(Cell<T,Descriptor>& cell, std::vector<T> const& rawData, plint order) const { } 00067 00069 virtual void rescale(std::vector<T>& rawData, T xDxInv, T xDt, plint order) const { } 00070 00071 }; 00072 00074 00077 template<typename T, template<typename U> class Descriptor> 00078 class AdvectionDiffusionRLBdynamics : public AdvectionDiffusionDynamics <T,Descriptor> { 00079 public: 00081 AdvectionDiffusionRLBdynamics(T omega_); 00083 virtual AdvectionDiffusionRLBdynamics<T,Descriptor>* clone() const; 00085 virtual int getId() const; 00087 virtual void collide(Cell<T,Descriptor>& cell, 00088 BlockStatistics& statistics ); 00090 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00091 T jSqr, T thetaBar=T()) const; 00092 private: 00093 static int id; 00094 }; 00095 00096 template<typename T, template<typename U> class Descriptor> 00097 class AdvectionDiffusionWithSourceRLBdynamics : public AdvectionDiffusionDynamics <T,Descriptor> { 00098 public: 00100 AdvectionDiffusionWithSourceRLBdynamics(T omega_); 00102 virtual AdvectionDiffusionWithSourceRLBdynamics<T,Descriptor>* clone() const; 00104 virtual int getId() const; 00106 virtual void collide(Cell<T,Descriptor>& cell, 00107 BlockStatistics& statistics ); 00109 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00110 T jSqr, T thetaBar=T()) const; 00111 private: 00112 static int id; 00113 }; 00114 00116 template<typename T, template<typename U> class Descriptor> 00117 class SmagorinskyAdvectionDiffusionRLBdynamics : public AdvectionDiffusionDynamics <T,Descriptor> { 00118 public: 00120 SmagorinskyAdvectionDiffusionRLBdynamics(T omega_, T cSmago_); 00122 virtual SmagorinskyAdvectionDiffusionRLBdynamics<T,Descriptor>* clone() const; 00124 virtual int getId() const; 00126 virtual void collide(Cell<T,Descriptor>& cell, 00127 BlockStatistics& statistics ); 00129 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00130 T jSqr, T thetaBar=T()) const; 00131 private: 00132 T cSmago; 00133 static int id; 00134 }; 00135 00137 00140 template<typename T, template<typename U> class Descriptor> 00141 class AdvectionDiffusionBGKdynamics : public AdvectionDiffusionDynamics <T,Descriptor> { 00142 public: 00144 AdvectionDiffusionBGKdynamics(T omega_); 00146 virtual AdvectionDiffusionBGKdynamics<T,Descriptor>* clone() const; 00148 virtual int getId() const; 00150 virtual void collide(Cell<T,Descriptor>& cell, 00151 BlockStatistics& statistics ); 00153 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00154 T jSqr, T thetaBar=T()) const; 00155 00156 /* *************** Switch between population and moment representation ****** */ 00157 00159 virtual plint numDecomposedVariables(plint order) const { return 0; } 00160 00162 virtual void decompose(Cell<T,Descriptor> const& cell, std::vector<T>& rawData, plint order) const { } 00163 00165 virtual void recompose(Cell<T,Descriptor>& cell, std::vector<T> const& rawData, plint order) const { } 00166 00168 virtual void rescale(std::vector<T>& rawData, T xDxInv, T xDt, plint order) const { } 00169 private: 00170 static int id; 00171 }; 00172 00173 } // namespace plb 00174 00175 #endif // ADVECTION_DIFFUSION_DYNAMICS_H
1.6.3
1.6.3