displacementGapHeatTransferCoefficient_DimensionedFieldFunction.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 
27 #include "DimensionedFields.H"
28 #include "volFields.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace DimensionedFieldFunctions
36 {
38  (
40  0
41  );
42 
46  (
50  );
51 }
52 }
53 
54 
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 
59 (
60  const dictionary& dict,
62 )
63 :
65  kappa_("kappa", dimThermalConductivity, dict)
66 {}
67 
68 
71 (
74 )
75 :
77  kappa_(dff.kappa_)
78 {}
79 
80 
82 <
84  <
86  >
87 >
89 (
91 ) const
92 {
94  (
96  (
97  *this,
98  field
99  )
100  );
101 }
102 
103 
104 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
105 
108 {}
109 
110 
113 {
114  const fvPatch& p = this->field_.mesh();
115 
116  // Lookup the displacement for the patch
117  const fvPatchVectorField& Dp
118  = p.lookupPatchField<volVectorField, vector>("D");
119 
120  this->field_.primitiveFieldRef() = kappa_.value()/max(-p.nf() & Dp, small);
121 
122  return true;
123 }
124 
125 
128 (
129  Ostream& os
130 ) const
131 {
132  writeEntry(os, kappa_);
133 }
134 
135 
136 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Base class for run-time selectable internal and patch field initialisation evaluation and update with...
virtual autoPtr< DimensionedFieldFunction< DimensionedField< scalar, fvPatch > > > clone() const
Construct and return a clone for the specified field.
Runtime selectable DimensionedFieldFunction providing the heat transfer coefficient for a gap caused ...
displacementGapHeatTransferCoefficient(const dictionary &dict, DimensionedField< scalar, fvPatch > &field)
Construct with dictionary to initialise given field.
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
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
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 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
defineTypeNameAndDebug(externalWallLayersHeatTransferCoefficient, 0)
DimensionedFieldFunction< DimensionedField< scalar, fvPatch > > DimensionedFieldFunctionScalarFvPatch
addToRunTimeSelectionTable(DimensionedFieldFunctionScalarFvPatch, externalWallLayersHeatTransferCoefficient, dictionary)
Namespace for OpenFOAM.
const dimensionSet & dimThermalConductivity
Definition: dimensions.C:175
VolField< vector > volVectorField
Definition: volFieldsFwd.H:63
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dictionary dict
volScalarField & p