00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::porousZones 00026 00027 Description 00028 A centralized porousZone collection. 00029 00030 Container class for a set of porousZones with the porousZone member 00031 functions implemented to loop over the functions for each porousZone. 00032 00033 The input file @c constant/porousZone is implemented as 00034 IOPtrList<porousZone> and contains the following type of data: 00035 00036 @verbatim 00037 1 00038 ( 00039 cat1 00040 { 00041 coordinateSystem system_10; 00042 porosity 0.781; 00043 Darcy 00044 { 00045 d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08); 00046 f f [0 -1 0 0 0] (-1000 -1000 12.83); 00047 } 00048 } 00049 ) 00050 @endverbatim 00051 00052 SourceFiles 00053 porousZones.C 00054 00055 \*---------------------------------------------------------------------------*/ 00056 00057 #ifndef porousZones_H 00058 #define porousZones_H 00059 00060 #include "porousZone.H" 00061 #include <OpenFOAM/IOPtrList.H> 00062 00063 #include <finiteVolume/volFieldsFwd.H> 00064 #include <finiteVolume/fvMatrix.H> 00065 #include <OpenFOAM/geometricOneField.H> 00066 00067 00068 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00069 00070 namespace Foam 00071 { 00072 00073 /*---------------------------------------------------------------------------*\ 00074 Class porousZones Declaration 00075 \*---------------------------------------------------------------------------*/ 00076 00077 class porousZones 00078 : 00079 public IOPtrList<porousZone> 00080 { 00081 // Private data 00082 00083 //- Reference to the finite volume mesh this zone is part of 00084 const fvMesh& mesh_; 00085 00086 // Private Member Functions 00087 00088 //- Disallow default bitwise copy construct 00089 porousZones(const porousZones&); 00090 00091 //- Disallow default bitwise assignment 00092 void operator=(const porousZones&); 00093 00094 00095 //- modify time derivative elements 00096 template<class Type> 00097 void modifyDdt(fvMatrix<Type>&) const; 00098 00099 public: 00100 00101 // Constructors 00102 00103 //- Construct from fvMesh 00104 // with automatically constructed coordinate systems list 00105 porousZones(const fvMesh&); 00106 00107 00108 // Member Functions 00109 00110 //- mirror fvm::ddt with porosity 00111 template<class Type> 00112 tmp<fvMatrix<Type> > ddt 00113 ( 00114 GeometricField<Type, fvPatchField, volMesh>& 00115 ); 00116 00117 //- mirror fvm::ddt with porosity 00118 template<class Type> 00119 tmp<fvMatrix<Type> > ddt 00120 ( 00121 const geometricOneField&, 00122 GeometricField<Type, fvPatchField, volMesh>& 00123 ); 00124 00125 //- mirror fvm::ddt with porosity 00126 template<class Type> 00127 tmp<fvMatrix<Type> > ddt 00128 ( 00129 const dimensionedScalar&, 00130 GeometricField<Type, fvPatchField, volMesh>& 00131 ); 00132 00133 //- mirror fvm::ddt with porosity 00134 template<class Type> 00135 tmp<fvMatrix<Type> > ddt 00136 ( 00137 const volScalarField&, 00138 GeometricField<Type, fvPatchField, volMesh>& 00139 ); 00140 00141 //- Add the viscous and inertial resistance force contribution 00142 // to the momentum equation 00143 void addResistance(fvVectorMatrix& UEqn) const; 00144 00145 //- Add the viscous and inertial resistance force contribution 00146 // to the tensorial diagonal 00147 void addResistance 00148 ( 00149 const fvVectorMatrix& UEqn, 00150 volTensorField& AU 00151 ) const; 00152 00153 //- read modified data 00154 virtual bool readData(Istream&); 00155 00156 //- write data 00157 bool writeData(Ostream&, bool subDict = true) const; 00158 }; 00159 00160 00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00162 00163 } // End namespace Foam 00164 00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00166 00167 #ifdef NoRepository 00168 # include "porousZonesTemplates.C" 00169 #endif 00170 00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00172 00173 #endif 00174 00175 // ************************ vim: set sw=4 sts=4 et: ************************ //