thermalShellModel.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-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 \*---------------------------------------------------------------------------*/
27 
28 #include "thermalShellModel.H"
29 #include "faMesh.H"
30 #include "fvMesh.H"
31 #include "fvPatchFields.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace regionModels
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
43 
45 
46 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
47 
49 {
51  {
52  return true;
53  }
54 
55  return false;
56 }
57 
58 
59 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
60 
62 (
63  const word& modelType,
64  const fvPatch& p,
65  const dictionary& dict
66 )
67 :
68  regionFaModel(p, "thermalShell", modelType, dict, true),
69  TName_(dict.get<word>("T")),
70  Tp_(p.boundaryMesh().mesh().lookupObject<volScalarField>(TName_)),
71  T_
72  (
73  IOobject
74  (
75  "Ts_" + regionName_,
76  p.boundaryMesh().mesh().time().timeName(),
77  p.boundaryMesh().mesh(),
80  ),
81  regionMesh()
82  ),
83  faOptions_(Foam::fa::options::New(p))
84 {
85  if (!faOptions_.optionList::size())
86  {
87  Info << "No finite area options present" << endl;
88  }
89 }
90 
91 
92 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
93 
95 {}
96 
97 
99 {
100  return Tp_;
101 }
102 
103 
105 {
106  return T_;
107 }
108 
109 
111 {
112  return faOptions_;
113 }
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace regionModels
119 } // End namespace Foam
120 
121 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::IOobject::AUTO_WRITE
Definition: IOobject.H:129
Foam::fa::options::New
static options & New(const fvPatch &p)
Definition: faOptions.C:103
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::regionModels::defineTypeNameAndDebug
defineTypeNameAndDebug(KirchhoffShell, 0)
Foam::regionModels::thermalShellModel::thermalShellModel
thermalShellModel(const word &modelType, const fvPatch &patch, const dictionary &dict)
Construct from type name and mesh and dict.
Definition: thermalShellModel.C:62
Foam::regionModels::thermalShellModel::Tp
const volScalarField & Tp() const
Return primary region temperature.
Definition: thermalShellModel.C:98
Foam::regionModels::thermalShellModel::T_
areaScalarField T_
Shell temperature.
Definition: thermalShellModel.H:129
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
faMesh.H
thermalShellModel.H
Foam::regionModels::thermalShellModel::faOptions
Foam::fa::options & faOptions()
Return faOptions.
Definition: thermalShellModel.C:110
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::regionModels::defineRunTimeSelectionTable
defineRunTimeSelectionTable(thermalShellModel, dictionary)
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:121
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regionModels::thermalShellModel::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region.
Definition: thermalShellModel.C:94
Foam::fa::options
Finite-area options.
Definition: faOptions.H:54
fvPatchFields.H
Foam::regionModels::regionFaModel::read
virtual bool read(const dictionary &dict)
Read control parameters from dictionary.
Definition: regionFaModel.C:68
Foam::regionModels::regionFaModel
Base class for area region models.
Definition: regionFaModel.H:113
thermalShellModel
Intermediate class for thermal-shell finite-area models.
Foam::regionModels::thermalShellModel::Tp_
const volScalarField & Tp_
Primary region temperature.
Definition: thermalShellModel.H:126
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::regionModels::thermalShellModel::T
const areaScalarField & T() const
Return shell temperature.
Definition: thermalShellModel.C:104
Foam::regionModels::thermalShellModel::read
virtual bool read(const dictionary &)
Read control parameters from dictionary.
Definition: thermalShellModel.C:48
Foam::regionModels::thermalShellModel::faOptions_
Foam::fa::options & faOptions_
Pointer to faOptions.
Definition: thermalShellModel.H:132
Foam::IOobject::MUST_READ
Definition: IOobject.H:120