Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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::pressureControl
28
29Description
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
34SourceFiles
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
48namespace Foam
49{
51/*---------------------------------------------------------------------------*\
52 Class pressureControl Declaration
53\*---------------------------------------------------------------------------*/
54
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
67
68 //- Pressure upper-limit
70
71 //- Pressure lower-limit
72 bool limitMaxP_;
73
74 //- Pressure upper-limit
75 bool limitMinP_;
76
77
78public:
79
80 // Constructors
81
82 //- Construct from the SIMPLE/PIMPLE sub-dictionary
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// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
bool limit(volScalarField &p) const
Limit the pressure if necessary and return true if so.
pressureControl(const volScalarField &p, const volScalarField &rho, const dictionary &dict, const bool pRefRequired=true)
Construct from the SIMPLE/PIMPLE sub-dictionary.
scalar refValue() const
Return the pressure reference level.
label refCell() const
Return the cell in which the reference pressure is set.
volScalarField & p
const pressureControl & pressureControl
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dictionary dict
Forwards and collection of common volume field types.