Loading...
Searching...
No Matches
contactHeatFluxSource.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) 2019-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::contactHeatFluxSource
28
29Group
30 grpFaOptionsSources
31
32Description
33 Applies contact heat flux between specified \c faMesh
34 and \c fvMesh within a specified region for compressible flows.
35
36Usage
37 Minimal example by using \c constant/faOptions:
38 \verbatim
39 contactHeatFluxSource1
40 {
41 // Mandatory entries (unmodifiable)
42 type contactHeatFluxSource;
43
44 // Optional entries (unmodifiable)
45 Tprimary <TprimaryFieldName>;
46
47 // Optional entries (runtime modifiable)
48 Ts <TshellName>;
49 thicknessLayers (<layer1> <layer2> ... <layerN>);
50
51 // Conditional optional entries (runtime modifiable)
52
53 // when the entry "thicknessLayers" is present
54 kappaLayers (<layer1> <layer2> ... <layerN>);
55
56 // Mandatory/Optional (inherited) entries
57 ...
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Reqd | Dflt
64 type | Type name: contactHeatFluxSource | word | yes | -
65 Ts | Name of shell temperature field | word | no | Ts(suffix)
66 Tprimary | Name of primary temperature field | word | no | T
67 thicknessLayers | List of thicknesses of layers | scalarList | no | -
68 kappaLayers | List of conductivities of layers | scalarList | cndtnl | -
69 \endtable
70
71 Fields/variables used:
72 \table
73 Property | Description | Type | Deflt
74 Ts | Temperature | shell | Ts(suffix)
75 Tprimary | Temperature | volume | T
76 \endtable
77
78 The inherited entries are elaborated in:
79 - \link faOption.H \endlink
80 - \link faceSetOption.H \endlink
81 - \link temperatureCoupledBase.H \endlink
82
83 \b Naming changes from 2506 and earlier:
84 \table
85 Keyword | Description | Keyword (old) | Deflt (old)
86 Ts | Temperature (shell) | T | T
87 \endtable
88 If \c Ts is missing, the keyword \c T is still accepted.
89
90SourceFiles
91 contactHeatFluxSource.C
92
93\*---------------------------------------------------------------------------*/
94
95#ifndef Foam_fa_contactHeatFluxSource_H
96#define Foam_fa_contactHeatFluxSource_H
97
98#include "areaFields.H"
99#include "PtrList.H"
100#include "faceSetOption.H"
102
103// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105namespace Foam
106{
107namespace fa
108{
109
110/*---------------------------------------------------------------------------*\
111 Class contactHeatFluxSource Declaration
112\*---------------------------------------------------------------------------*/
113
115:
116 public fa::faceSetOption
117{
118 // Private Classes
119
120 //- Wrapper to make non-abstract
121 struct temperatureCoupling : public Foam::temperatureCoupledBase
122 {
123 // Inherit constructors
125
126 //- The fvPatch
127 const fvPatch& patch() const noexcept { return patch_; }
128
129 // Dummy implementations
130
131 //- Map (and resize as needed) from self given a mapping object
132 virtual void autoMap(const fvPatchFieldMapper&)
133 {}
134
135 // Dummy implementation
136 virtual void rmap(const fvPatchField<scalar>&, const labelList&)
137 {}
138 };
139
140
141 // Private Data
142
143 //- Name of shell temperature field (default: "T")
144 word TName_;
145
146 //- Name of volume temperature field (default: "T")
147 const word TprimaryName_;
148
149 //- Primary (volume) region temperature
150 const volScalarField& Tprimary_;
151
152 //- Thickness of layers
153 scalarList thicknessLayers_;
154
155 //- Conductivity of layers
156 scalarList kappaLayers_;
157
158 //- Total contact resistance
159 scalar contactRes_;
160
161 //- Current time index (used for updating)
162 label curTimeIndex_;
163
164 //- Contact coupling (per-patch)
165 PtrList<temperatureCoupling> coupling_;
166
167
168 // Private Member Functions
169
170 //- Return htc [W/m2/K] coupling to the primary region
172
173
174public:
175
176 //- Runtime type information
177 TypeName("contactHeatFluxSource");
178
179
180 // Constructors
181
182 //- Construct from explicit source name and mesh
184 (
185 const word& sourceName,
186 const word& modelType,
187 const dictionary& dict,
188 const fvMesh& mesh,
190 const word& defaultAreaName = word()
191 );
192
193 //- No copy construct
195
196 //- No copy assignment
197 void operator=(const contactHeatFluxSource&) = delete;
198
199
200 //- Destructor
201 virtual ~contactHeatFluxSource() = default;
202
203
204 // Member Functions
205
206 // Evaluation
207
208 //- Add explicit contribution to compressible momentum equation
209 virtual void addSup
210 (
211 const areaScalarField& h,
212 const areaScalarField& rho,
213 faMatrix<scalar>& eqn,
214 const label fieldi
215 );
216
217
218 // IO
219
220 //- Read source dictionary
221 virtual bool read(const dictionary& dict);
222};
223
224
225// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226
227} // End namespace fa
228} // End namespace Foam
229
230// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231
232
233#endif
234
235// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A special matrix type and solver, designed for finite area solutions of scalar equations....
Definition faMatrix.H:108
Applies contact heat flux between specified faMesh and fvMesh within a specified region for compressi...
void operator=(const contactHeatFluxSource &)=delete
No copy assignment.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual ~contactHeatFluxSource()=default
Destructor.
contactHeatFluxSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from explicit source name and mesh.
contactHeatFluxSource(const contactHeatFluxSource &)=delete
No copy construct.
TypeName("contactHeatFluxSource")
Runtime type information.
Intermediate abstract class for handling face-set options for the derived faOptions.
const fvMesh & mesh() const noexcept
Return const access to the volume mesh.
Definition faOption.H:385
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
Common functions used in temperature coupled boundaries.
const fvPatch & patch_
Underlying patch.
temperatureCoupledBase(const fvPatch &patch, const KMethodType method=KMethodType::mtFluidThermo)
Default construct from patch, using fluidThermo (default) or specified method.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
const direction noexcept
Definition scalarImpl.H:265
List< scalar > scalarList
List of scalar.
Definition scalarList.H:32
dictionary dict
volScalarField & h
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68