$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 REGULARIZED_BOUNDARY_DYNAMICS_3D_H 00030 #define REGULARIZED_BOUNDARY_DYNAMICS_3D_H 00031 00032 #include "core/globalDefs.h" 00033 #include "boundaryCondition/regularizedBoundaryDynamics.h" 00034 00035 namespace plb { 00036 00037 template<typename T, template<typename U> class Descriptor, 00038 int plane, int normal1, int normal2> 00039 class RegularizedVelocityInnerEdgeDynamics3D : public BoundaryCompositeDynamics<T,Descriptor> 00040 { 00041 public: 00042 enum { direction1 = (plane+1)%3, direction2 = (plane+2)%3 }; 00043 public: 00044 /* *************** Construction and Destruction ********************** */ 00045 00046 RegularizedVelocityInnerEdgeDynamics3D(Dynamics<T,Descriptor>* baseDynamics_, 00047 bool automaticPrepareCollision_=true); 00048 00050 virtual RegularizedVelocityInnerEdgeDynamics3D 00051 <T,Descriptor,plane,normal1,normal2>* clone() const; 00052 00053 virtual void replaceBaseDynamics(Dynamics<T,Descriptor>* newBaseDynamics); 00054 00055 /* *************** Computation of macroscopic variables ************** */ 00056 00058 virtual void computeVelocity( Cell<T,Descriptor> const& cell, 00059 Array<T,Descriptor<T>::d>& u_ ) const; 00060 00062 virtual void defineVelocity(Cell<T,Descriptor>& cell, Array<T,Descriptor<T>::d> const& u_); 00063 00065 virtual T computeDensity(Cell<T,Descriptor> const& cell) const; 00066 00067 /* *************** Other virtual methods ***************************** */ 00068 00070 virtual T computeRhoBar(Cell<T,Descriptor> const& cell) const; 00071 00073 virtual void computeRhoBarJ(Cell<T,Descriptor> const& cell, 00074 T& rhoBar_, Array<T,Descriptor<T>::d>& j) const; 00075 00078 virtual void computeRhoBarJPiNeq(Cell<T,Descriptor> const& cell, 00079 T& rhoBar, Array<T,Descriptor<T>::d>& j, 00080 Array<T,SymmetricTensor<T,Descriptor>::n>& PiNeq) const; 00081 00083 virtual void completePopulations(Cell<T,Descriptor>& cell) const; 00084 private: 00085 RegularizedVelocityBoundaryDynamics<T,Descriptor,direction1,normal1> dynamics1; 00086 RegularizedVelocityBoundaryDynamics<T,Descriptor,direction2,normal2> dynamics2; 00087 }; 00088 00089 00090 template<typename T, template<typename U> class Descriptor, 00091 int normalX, int normalY, int normalZ> 00092 class RegularizedVelocityInnerCornerDynamics3D : public BoundaryCompositeDynamics<T,Descriptor> { 00093 public: 00094 /* *************** Construction and Destruction ********************** */ 00095 00096 RegularizedVelocityInnerCornerDynamics3D(Dynamics<T,Descriptor>* baseDynamics_, 00097 bool automaticPrepareCollision_=true); 00098 00100 virtual RegularizedVelocityInnerCornerDynamics3D 00101 <T,Descriptor,normalX,normalY,normalZ>* clone() const; 00102 00103 virtual void replaceBaseDynamics(Dynamics<T,Descriptor>* newBaseDynamics); 00104 00105 /* *************** Computation of macroscopic variables ************** */ 00106 00108 virtual void computeVelocity( Cell<T,Descriptor> const& cell, 00109 Array<T,Descriptor<T>::d>& u_ ) const; 00110 00112 virtual void defineVelocity(Cell<T,Descriptor>& cell, Array<T,Descriptor<T>::d> const& u_); 00113 00115 virtual T computeDensity(Cell<T,Descriptor> const& cell) const; 00116 00117 /* *************** Other virtual methods ***************************** */ 00118 00120 virtual T computeRhoBar(Cell<T,Descriptor> const& cell) const; 00121 00123 virtual void computeRhoBarJ(Cell<T,Descriptor> const& cell, 00124 T& rhoBar_, Array<T,Descriptor<T>::d>& j) const; 00125 00128 virtual void computeRhoBarJPiNeq(Cell<T,Descriptor> const& cell, 00129 T& rhoBar, Array<T,Descriptor<T>::d>& j, 00130 Array<T,SymmetricTensor<T,Descriptor>::n>& PiNeq) const; 00131 00133 virtual void completePopulations(Cell<T,Descriptor>& cell) const; 00134 private: 00135 RegularizedVelocityBoundaryDynamics<T,Descriptor,0,normalX> xDynamics; 00136 RegularizedVelocityBoundaryDynamics<T,Descriptor,1,normalY> yDynamics; 00137 RegularizedVelocityBoundaryDynamics<T,Descriptor,2,normalZ> zDynamics; 00138 }; 00139 00140 } // namespace plb 00141 00142 #endif // REGULARIZED_BOUNDARY_DYNAMICS_3D_H
1.6.3
1.6.3