$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 * 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 /* Orestis Malaspinas contributed this code. 00026 */ 00027 00032 #ifndef ENTROPIC_LB_DYNAMICS_H 00033 #define ENTROPIC_LB_DYNAMICS_H 00034 00035 #include "core/globalDefs.h" 00036 #include "basicDynamics/isoThermalDynamics.h" 00037 00038 namespace plb { 00039 00040 template<typename T, template<typename U> class Descriptor> class Cell; 00041 00042 00044 template<typename T, template<typename U> class Descriptor> 00045 class EntropicDynamics : public IsoThermalBulkDynamics<T,Descriptor> 00046 { 00047 public: 00048 /* *************** Construction / Destruction ************************ */ 00049 EntropicDynamics(T omega_); 00050 00052 virtual EntropicDynamics<T,Descriptor>* clone() const; 00053 00055 virtual int getId() const; 00056 00057 /* *************** Collision and Equilibrium ************************* */ 00058 00060 virtual void collide(Cell<T,Descriptor>& cell, 00061 BlockStatistics& statistics_); 00062 00064 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00065 T jSqr, T thetaBar=T()) const; 00066 private: 00068 T computeEntropy(Array<T,Descriptor<T>::q> const& f); 00070 T computeEntropyGrowth(Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq, T alpha); 00073 T computeEntropyGrowthDerivative(Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq, T alpha); 00075 bool getAlpha(T &alpha, Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq); 00076 private: 00077 static int id; 00078 }; 00079 00081 template<typename T, template<typename U> class Descriptor> 00082 class ForcedEntropicDynamics : public IsoThermalBulkDynamics<T,Descriptor> { 00083 public: 00084 /* *************** Construction / Destruction ************************ */ 00085 ForcedEntropicDynamics(T omega_); 00086 00088 virtual ForcedEntropicDynamics<T,Descriptor>* clone() const; 00089 00091 virtual int getId() const; 00092 00093 /* *************** Collision and Equilibrium ************************* */ 00094 00096 virtual void collide(Cell<T,Descriptor>& cell, 00097 BlockStatistics& statistics_); 00098 00100 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00101 T jSqr, T thetaBar=T()) const; 00102 private: 00104 T computeEntropy(Array<T,Descriptor<T>::q> const& f); 00106 T computeEntropyGrowth(Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq, T alpha); 00109 T computeEntropyGrowthDerivative(Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq, T alpha); 00111 bool getAlpha(T &alpha, Array<T,Descriptor<T>::q> const& f, Array<T,Descriptor<T>::q> const& fNeq); 00112 00113 static const int forceBeginsAt = Descriptor<T>::ExternalField::forceBeginsAt; 00114 static const int sizeOfForce = Descriptor<T>::ExternalField::sizeOfForce; 00115 static int id; 00116 }; 00117 00118 } // namespace plb 00119 00120 #endif // ENTROPIC_LB_DYNAMICS_H
1.6.3
1.6.3