$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 00029 #ifndef THERMAL_DYNAMICS_H 00030 #define THERMAL_DYNAMICS_H 00031 00032 #include "core/globalDefs.h" 00033 #include "core/dynamics.h" 00034 00035 namespace plb { 00036 00038 template<typename T, template<typename U> class Descriptor> 00039 class ThermalBulkDynamics : public BasicBulkDynamics<T,Descriptor> { 00040 public: 00041 ThermalBulkDynamics(T omega_); 00042 00043 /* *************** Collision, Equilibrium, and Non-equilibrium ******* */ 00044 00046 virtual void regularize(Cell<T,Descriptor>& cell, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00047 T jSqr, Array<T,SymmetricTensor<T,Descriptor>::n> const& PiNeq, T thetaBar=T() ) const; 00048 00049 /* *************** Computation of macroscopic variables ************** */ 00050 00052 virtual T computeTemperature(Cell<T,Descriptor> const& cell) const; 00053 00055 virtual void computeDeviatoricStress ( 00056 Cell<T,Descriptor> const& cell, Array<T,SymmetricTensor<T,Descriptor>::n>& PiNeq ) const; 00057 00059 virtual void computeHeatFlux( Cell<T,Descriptor> const& cell, 00060 Array<T,Descriptor<T>::d>& q ) const; 00061 00062 /* *************** Switch between population and moment representation ****** */ 00063 00065 00071 virtual plint numDecomposedVariables(plint order) const; 00072 00074 00076 virtual void decompose(Cell<T,Descriptor> const& cell, std::vector<T>& rawData, plint order) const; 00077 00079 00084 virtual void recompose(Cell<T,Descriptor>& cell, std::vector<T> const& rawData, plint order) const; 00085 00087 00091 virtual void rescale(std::vector<T>& rawData, T xDxInv, T xDt, plint order) const; 00092 00093 00094 /* *************** Additional moments, intended for internal use ***** */ 00095 00097 virtual T computeEbar(Cell<T,Descriptor> const& cell) const; 00098 00099 private: 00100 virtual void decomposeOrder0(Cell<T,Descriptor> const& cell, std::vector<T>& rawData) const; 00101 virtual void decomposeOrder1(Cell<T,Descriptor> const& cell, std::vector<T>& rawData) const; 00102 virtual void recomposeOrder0(Cell<T,Descriptor>& cell, std::vector<T> const& rawData) const; 00103 virtual void recomposeOrder1(Cell<T,Descriptor>& cell, std::vector<T> const& rawData) const; 00104 virtual void rescaleOrder0(std::vector<T>& rawData, T xDxInv, T xDt) const; 00105 virtual void rescaleOrder1(std::vector<T>& rawData, T xDxInv, T xDt) const; 00106 }; 00107 00109 template<typename T, template<typename U> class Descriptor> 00110 class ThermalBGKdynamics : public ThermalBulkDynamics<T,Descriptor> { 00111 public: 00112 /* *************** Construction / Destruction ************************ */ 00113 ThermalBGKdynamics(T omega_); 00114 00116 virtual ThermalBGKdynamics<T,Descriptor>* clone() const; 00117 00119 virtual int getId() const; 00120 00121 /* *************** Collision and Equilibrium ************************* */ 00122 00124 virtual void collide(Cell<T,Descriptor>& cell, 00125 BlockStatistics& statistics_); 00126 00128 virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, 00129 T jSqr, T thetaBar=T()) const; 00130 private: 00131 static int id; 00132 }; 00133 00134 } 00135 00136 #endif
1.6.3
1.6.3