OpenFOAM: API Guide
v2112
The open source CFD toolbox
pressureControl.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) 2017 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::pressureControl
28
29
Description
30
Provides controls for the pressure reference is closed-volume simulations
31
and a general method for limiting the pressure during the startup of
32
steady-state simulations.
33
34
SourceFiles
35
pressureControlI.H
36
pressureControl.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef pressureControl_H
41
#define pressureControl_H
42
43
#include "
dimensionedScalar.H
"
44
#include "
volFieldsFwd.H
"
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
51
/*---------------------------------------------------------------------------*\
52
Class pressureControl Declaration
53
\*---------------------------------------------------------------------------*/
54
55
class
pressureControl
56
{
57
// Private data
58
59
//- Optional cell in which the reference pressure is set
60
label refCell_;
61
62
//- Optional pressure reference level
63
scalar refValue_;
64
65
//- Pressure lower-limit
66
dimensionedScalar
pMax_;
67
68
//- Pressure upper-limit
69
dimensionedScalar
pMin_;
70
71
//- Pressure lower-limit
72
bool
limitMaxP_;
73
74
//- Pressure upper-limit
75
bool
limitMinP_;
76
77
78
public
:
79
80
// Constructors
81
82
//- Construct from the SIMPLE/PIMPLE sub-dictionary
83
pressureControl
84
(
85
const
volScalarField
&
p
,
86
const
volScalarField
&
rho
,
87
const
dictionary
&
dict
,
88
const
bool
pRefRequired =
true
89
);
90
91
92
// Member Functions
93
94
//- Return the cell in which the reference pressure is set
95
inline
label
refCell
()
const
;
96
97
//- Return the pressure reference level
98
inline
scalar
refValue
()
const
;
99
100
//- Limit the pressure if necessary and return true if so
101
bool
limit
(
volScalarField
&
p
)
const
;
102
};
103
104
105
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107
}
// End namespace Foam
108
109
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111
#include "
pressureControlI.H
"
112
113
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115
#endif
116
117
// ************************************************************************* //
Foam::pressureControl::pressureControl
pressureControl(const volScalarField &p, const volScalarField &rho, const dictionary &dict, const bool pRefRequired=true)
Construct from the SIMPLE/PIMPLE sub-dictionary.
Definition:
pressureControl.C:34
volFieldsFwd.H
Foam::pressureControl::refCell
label refCell() const
Return the cell in which the reference pressure is set.
Definition:
pressureControlI.H:30
p
volScalarField & p
Definition:
createFieldRefs.H:8
Foam::pressureControl::refValue
scalar refValue() const
Return the pressure reference level.
Definition:
pressureControlI.H:36
rho
rho
Definition:
readInitialConditions.H:88
Foam::pressureControl::limit
bool limit(volScalarField &p) const
Limit the pressure if necessary and return true if so.
Definition:
pressureControl.C:231
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
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
dimensionedScalar.H
Foam::pressureControl
Provides controls for the pressure reference is closed-volume simulations and a general method for li...
Definition:
pressureControl.H:54
pressureControlI.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
src
finiteVolume
cfdTools
general
pressureControl
pressureControl.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.