deposition.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) 2018-2024 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 "deposition.H"
27 #include "phaseSystem.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace phaseTransferModels
35 {
38 }
39 }
40 
41 
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 
45 (
46  const dictionary& dict,
47  const phaseInterface& interface
48 )
49 :
50  phaseTransferModel(dict, interface),
51  interface_(interface),
52  dropletName_(dict.lookup("droplet")),
53  surfaceName_(dict.lookup("surface")),
54  efficiency_(dict.lookup<scalar>("efficiency"))
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
59 
61 {}
62 
63 
64 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
65 
67 {
68  return true;
69 }
70 
71 
74 {
75  const phaseModel* dropletPtr = nullptr;
76  scalar sign = 1;
77  if (dropletName_ == interface_.phase1().name())
78  {
79  dropletPtr = &interface_.phase1();
80  sign = -1;
81  }
82  else if (dropletName_ == interface_.phase2().name())
83  {
84  dropletPtr = &interface_.phase2();
85  sign = 1;
86  }
87  else
88  {
90  << "The specified droplet phase, " << dropletName_ << ", is not in "
91  << "the " << interface_.name() << " pair"
92  << exit(FatalError);
93  }
94 
95  const phaseModel& droplet = *dropletPtr;
96  const phaseModel& surface = droplet.fluid().phases()[surfaceName_];
97 
98  return
99  1.5*sign*efficiency_
100  *droplet.rho()*droplet*surface/surface.d()
101  *mag(droplet.U() - surface.U());
102 }
103 
104 
105 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Class to represent an interface between phases. Derivations can further specify the configuration of ...
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Definition: phaseModel.C:163
tmp< volScalarField > d() const
Return the Sauter-mean diameter.
Definition: phaseModel.C:181
virtual tmp< volVectorField > U() const =0
Return the velocity.
virtual const volScalarField & rho() const =0
Return the density field.
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:102
Phase transfer model representing change from a dispersed phase to a film as a result of deposition o...
Definition: deposition.H:54
deposition(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
Definition: deposition.C:45
virtual bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
Definition: deposition.C:66
virtual tmp< volScalarField > dmdtf() const
The mass transfer rate for the mixture.
Definition: deposition.C:73
virtual ~deposition()
Destructor.
Definition: deposition.C:60
A class for managing temporary objects.
Definition: tmp.H:55
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
defineTypeNameAndDebug(cavitation, 0)
addToRunTimeSelectionTable(phaseTransferModel, cavitation, dictionary)
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
dimensionedScalar sign(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
error FatalError
dictionary dict