|
|
|
porousZones.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::porousZones 00027 00028 Description 00029 A centralized porousZone collection. 00030 00031 Container class for a set of porousZones with the porousZone member 00032 functions implemented to loop over the functions for each porousZone. 00033 00034 The input file @c constant/porousZone is implemented as 00035 IOPtrList<porousZone> and contains the following type of data: 00036 00037 @verbatim 00038 1 00039 ( 00040 cat1 00041 { 00042 coordinateSystem system_10; 00043 porosity 0.781; 00044 Darcy 00045 { 00046 d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08); 00047 f f [0 -1 0 0 0] (-1000 -1000 12.83); 00048 } 00049 } 00050 ) 00051 @endverbatim 00052 00053 SourceFiles 00054 porousZones.C 00055 00056 \*---------------------------------------------------------------------------*/ 00057 00058 #ifndef porousZones_H 00059 #define porousZones_H 00060 00061 #include "porousZone.H" 00062 #include "IOPtrList.H" 00063 00064 #include "volFieldsFwd.H" 00065 #include "fvMatrix.H" 00066 #include "oneField.H" 00067 00068 00069 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00070 00071 namespace Foam 00072 { 00073 00074 /*---------------------------------------------------------------------------*\ 00075 Class porousZones Declaration 00076 \*---------------------------------------------------------------------------*/ 00077 00078 class porousZones 00079 : 00080 public IOPtrList<porousZone> 00081 { 00082 // Private data 00083 00084 //- Reference to the finite volume mesh this zone is part of 00085 const fvMesh& mesh_; 00086 00087 // Private Member Functions 00088 00089 //- Disallow default bitwise copy construct 00090 porousZones(const porousZones&); 00091 00092 //- Disallow default bitwise assignment 00093 void operator=(const porousZones&); 00094 00095 00096 //- modify time derivative elements 00097 template<class Type> 00098 void modifyDdt(fvMatrix<Type>&) const; 00099 00100 public: 00101 00102 // Constructors 00103 00104 //- Construct from fvMesh 00105 // with automatically constructed coordinate systems list 00106 porousZones(const fvMesh&); 00107 00108 00109 // Member Functions 00110 00111 //- mirror fvm::ddt with porosity 00112 template<class Type> 00113 tmp<fvMatrix<Type> > ddt 00114 ( 00115 GeometricField<Type, fvPatchField, volMesh>& 00116 ); 00117 00118 //- mirror fvm::ddt with porosity 00119 template<class Type> 00120 tmp<fvMatrix<Type> > ddt 00121 ( 00122 const oneField&, 00123 GeometricField<Type, fvPatchField, volMesh>& 00124 ); 00125 00126 //- mirror fvm::ddt with porosity 00127 template<class Type> 00128 tmp<fvMatrix<Type> > ddt 00129 ( 00130 const dimensionedScalar&, 00131 GeometricField<Type, fvPatchField, volMesh>& 00132 ); 00133 00134 //- mirror fvm::ddt with porosity 00135 template<class Type> 00136 tmp<fvMatrix<Type> > ddt 00137 ( 00138 const volScalarField&, 00139 GeometricField<Type, fvPatchField, volMesh>& 00140 ); 00141 00142 //- Add the viscous and inertial resistance force contribution 00143 // to the momentum equation 00144 void addResistance(fvVectorMatrix& UEqn) const; 00145 00146 //- Add the viscous and inertial resistance force contribution 00147 // to the tensorial diagonal 00148 void addResistance 00149 ( 00150 const fvVectorMatrix& UEqn, 00151 volTensorField& AU 00152 ) const; 00153 00154 //- read modified data 00155 virtual bool readData(Istream&); 00156 00157 //- write data 00158 bool writeData(Ostream&, bool subDict = true) const; 00159 }; 00160 00161 00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00163 00164 } // End namespace Foam 00165 00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00167 00168 #ifdef NoRepository 00169 # include "porousZonesTemplates.C" 00170 #endif 00171 00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00173 00174 #endif 00175 00176 // ************************************************************************* // |