porosityModelList.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2014 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::porosityModelList
28 
29 Description
30  List container for porosity models
31 
32 SourceFiles
33  porosityModelList.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef porosityModelList_H
38 #define porosityModelList_H
39 
40 #include "fvMesh.H"
41 #include "dictionary.H"
42 #include "fvMatricesFwd.H"
43 #include "porosityModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward declarations
51 class porosityModelList;
52 Ostream& operator<<(Ostream& os, const porosityModelList& models);
53 
54 /*---------------------------------------------------------------------------*\
55  Class porosityModelList Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public PtrList<porosityModel>
61 {
62 private:
63 
64  // Private Member Functions
65 
66  //- No copy construct
67  porosityModelList(const porosityModelList&) = delete;
68 
69  //- No copy assignment
70  void operator=(const porosityModelList&) = delete;
71 
72 
73 protected:
74 
75  // Protected data
76 
77  //- Reference to the mesh database
78  const fvMesh& mesh_;
79 
80 
81 public:
82 
83  //- Constructor
85 
86  //- Destructor
87  ~porosityModelList() = default;
88 
89 
90  // Member Functions
91 
92  //- Return active status
93  bool active(const bool warn = false) const;
94 
95  //- Reset the source list
96  void reset(const dictionary& dict);
97 
98  //- Add resistance
100 
101  //- Add resistance
102  void addResistance
103  (
105  const volScalarField& rho,
106  const volScalarField& mu
107  );
108 
109  //- Add resistance
110  void addResistance
111  (
112  const fvVectorMatrix& UEqn,
113  volTensorField& AU,
114  bool correctAUprocBC = true
115  );
116 
117 
118  // I-O
119 
120  //- Read dictionary
121  bool read(const dictionary& dict);
122 
123  //- Write data to Ostream
124  bool writeData(Ostream& os) const;
125 
126  //- Ostream operator
127  friend Ostream& operator<<
128  (
129  Ostream& os,
130  const porosityModelList& models
131  );
132 };
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Foam::constant::physicoChemical::mu
const dimensionedScalar mu
Atomic mass unit.
Definition: createFieldRefs.H:4
Foam::porosityModelList::addResistance
void addResistance(fvVectorMatrix &UEqn)
Add resistance.
Definition: porosityModelList.C:123
Foam::porosityModelList::active
bool active(const bool warn=false) const
Return active status.
Definition: porosityModelList.C:49
fvMatricesFwd.H
Forward declarations of fvMatrix specializations.
porosityModel.H
rho
rho
Definition: readInitialConditions.H:88
Foam::porosityModelList
List container for porosity models.
Definition: porosityModelList.H:57
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::porosityModelList::reset
void reset(const dictionary &dict)
Reset the source list.
Definition: porosityModelList.C:66
Foam::porosityModelList::~porosityModelList
~porosityModelList()=default
Destructor.
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::porosityModelList::read
bool read(const dictionary &dict)
Read dictionary.
Definition: porosityModelList.C:97
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
dictionary.H
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::porosityModelList::writeData
bool writeData(Ostream &os) const
Write data to Ostream.
Definition: porosityModelList.C:110
Foam::porosityModelList::mesh_
const fvMesh & mesh_
Reference to the mesh database.
Definition: porosityModelList.H:77
UEqn
fvVectorMatrix & UEqn
Definition: UEqn.H:13
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::GeometricField< scalar, fvPatchField, volMesh >