wallCondensationPhaseChangeRateFvPatchScalarField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
28 
29 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * /
30 
33 (
34  const fvPatch& p,
36 )
37 :
38  calculatedFvPatchScalarField(p, iF),
39  condensing_(p.size(), scalar(0)),
40  alphatLiquid_(p.size(), scalar(0)),
41  alphatVapour_(p.size(), scalar(0))
42 {}
43 
44 
47 (
48  const fvPatch& p,
50  const dictionary& dict
51 )
52 :
53  calculatedFvPatchScalarField(p, iF, dict),
54  condensing_("condensing", dimless, dict, p.size()),
55  alphatLiquid_("alphatLiquid", dimMass/dimTime/dimLength, dict, p.size()),
56  alphatVapour_("alphatVapour", dimMass/dimTime/dimLength, dict, p.size())
57 {}
58 
59 
62 (
64  const fvPatch& p,
66  const fieldMapper& mapper
67 )
68 :
69  calculatedFvPatchScalarField(psf, p, iF, mapper),
70  condensing_(mapper(psf.condensing_)),
71  alphatLiquid_(mapper(psf.alphatLiquid_)),
72  alphatVapour_(mapper(psf.alphatVapour_))
73 {}
74 
75 
78 (
81 )
82 :
83  calculatedFvPatchScalarField(psf, iF),
84  condensing_(psf.condensing_),
85  alphatLiquid_(psf.alphatLiquid_),
86  alphatVapour_(psf.alphatVapour_)
87 {}
88 
89 
90 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
91 
92 const Foam::scalarField&
94 {
95  return alphatLiquid_;
96 }
97 
98 
99 const Foam::scalarField&
101 {
102  return alphatVapour_;
103 }
104 
105 
107 (
108  const fvPatchScalarField& ptf,
109  const fieldMapper& mapper
110 )
111 {
112  calculatedFvPatchScalarField::map(ptf, mapper);
113 
115  refCast<const wallCondensationPhaseChangeRateFvPatchScalarField>(ptf);
116 
117  mapper(condensing_, tiptf.condensing_);
118  mapper(alphatLiquid_, tiptf.alphatLiquid_);
119  mapper(alphatVapour_, tiptf.alphatVapour_);
120 }
121 
122 
124 (
125  const fvPatchScalarField& ptf
126 )
127 {
128  calculatedFvPatchScalarField::reset(ptf);
129 
131  refCast<const wallCondensationPhaseChangeRateFvPatchScalarField>(ptf);
132 
133  condensing_.reset(tiptf.condensing_);
134  alphatLiquid_.reset(tiptf.alphatLiquid_);
135  alphatVapour_.reset(tiptf.alphatVapour_);
136 }
137 
138 
140 {
142 }
143 
144 
146 (
147  Ostream& os
148 ) const
149 {
151 
152  writeEntry(os, "condensing", condensing_);
153  writeEntry(os, "alphatLiquid", alphatLiquid_);
154  writeEntry(os, "alphatVapour", alphatVapour_);
155 }
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 namespace Foam
161 {
163  (
166  );
167 }
168 
169 
170 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
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:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Abstract base class for field mapping.
Definition: fieldMapper.H:48
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:90
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
This boundary condition is used for the phase change rate field of the wall condensation fvModel....
wallCondensationPhaseChangeRateFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &)
Construct from patch and internal field.
const scalarField & alphatVapour() const
Access the vapour turbulent thermal diffusivity.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
const scalarField & alphatLiquid() const
Access the liquid turbulent thermal diffusivity.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void map(const fvPatchScalarField &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
Namespace for OpenFOAM.
const dimensionSet & dimless
Definition: dimensions.C:138
const dimensionSet & dimMass
Definition: dimensions.C:140
const dimensionSet & dimLength
Definition: dimensions.C:141
makeNullConstructablePatchTypeField(fvPatchVectorField, noSlipFvPatchVectorField)
const dimensionSet & dimTime
Definition: dimensions.C:142
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
dictionary dict
volScalarField & p