thermalShellFvPatchScalarField.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-2020 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 Class
27  Foam::compressible::thermalShellFvPatchScalarField
28 
29 Group
30  grpThermoBoundaryConditions
31 
32 Description
33  This boundary condition provides a coupled temperature condition between
34  a primary region (3D mesh) and a thermal shell model (2D mesh).
35 
36  The primary region boundary creates the finite area region
37  and evolves its energy equation.
38 
39 Usage
40  Example of the boundary condition specification:
41  \verbatim
42  <masterPatchName>
43  {
44  // Mandatory entries (unmodifiable)
45  type compressible::thermalShell;
46 
47  // Mandatory/Optional (inherited) entries
48  ...
49  }
50  \endverbatim
51 
52  where the entries mean:
53  \table
54  Property | Description | Type | Reqd | Dflt
55  type | Type name: compressible::thermalShell | word | yes | -
56  \endtable
57 
58  The inherited entries are elaborated in:
59  - \link fixedValueFvPatchField.H \endlink
60  - \link thermalShellModel.H \endlink
61 
62 Note
63  - The two-dimensional area mesh needs to be
64  generated in the pre-processing steps.
65 
66 SourceFiles
67  thermalShellFvPatchScalarField.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef thermalShellFvPatchScalarField_H
72 #define thermalShellFvPatchScalarField_H
73 
74 #include "autoPtr.H"
75 #include "thermalShellModel.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace compressible
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class thermalShellFvPatchScalarField Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class thermalShellFvPatchScalarField
90 :
91  public fixedValueFvPatchField<scalar>
92 {
93  // Private Data
94 
95  //- Thermal baffle
96  autoPtr<regionModels::thermalShellModel> baffle_;
97 
98  //- Dictionary
99  dictionary dict_;
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("compressible::thermalShell");
106 
107 
108  // Constructors
109 
110  //- Construct from patch and internal field
112  (
113  const fvPatch&,
115  );
116 
117  //- Construct from patch, internal field and dictionary
119  (
120  const fvPatch&,
122  const dictionary&
123  );
124 
125  //- Construct by mapping given
126  //- thermalShellFvPatchScalarField onto a new patch
128  (
130  const fvPatch&,
132  const fvPatchFieldMapper&
133  );
134 
135  //- Construct and return a clone
136  virtual tmp<fvPatchScalarField> clone() const
137  {
139  (
141  );
142  }
143 
144  //- Construct as copy setting internal field reference
146  (
149  );
150 
151  //- Construct and return a clone setting internal field reference
153  (
155  ) const
156  {
158  (
159  new thermalShellFvPatchScalarField(*this, iF)
160  );
161  }
162 
163 
164  // Member Functions
165 
166  //- Update the coefficients associated with the patch field
167  virtual void updateCoeffs();
168 
169  //- Write
170  virtual void write(Ostream&) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace compressible
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 
182 #endif
183 
184 // ************************************************************************* //
Foam::compressible::thermalShellFvPatchScalarField::TypeName
TypeName("compressible::thermalShell")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
thermalShellModel.H
Foam::fixedValueFvPatchField
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Definition: fixedValueFvPatchField.H:80
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
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
fixedValueFvPatchFields.H
Foam::compressible::thermalShellFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: thermalShellFvPatchScalarField.H:147
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::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
autoPtr.H