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
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
Foam::fv::interRegionExplicitPorositySource::firstIter_
bool firstIter_
First iteration.
Definition: interRegionExplicitPorositySource.H:88
Foam::fv::interRegionExplicitPorositySource::~interRegionExplicitPorositySource
virtual ~interRegionExplicitPorositySource()
Destructor.
Definition: interRegionExplicitPorositySource.H:137
Foam::fv::interRegionExplicitPorositySource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Vector.
Definition: interRegionExplicitPorositySource.C:135
Foam::fv::interRegionExplicitPorositySource::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: interRegionExplicitPorositySource.C:288
Foam::label
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
Foam::fv::interRegionOption
Base class for inter-region exchange.
Definition: interRegionOption.H:51
interRegionOption.H
Foam::fv::interRegionExplicitPorositySource::TypeName
TypeName("interRegionExplicitPorositySource")
Runtime type information.
Foam::fv::interRegionExplicitPorositySource::porosityPtr_
autoPtr< porosityModel > porosityPtr_
Run-time selectable porosity model.
Definition: interRegionExplicitPorositySource.H:85
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fv::interRegionExplicitPorositySource::UName_
word UName_
Velocity field name, default = U.
Definition: interRegionExplicitPorositySource.H:91
rho
rho
Definition: pEqn.H:3
fv
labelList fv(nPoints)
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::fv::interRegionExplicitPorositySource::operator=
void operator=(const interRegionExplicitPorositySource &)
Disallow default bitwise assignment.
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource
interRegionExplicitPorositySource(const interRegionExplicitPorositySource &)
Disallow default bitwise copy construct.
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::fv::interRegionExplicitPorositySource::muName_
word muName_
Dynamic viscosity field name (compressible case only)
Definition: interRegionExplicitPorositySource.H:95
Foam::fv::interRegionExplicitPorositySource::initialise
void initialise()
Initialise.
Definition: interRegionExplicitPorositySource.C:50
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::fv::interRegionExplicitPorositySource
Inter-region explicit porosity source.
Definition: interRegionExplicitPorositySource.H:75