LiquidEvaporation.H
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) 2011-2022 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 Class
25  Foam::LiquidEvaporation
26 
27 Description
28  Liquid evaporation model
29  - uses ideal gas assumption
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef LiquidEvaporation_H
34 #define LiquidEvaporation_H
35 
36 #include "PhaseChangeModel.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 /*---------------------------------------------------------------------------*\
44  Class LiquidEvaporation Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 template<class CloudType>
49 :
50  public PhaseChangeModel<CloudType>
51 {
52 protected:
53 
54  // Protected data
55 
56  //- Global liquid properties data
58 
59  //- Whether or not to permit condensation (default false)
61 
62  //- List of active liquid names
64 
65  //- Mapping between liquid and carrier species
67 
68  //- Mapping between local and global liquid species
70 
71 
72  // Protected Member Functions
73 
74  //- Sherwood number as a function of Reynolds and Schmidt numbers
75  scalar Sh(const scalar Re, const scalar Sc) const;
76 
77  //- Calculate the carrier phase component volume fractions at celli
78  tmp<scalarField> calcXc(const label celli) const;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("liquidEvaporation");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary
91 
92  //- Construct copy
94 
95  //- Construct and return a clone
97  {
99  (
101  );
102  }
103 
104 
105  //- Destructor
106  virtual ~LiquidEvaporation();
107 
108 
109  // Member Functions
110 
111  //- Update model
112  virtual void calculate
113  (
114  const typename CloudType::parcelType& p,
115  const typename CloudType::parcelType::trackingData& td,
116  const scalar dt,
117  const scalar Re,
118  const scalar Pr,
119  const scalar d,
120  const scalar nu,
121  const scalar T,
122  const scalar Ts,
123  const scalar pc,
124  const scalar Tc,
125  const scalarField& X,
126  scalarField& dMassPC
127  ) const;
128 
129  //- Return the enthalpy per unit mass
130  virtual scalar dh
131  (
132  const label idc,
133  const label idl,
134  const scalar p,
135  const scalar T
136  ) const;
137 
138  //- Return vapourisation temperature
139  virtual scalar Tvap(const scalarField& X) const;
140 
141  //- Return maximum/limiting temperature
142  virtual scalar TMax(const scalar p, const scalarField& X) const;
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #ifdef NoRepository
153  #include "LiquidEvaporation.C"
154 #endif
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:80
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:225
Liquid evaporation model.
List< word > activeLiquids_
List of active liquid names.
Switch condensation_
Whether or not to permit condensation (default false)
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
virtual ~LiquidEvaporation()
Destructor.
virtual autoPtr< PhaseChangeModel< CloudType > > clone() const
Construct and return a clone.
List< label > liqToLiqMap_
Mapping between local and global liquid species.
List< label > liqToCarrierMap_
Mapping between liquid and carrier species.
LiquidEvaporation(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
const liquidMixtureProperties & liquids_
Global liquid properties data.
virtual void calculate(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar Re, const scalar Pr, const scalar d, const scalar nu, const scalar T, const scalar Ts, const scalar pc, const scalar Tc, const scalarField &X, scalarField &dMassPC) const
Update model.
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.
virtual scalar TMax(const scalar p, const scalarField &X) const
Return maximum/limiting temperature.
TypeName("liquidEvaporation")
Runtime type information.
Templated phase change model class.
scalar Sh() const
Sherwood number.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A cloud is a collection of lagrangian particles.
Definition: cloud.H:55
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
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
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalarField Re(const UList< complex > &cf)
Definition: complexFields.C:97
volScalarField & p