Loading...
Searching...
No Matches
fixedMultiPhaseHeatFluxFvPatchScalarField.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) 2015-2020 OpenFOAM Foundation
9 Copyright (C) 2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fixedMultiPhaseHeatFluxFvPatchScalarField
29
30Description
31 Calculates a wall temperature that produces
32 the specified overall wall heat flux across
33 all the phases in an Eulerian multi-phase simulation.
34
35 Intended to be used with \c copiedFixedValue
36 to ensure that phase wall temperature are consistent:
37 - Set \c fixedMultiPhaseHeatFlux boundary for one of the phases
38 - Use \c copiedFixedValue for all the other phases.
39
40Usage
41 Example of the boundary condition specification:
42 \verbatim
43 <patchName>
44 {
45 // Mandatory entries
46 type fixedMultiPhaseHeatFlux;
47 q <scalarField>;
48
49 // Optional entries
50 relax <scalar>;
51 Tmin <scalar>;
52
53 // Inherited entries
54 ...
55 }
56 \endverbatim
57
58 where the entries mean:
59 \table
60 Property | Description | Type | Reqd | Deflt
61 type | Type name: fixedMultiPhaseHeatFlux | word | yes | -
62 q | Heat power [W] or flux [W/m2] | scalarField | yes | -
63 relax | Relaxation factor | scalar | no | 1.0
64 Tmin | Minimum temperature limit [K] | scalar | no | 273.0
65 \endtable
66
67 The inherited entries are elaborated in:
68 - \link fixedValueFvPatchFields.H \endlink
69
70See also
71 Foam::fixedValueFvPatchField
72
73SourceFiles
74 fixedMultiPhaseHeatFluxFvPatchScalarField.C
75
76\*---------------------------------------------------------------------------*/
77
78#ifndef fixedMultiPhaseHeatFluxFvPatchScalarField_H
79#define fixedMultiPhaseHeatFluxFvPatchScalarField_H
80
82
83// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84
85namespace Foam
86{
87
88/*---------------------------------------------------------------------------*\
89 Class fixedMultiPhaseHeatFluxFvPatchScalarField Declaration
90\*---------------------------------------------------------------------------*/
91
93:
94 public fixedValueFvPatchScalarField
95{
96 // Private Data
97
98 //- Heat power [W] or flux [W/m2]
99 scalarField q_;
100
101 //- Relaxation factor
102 scalar relax_;
103
104 //- Minimum temperature limit [K]
105 scalar Tmin_;
106
107
108public:
109
110 //- Runtime type information
111 TypeName("fixedMultiPhaseHeatFlux");
112
113
114 // Constructors
115
116 //- Construct from patch and internal field
118 (
119 const fvPatch&,
121 );
122
123 //- Construct from patch, internal field and dictionary
125 (
126 const fvPatch&,
128 const dictionary&
129 );
130
131 //- Construct by mapping given
132 //- fixedMultiPhaseHeatFluxFvPatchScalarField
133 //- onto a new patch
135 (
137 const fvPatch&,
139 const fvPatchFieldMapper&
140 );
141
142 //- Construct as copy
146 );
147
148 //- Construct as copy setting internal field reference
150 (
153 );
154
155 //- Return a clone
156 virtual tmp<fvPatchField<scalar>> clone() const
157 {
158 return fvPatchField<scalar>::Clone(*this);
159 }
160
161 //- Clone with an internal field reference
163 (
165 ) const
166 {
167 return fvPatchField<scalar>::Clone(*this, iF);
168 }
169
170
171 // Member Functions
172
173 // Mapping
174
175 //- Map (and resize as needed) from self given a mapping object
176 // Used to update fields following mesh topology change
177 virtual void autoMap(const fvPatchFieldMapper&);
178
179 //- Reverse map the given fvPatchField onto this fvPatchField
180 // Used to reconstruct fields
181 virtual void rmap(const fvPatchScalarField&, const labelList&);
182
183
184 // Evaluation
185
186 //- Update the coefficients associated with the patch field
187 virtual void updateCoeffs();
188
189
190 // I-O
191
192 //- Write
193 virtual void write(Ostream&) const;
194};
195
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199} // End namespace Foam
200
201// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203#endif
204
205// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Calculates a wall temperature that produces the specified overall wall heat flux across all the phase...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
fixedMultiPhaseHeatFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("fixedMultiPhaseHeatFlux")
Runtime type information.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
fvPatchField< scalar > fvPatchScalarField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68