speciePhaseChange.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "speciePhaseChange.H"
27 #include "thermoSingleLayer.H"
28 #include "fluidThermo.H"
29 #include "basicSpecieMixture.H"
30 #include "liquidThermo.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace regionModels
38 {
39 namespace surfaceFilmModels
40 {
41 
42 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
43 
44 defineTypeNameAndDebug(speciePhaseChange, 0);
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const word& modelType,
53  const dictionary& dict
54 )
55 :
56  phaseChangeModel(modelType, film, dict)
57 {}
58 
59 
60 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
61 
63 {}
64 
65 
66 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
67 
69 {
70  const thermoSingleLayer& film = filmType<thermoSingleLayer>();
71 
72  // Set local liquidThermo properties
73  const liquidProperties& liquidThermo =
74  refCast<const heRhoThermopureMixtureliquidProperties>(film.thermo())
75  .cellThermoMixture(0).properties();
76 
77  const basicSpecieMixture& primarySpecieThermo =
78  refCast<const basicSpecieMixture>(film.primaryThermo());
79 
80  return primarySpecieThermo.species()[liquidThermo.name()];
81 }
82 
83 
84 Foam::scalar speciePhaseChange::Wvap() const
85 {
86  const thermoSingleLayer& film = filmType<thermoSingleLayer>();
87 
88  const basicSpecieMixture& primarySpecieThermo =
89  refCast<const basicSpecieMixture>(film.primaryThermo());
90 
91  return primarySpecieThermo.Wi(vapId());
92 }
93 
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 } // End namespace surfaceFilmModels
98 } // End namespace regionModels
99 } // End namespace Foam
100 
101 // ************************************************************************* //
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual scalar Wi(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
Macros for easy insertion into run-time selection tables.
Base class for surface film phase change models.
A class for handling words, derived from string.
Definition: word.H:59
The thermophysical properties of a liquid.
const fluidThermo & primaryThermo() const
Return const reference to the primary region thermo object.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
speciePhaseChange(const word &modelType, surfaceFilmRegionModel &film, const dictionary &dict)
Construct from surface film model.
Thermodynamic form of single-cell layer surface film model.
Namespace for OpenFOAM.
const speciesTable & species() const
Return the table of species.