$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

heLeeProcessor3D.h

Go to the documentation of this file.
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  * 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 /* This code was written with help of a Fortran code kindly provided
00026  * by Prof. Taehun Lee, and contains important contributions by
00027  * Andrea Parmigiani.
00028  */
00029 
00030 #ifndef HE_LEE_PROCESSOR_3D_H
00031 #define HE_LEE_PROCESSOR_3D_H
00032 
00033 #include "core/globalDefs.h"
00034 #include "atomicBlock/dataProcessorWrapper3D.h"
00035 #include "atomicBlock/blockLattice3D.h"
00036 #include "multiPhysics/interparticlePotential.h"
00037 
00038 namespace plb {
00039 
00123 
00124 
00131 template<typename T, template<typename U> class Descriptor >
00132 class Compute_C_processor : public BoxProcessingFunctional3D
00133 {
00134 public:
00135     Compute_C_processor(T M_);
00136     virtual void processGenericBlocks(Box3D domain, std::vector<AtomicBlock3D*> blocks);
00137     virtual Compute_C_processor<T,Descriptor>* clone() const;
00138     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00139 private:
00140     T M;
00141 };
00142 
00144 
00149 template<typename T>
00150 class Compute_gradC_rho_mu_processor : public BoxProcessingFunctional3D
00151 {
00152 public:
00153     Compute_gradC_rho_mu_processor(T beta_, T kappa_, T rho_h_, T rho_l_);
00154     virtual void processGenericBlocks(Box3D domain, std::vector<AtomicBlock3D*> blocks);
00155     virtual Compute_gradC_rho_mu_processor<T>* clone() const;
00156     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00157 private:
00158     T beta, kappa;
00159     T rho_h, rho_l;
00160 };
00161 
00164 
00168 template<typename T, template<typename U> class Descriptor >
00169 class Compute_gradMu_laplaceMu_processor : public BoxProcessingFunctional3D
00170 {
00171 public:
00172     Compute_gradMu_laplaceMu_processor();
00173     virtual void processGenericBlocks(Box3D domain, std::vector<AtomicBlock3D*> blocks);
00174     virtual Compute_gradMu_laplaceMu_processor<T,Descriptor>* clone() const;
00175     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00176 };
00177 
00180 
00184 template<typename T, template<typename U> class Descriptor >
00185 class Compute_gradMu_laplaceMu_u_p1_processor : public BoxProcessingFunctional3D
00186 {
00187 public:
00188     Compute_gradMu_laplaceMu_u_p1_processor(T rho_h_, T rho_l_, T RT_);
00189     virtual void processGenericBlocks(Box3D domain, std::vector<AtomicBlock3D*> blocks);
00190     virtual Compute_gradMu_laplaceMu_u_p1_processor<T,Descriptor>* clone() const;
00191     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00192 private:
00193     T rho_h, rho_l, RT;
00194 };
00195 
00199 
00203 template<typename T, template<typename U> class Descriptor >
00204 class HeLeeCollisionProcessor : public BoxProcessingFunctional3D
00205 {
00206 public:
00207     HeLeeCollisionProcessor (
00208             T rho_h_, T rho_l_, T tau_h_, T tau_l_, T M_, T RT_,
00209             bool initialize_ = false );
00210     virtual void processGenericBlocks(Box3D domain, std::vector<AtomicBlock3D*> blocks);
00211     virtual HeLeeCollisionProcessor<T,Descriptor>* clone() const;
00212     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00213 private:
00214     void computeAdvectionTerms (
00215         ScalarField3D<T> const& C, T& adv_gradC, T& bias_adv_gradC,
00216         plint iX, plint iY, plint iZ, plint iPop );
00217 private:
00218     T rho_h, rho_l, tau_h, tau_l, M, RT;
00219     bool initialize;
00220 };
00221 
00222 }  // namespace Palabos
00223 
00224 #endif  // HE_LEE_LATTICES_3D_H