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 :
80  fixedValueFvPatchField<scalar>(p, iF, dict),
81  baffle_(),
82  dict_
83  (
84  // Copy dictionary, but without "heavy" data chunks
85  dictionaryContent::copyDict
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 (
108  const thermalShellFvPatchScalarField& ptf,
110 )
111 :
112  fixedValueFvPatchField<scalar>(ptf, iF),
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 
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 (
153  thermalShellFvPatchScalarField
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:47
Foam::fvPatchField< scalar >::internalField
const DimensionedField< Type, volMesh > & internalField() const
Definition: fvPatchField.H:359
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:71
Foam::dictionaryContent
A wrapper for dictionary content, without operators that could affect inheritance patterns.
Definition: dictionaryContent.H:43
Foam::fvPatchField< scalar >::updated
bool updated() const
Definition: fvPatchField.H:383
Foam::compressible::makePatchTypeField
makePatchTypeField(fvPatchScalarField, alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField)
Foam::fixedValueFvPatchField< scalar >
Foam::fixedValueFvPatchField::write
virtual void write(Ostream &) const
Definition: fixedValueFvPatchField.C:149
Foam::compressible::thermalShellFvPatchScalarField::thermalShellFvPatchScalarField
thermalShellFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Definition: thermalShellFvPatchScalarField.C:35
Foam::compressible::thermalShellFvPatchScalarField
This boundary condition provides a coupled temperature condition between a primary region (3D mesh) a...
Definition: thermalShellFvPatchScalarField.H:96
Foam::compressible::thermalShellFvPatchScalarField::write
virtual void write(Ostream &) const
Definition: thermalShellFvPatchScalarField.C:134
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
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:119
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Definition: atmBoundaryLayer.C:26
Foam::fvPatchField< Type >::updateCoeffs
virtual void updateCoeffs()
Definition: fvPatchField.C:314
dictionaryContent.H
Foam::objectRegistry::lookupObjectRef
Type & lookupObjectRef(const word &name, const bool recursive=false) const
Definition: objectRegistryTemplates.C:471
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Definition: DimensionedFieldReuseFunctions.H:100
Foam::GeometricField::Boundary
Definition: GeometricField.H:111
Foam::fvPatchField< scalar >::db
const objectRegistry & db() const
Definition: fvPatchField.C:199
Foam::dictionary::write
void write(Ostream &os, const bool subDict=true) const
Definition: dictionaryIO.C:199
Foam::regionModels::thermalShellModel
Definition: thermalShellModel.H:104
Foam::wordRes
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:47
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:41
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:52
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:49
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:50
Foam::compressible::thermalShellFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Definition: thermalShellFvPatchScalarField.C:113