thermoThinFilm.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) 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 "thermoThinFilm.H"
30 #include "volFields.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace regionModels
37 {
38 namespace areaSurfaceFilmModels
39 {
40 
41 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
42 
43 defineTypeNameAndDebug(thermoThinFilm, 0);
44 addToRunTimeSelectionTable(liquidFilmBase, thermoThinFilm, dictionary);
45 
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 
48 kinematicThinFilm::thermoThinFilm
49 (
50  const word& modelType,
51  const fvMesh& mesh,
52  const dictionary& dict
53 )
54 :
55  kinematicThinFilm(modelType, mesh, dict),
56  hsf_
57  (
58  IOobject
59  (
60  "hsf_" + regionName_,
61  regionMesh().time().timeName(),
62  regionMesh().thisDb(),
63  IOobject::NO_READ,
64  IOobject::NO_WRITE
65  ),
66  regionMesh(),
68  hsBoundaryTypes()
69  ),
70  energySource_
71  (
72  IOobject
73  (
74  "energySource_" + regionName_,
75  primaryMesh().time().timeName(),
76  primaryMesh().thisDb()
77  ),
78  primaryMesh(),
80  )
81 {
82  // Sensible enthalpy from temperature
83  // Note: assumes constant Cp
84  hsf_ == hs(Tf_);
85 }
86 
87 
88 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
89 
91 {
93 
94  kinematicThinFim::preEvolveRegion();
95 }
96 
97 
99 {
101 
103 
104  // Solve energy equation
105 
106  faScalarMatrix hsEqn
107  (
108  fam::ddt(h_, hsf_)
109  + fam::div(phi2s_, hsf_)
110  ==
111  - energySource_
112  + q(hsf_)
113  );
114 
115 
116 
117  // Momentum
118  // faVectorMatrix UsEqn
119  // (
120  // fam::ddt(h_, Uf_)
121  // + fam::div(phi2s_, Uf_)
122  // ==
123  // gs*h_
124  // + turbulence_->Su(Uf_)
125  // + faOptions()(h_, Uf_, sqr(dimVelocity))
126  // + forces_.correct(Uf_)
127  // + USp_
128  // );
129 
130 
131 }
132 
133 
135 {
137 
139 }
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace areaSurfaceFilmModels
145 } // End namespace regionModels
146 } // End namespace Foam
147 
148 // ************************************************************************* //
dictionary dict
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
defineTypeNameAndDebug(kinematicThinFilm, 0)
Macros for easy insertion into run-time selection tables.
word timeName
Definition: getTimeIndex.H:3
dynamicFvMesh & mesh
addToRunTimeSelectionTable(liquidFilmBase, kinematicThinFilm, dictionary)
#define DebugInFunction
Report an information message using Foam::Info.
const dimensionSet dimPressure
tmp< faMatrix< Type > > ddt(const GeometricField< Type, faPatchField, areaMesh > &vf)
Definition: famDdt.C:41
tmp< faMatrix< Type > > div(const edgeScalarField &flux, const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: famDiv.C:41
const dimensionSet dimEnergy
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Template specialisation for scalar faMatrix.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127