thermalShellFvPatchScalarField.C
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-2021 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 \*---------------------------------------------------------------------------*/
27 
30 #include "dictionaryContent.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace compressible
37 {
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
42 (
43  const fvPatch& p,
45 )
46 :
48  baffle_(),
49  dict_()
50 {}
51 
52 
54 (
56  const fvPatch& p,
58  const fvPatchFieldMapper& mapper
59 )
60 :
62  (
63  ptf,
64  p,
65  iF,
66  mapper
67  ),
68  baffle_(),
69  dict_(ptf.dict_)
70 {}
71 
72 
74 (
75  const fvPatch& p,
77  const dictionary& dict
78 )
79 :
81  baffle_(),
82  dict_
83  (
84  // Copy dictionary, but without "heavy" data chunks
86  (
87  dict,
88  wordRes(), // allow
89  wordRes // deny
90  ({
91  "type", // redundant
92  "value"
93  })
94  )
95  )
96 {
97  typedef regionModels::thermalShellModel baffle;
98 
99  if (!baffle_)
100  {
101  baffle_.reset(baffle::New(p, dict).ptr());
102  }
103 }
104 
105 
107 (
110 )
111 :
113  baffle_(),
114  dict_(ptf.dict_)
115 {}
116 
117 
118 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
119 
121 {
122  if (this->updated())
123  {
124  return;
125  }
126 
127  baffle_->evolve();
128 
129  volScalarField::Boundary& vfb =
131  (
132  this->internalField().name()
133  ).boundaryFieldRef();
134 
135  baffle_->vsm().mapToVolume(baffle_->T(), vfb);
136 
138 }
139 
140 
142 {
144  dict_.write(os, false);
145 }
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
151 (
154 );
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace compressible
159 } // End namespace Foam
160 
161 
162 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:51
Foam::fvPatchField< scalar >::internalField
const DimensionedField< scalar, volMesh > & internalField() const
Return dimensioned internal field reference.
Definition: fvPatchField.H:363
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::dictionaryContent::copyDict
static dictionary copyDict(const dictionary &input, const wordList &allow=wordList(), const wordList &deny=wordList())
Definition: dictionaryContent.C:78
Foam::fvPatchField< scalar >::updated
bool updated() const
Return true if the boundary condition has already been updated.
Definition: fvPatchField.H:387
Foam::compressible::makePatchTypeField
makePatchTypeField(fvPatchScalarField, alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField)
Foam::fixedValueFvPatchField< scalar >
Foam::fixedValueFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fixedValueFvPatchField.C:156
Foam::compressible::thermalShellFvPatchScalarField::thermalShellFvPatchScalarField
thermalShellFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: thermalShellFvPatchScalarField.C:42
Foam::compressible::thermalShellFvPatchScalarField
This boundary condition provides a coupled temperature condition between a primary region (3D mesh) a...
Definition: thermalShellFvPatchScalarField.H:100
Foam::compressible::thermalShellFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: thermalShellFvPatchScalarField.C:141
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
thermalShellFvPatchScalarField.H
compressible
bool compressible
Definition: pEqn.H:2
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: fvPatchField.C:321
dictionaryContent.H
Foam::objectRegistry::lookupObjectRef
Type & lookupObjectRef(const word &name, const bool recursive=false) const
Definition: objectRegistryTemplates.C:478
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::fvPatchField< scalar >::db
const objectRegistry & db() const
Return local objectRegistry.
Definition: fvPatchField.C:206
Foam::dictionary::write
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
Definition: dictionaryIO.C:206
Foam::regionModels::thermalShellModel
Definition: thermalShellModel.H:108
Foam::wordRes
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:51
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::compressible::thermalShellFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: thermalShellFvPatchScalarField.C:120