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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::porosityModelList
28
29Description
30 List container for porosity models
31
32SourceFiles
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
47namespace Foam
48{
49
50// Forward declarations
51class porosityModelList;
52Ostream& operator<<(Ostream& os, const porosityModelList& models);
53
54/*---------------------------------------------------------------------------*\
55 Class porosityModelList Declaration
56\*---------------------------------------------------------------------------*/
59:
60 public PtrList<porosityModel>
61{
62private:
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
73protected:
74
75 // Protected data
76
77 //- Reference to the mesh database
78 const fvMesh& mesh_;
79
80
81public:
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// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:121
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
List container for porosity models.
void addResistance(fvVectorMatrix &UEqn)
Add resistance.
void reset(const dictionary &dict)
Reset the source list.
const fvMesh & mesh_
Reference to the mesh database.
bool writeData(Ostream &os) const
Write data to Ostream.
bool read(const dictionary &dict)
Read dictionary.
~porosityModelList()=default
Destructor.
bool active(const bool warn=false) const
Return active status.
fvVectorMatrix & UEqn
Definition: UEqn.H:13
const volScalarField & mu
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
Forward declarations of fvMatrix specializations.
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
dictionary dict