interRegionExplicitPorositySource.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) 2012-2015 OpenFOAM Foundation
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::fv::interRegionExplicitPorositySource
26 
27 Description
28  Inter-region explicit porosity source
29 
30  Sources described by, for example using the DarcyForchheimer model:
31 
32  interRegionExplicitPorositySourceCoeffs
33  {
34  type DarcyForchheimer;
35  DarcyForchheimerCoeffs
36  {
37  d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
38  f f [0 -1 0 0 0 0 0] (0 0 0);
39 
40  coordinateSystem
41  {
42  e1 (0.70710678 0.70710678 0);
43  e2 (0 0 1);
44  }
45  }
46  }
47 
48 Note:
49  The porous region must be selected as a cellZone.
50 
51 SourceFiles
52  interRegionExplicitPorositySource.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef interRegionExplicitPorositySource_H
57 #define interRegionExplicitPorositySource_H
58 
59 #include "interRegionOption.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 class porosityModel;
67 
68 namespace fv
69 {
70 
71 
72 /*---------------------------------------------------------------------------*\
73  Class interRegionExplicitPorositySource Declaration
74 \*---------------------------------------------------------------------------*/
75 
77 :
78  public interRegionOption
79 {
80 
81 protected:
82 
83  // Protected data
84 
85  //- Run-time selectable porosity model
87 
88  //- First iteration
89  bool firstIter_;
90 
91  //- Velocity field name, default = U
92  word UName_;
93 
94  //- Dynamic viscosity field name (compressible case only)
95  // default = thermo:mu
96  word muName_;
97 
98 
99  // Protected Member Functions
100 
101  //- Initialise
102  void initialise();
103 
104 
105 private:
106 
107  // Private Member Functions
108 
109  //- Disallow default bitwise copy construct
111  (
113  );
114 
115  //- Disallow default bitwise assignment
116  void operator=(const interRegionExplicitPorositySource&);
117 
118 
119 public:
120 
121  //- Runtime type information
122  TypeName("interRegionExplicitPorositySource");
123 
124 
125  // Constructors
126 
127  //- Construct from components
129  (
130  const word& name,
131  const word& modelType,
132  const dictionary& dict,
133  const fvMesh& mesh
134  );
135 
136 
137  //- Destructor
139  {}
140 
141 
142  // Member Functions
143 
144  // Add explicit and implicit contributions
145 
146  //- Vector
147  virtual void addSup
148  (
149  fvMatrix<vector>& eqn,
150  const label fieldI
151  );
152 
153 
154  // Add explicit and implicit contributions to compressible equation
155 
156  //- Vector
157  virtual void addSup
158  (
159  const volScalarField& rho,
160  fvMatrix<vector>& eqn,
161  const label fieldI
162  );
163 
164 
165  // IO
166 
167  //- Read dictionary
168  virtual bool read(const dictionary& dict);
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace fv
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
word muName_
Dynamic viscosity field name (compressible case only)
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
A class for handling words, derived from string.
Definition: word.H:59
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
autoPtr< porosityModel > porosityPtr_
Run-time selectable porosity model.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:68
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
Base class for inter-region exchange.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Vector.
dictionary dict
labelList fv(nPoints)
TypeName("interRegionExplicitPorositySource")
Runtime type information.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
virtual bool read(const dictionary &dict)
Read dictionary.