FreeFOAM The Cross-Platform CFD Toolkit
porousZones.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::porousZones
26 
27 Description
28  A centralized porousZone collection.
29 
30  Container class for a set of porousZones with the porousZone member
31  functions implemented to loop over the functions for each porousZone.
32 
33  The input file @c constant/porousZone is implemented as
34  IOPtrList<porousZone> and contains the following type of data:
35 
36  @verbatim
37  1
38  (
39  cat1
40  {
41  coordinateSystem system_10;
42  porosity 0.781;
43  Darcy
44  {
45  d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
46  f f [0 -1 0 0 0] (-1000 -1000 12.83);
47  }
48  }
49  )
50  @endverbatim
51 
52 SourceFiles
53  porousZones.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef porousZones_H
58 #define porousZones_H
59 
60 #include "porousZone.H"
61 #include <OpenFOAM/IOPtrList.H>
62 
64 #include <finiteVolume/fvMatrix.H>
66 
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class porousZones Declaration
75 \*---------------------------------------------------------------------------*/
76 
78 :
79  public IOPtrList<porousZone>
80 {
81  // Private data
82 
83  //- Reference to the finite volume mesh this zone is part of
84  const fvMesh& mesh_;
85 
86  // Private Member Functions
87 
88  //- Disallow default bitwise copy construct
89  porousZones(const porousZones&);
90 
91  //- Disallow default bitwise assignment
92  void operator=(const porousZones&);
93 
94 
95  //- modify time derivative elements
96  template<class Type>
97  void modifyDdt(fvMatrix<Type>&) const;
98 
99 public:
100 
101  // Constructors
102 
103  //- Construct from fvMesh
104  // with automatically constructed coordinate systems list
105  porousZones(const fvMesh&);
106 
107 
108  // Member Functions
109 
110  //- mirror fvm::ddt with porosity
111  template<class Type>
113  (
115  );
116 
117  //- mirror fvm::ddt with porosity
118  template<class Type>
120  (
121  const geometricOneField&,
123  );
124 
125  //- mirror fvm::ddt with porosity
126  template<class Type>
128  (
129  const dimensionedScalar&,
131  );
132 
133  //- mirror fvm::ddt with porosity
134  template<class Type>
136  (
137  const volScalarField&,
139  );
140 
141  //- Add the viscous and inertial resistance force contribution
142  // to the momentum equation
143  void addResistance(fvVectorMatrix& UEqn) const;
144 
145  //- Add the viscous and inertial resistance force contribution
146  // to the tensorial diagonal
147  void addResistance
148  (
149  const fvVectorMatrix& UEqn,
151  ) const;
152 
153  //- read modified data
154  virtual bool readData(Istream&);
155 
156  //- write data
157  bool writeData(Ostream&, bool subDict = true) const;
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #ifdef NoRepository
168 # include "porousZonesTemplates.C"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************ vim: set sw=4 sts=4 et: ************************ //