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

boussinesqThermalProcessor2D.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 /* Main author: Orestis Malaspinas
00026  */
00027 
00028 #ifndef BOUSSINESQ_THERMAL_PROCESSOR_2D_H
00029 #define BOUSSINESQ_THERMAL_PROCESSOR_2D_H
00030 
00031 #include "core/globalDefs.h"
00032 #include "core/block2D.h"
00033 #include "atomicBlock/dataProcessor2D.h"
00034 #include "atomicBlock/blockLattice2D.h"
00035 
00036 namespace plb {
00037 
00042 template< typename T,
00043           template<typename U1> class FluidDescriptor, 
00044           template<typename U2> class TemperatureDescriptor
00045         >
00046 class BoussinesqThermalProcessor2D :
00047     public BoxProcessingFunctional2D_LL<T,FluidDescriptor,T,TemperatureDescriptor>
00048 {
00049 public:
00050     
00051     BoussinesqThermalProcessor2D(T gravity_, T T0_, T deltaTemp_,
00052                                  Array<T,FluidDescriptor<T>::d> dir_);
00053     
00054     virtual void process( Box2D domain,
00055                           BlockLattice2D<T,FluidDescriptor>& fluid,
00056                           BlockLattice2D<T,TemperatureDescriptor>& temperature );
00057     virtual BoussinesqThermalProcessor2D<T,FluidDescriptor,TemperatureDescriptor>* clone() const;
00058     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
00059         modified[0] = modif::staticVariables;
00060         modified[1] = modif::staticVariables;
00061     }
00062     
00063 private:
00064     T gravity, T0, deltaTemp;
00065     Array<T,FluidDescriptor<T>::d> dir;
00066 };
00067 
00073 template< typename T,
00074           template<typename U1> class FluidDescriptor, 
00075           template<typename U2> class ScalarDescriptor
00076         >
00077 class LatticeToPassiveAdvDiff2D :
00078     public BoxProcessingFunctional2D_LL<T,FluidDescriptor,T,ScalarDescriptor>
00079 {
00080 public:
00081     LatticeToPassiveAdvDiff2D(T scaling_=1.);
00082     virtual void process( Box2D domain,
00083                           BlockLattice2D<T,FluidDescriptor>& fluid,
00084                           BlockLattice2D<T,ScalarDescriptor>& scalar );
00085     virtual LatticeToPassiveAdvDiff2D<T,FluidDescriptor,ScalarDescriptor>* clone() const;
00086     virtual BlockDomain::DomainT appliesTo() const;
00087     void getTypeOfModification(std::vector<modif::ModifT>& modified) const;
00088 private:
00089     T scaling;
00090 };
00091 
00092 }  // namespace plb
00093 
00094 #endif  // BOUSSINESQ_THERMAL_PROCESSOR_2D_H