porosityModelList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2021 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::porosityModelList
26 
27 Description
28  List container for porosity models
29 
30 SourceFiles
31  porosityModelList.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef porosityModelList_H
36 #define porosityModelList_H
37 
38 #include "fvMesh.H"
39 #include "dictionary.H"
40 #include "fvMatricesFwd.H"
41 #include "porosityModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of friend functions and operators
49 class porosityModelList;
50 Ostream& operator<<(Ostream& os, const porosityModelList& models);
51 
52 /*---------------------------------------------------------------------------*\
53  Class porosityModelList Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public PtrList<porosityModel>
59 {
60 protected:
61 
62  // Protected data
63 
64  //- Reference to the mesh database
65  const fvMesh& mesh_;
66 
67 
68 public:
69 
70  // Constructors
71 
73 
74  //- Disallow default bitwise copy construction
75  porosityModelList(const porosityModelList&) = delete;
76 
77 
78  //- Destructor
80 
81 
82  // Member Functions
83 
84  //- Reset the source list
85  void reset(const dictionary& dict);
86 
87  //- Add resistance
89 
90  //- Add resistance
91  void addResistance
92  (
93  const fvVectorMatrix& UEqn,
94  volTensorField& AU,
95  bool correctAUprocBC = true
96  );
97 
98 
99  // I-O
100 
101  //- Read dictionary
102  bool read(const dictionary& dict);
103 
104  //- Write data to Ostream
105  bool writeData(Ostream& os) const;
106 
107  //- Ostream operator
108  friend Ostream& operator<<
109  (
110  Ostream& os,
111  const porosityModelList& models
112  );
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const porosityModelList&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
bool writeData(Ostream &os) const
Write data to Ostream.
dictionary dict
bool read(const dictionary &dict)
Read dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const fvMesh & mesh_
Reference to the mesh database.
porosityModelList(const fvMesh &mesh, const dictionary &dict)
~porosityModelList()
Destructor.
fvMesh & mesh
void reset(const dictionary &dict)
Reset the source list.
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:72
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Forward declarations of fvMatrix specialisations.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
void operator=(const porosityModelList &)=delete
Disallow default bitwise assignment.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
Ostream & operator<<(Ostream &, const ensightPart &)
List container for porosity models.
void addResistance(fvVectorMatrix &UEqn)
Add resistance.
Namespace for OpenFOAM.
fvVectorMatrix & UEqn
Definition: UEqn.H:13