Loading...
Searching...
No Matches
limitHeight.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) 2022-2025 OpenCFD Ltd.
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::fa::limitHeight
28
29Description
30 Limits the film height to a specified \c max value.
31
32 The \c limitHeight applies an explicit correction to limit the max film
33 height to the user-specified value. This will ensure that the max value
34 is adhered to, but may become unstable if the limiting instigates an
35 oscillatory/destabilising effect into neighbouring faces that then spreads.
36
37Usage
38 Minimal example by using \c constant/faOptions:
39 \verbatim
40 <faOption>
41 {
42 // Mandatory entries
43 type limitHeight;
44 active yes;
45 selectionMode all;
46 max <scalar>;
47
48 // Optional entries
49 h <word>;
50
51 // Inherited entries
52 ...
53 }
54 \endverbatim
55
56 where the entries mean:
57 \table
58 Property | Description | Type | Reqd | Deflt
59 type | Type name: limitHeight | word | yes | -
60 max | Maximum height limit [m] | scalar | yes | -
61 h | Name of operand height field | word | no | h
62 \endtable
63
64 The inherited entries are elaborated in:
65 - \link faceSetOption.H \endlink
66
67SourceFiles
68 limitHeight.C
69
70\*---------------------------------------------------------------------------*/
71
72#ifndef Foam_fa_limitHeight_H
73#define Foam_fa_limitHeight_H
74
75#include "faceSetOption.H"
76
77// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78
79namespace Foam
80{
81namespace fa
82{
83
84/*---------------------------------------------------------------------------*\
85 Class limitHeight Declaration
86\*---------------------------------------------------------------------------*/
87
88class limitHeight
89:
90 public fa::faceSetOption
91{
92protected:
93
94 // Protected Data
95
96 //- Name of operand height field
97 word hName_;
98
99 //- Maximum height [m]
100 scalar max_;
101
102
103public:
104
105 //- Runtime type information
106 TypeName("limitHeight");
108
109 // Constructors
110
111 //- Construct from components
113 (
114 const word& name,
115 const word& modelType,
116 const dictionary& dict,
117 const fvMesh& mesh,
119 const word& defaultAreaName = word()
120 );
121
122 //- No copy construct
123 limitHeight(const limitHeight&) = delete;
124
125 //- No copy assignment
126 void operator=(const limitHeight&) = delete;
127
128
129 //- Destructor
130 virtual ~limitHeight() = default;
132
133 // Member Functions
134
135 //- Read dictionary
136 virtual bool read(const dictionary& dict);
137
138 //- Correct the height field
139 virtual void correct(areaScalarField& h);
140};
141
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145} // End namespace fv
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Intermediate abstract class for handling face-set options for the derived faOptions.
Limits the film height to a specified max value.
virtual ~limitHeight()=default
Destructor.
limitHeight(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from components.
Definition limitHeight.C:45
limitHeight(const limitHeight &)=delete
No copy construct.
TypeName("limitHeight")
Runtime type information.
word hName_
Name of operand height field.
virtual bool read(const dictionary &dict)
Read dictionary.
Definition limitHeight.C:63
scalar max_
Maximum height [m].
void operator=(const limitHeight &)=delete
No copy assignment.
const fvMesh & mesh() const noexcept
Return const access to the volume mesh.
Definition faOption.H:385
const word & name() const noexcept
The source name.
Definition faOption.H:380
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A class for handling words, derived from Foam::string.
Definition word.H:66
thermo correct()
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
dictionary dict
volScalarField & h
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68