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-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 \*---------------------------------------------------------------------------*/
25 
26 #include "deposition.H"
27 #include "phaseSystem.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace phaseTransferModels
35 {
36  defineTypeNameAndDebug(deposition, 0);
37  addToRunTimeSelectionTable(phaseTransferModel, deposition, dictionary);
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_ << " 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 // ************************************************************************* //
dictionary dict
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
const word & name() const
Definition: phaseModel.H:110
const phaseModel & phase1() const
Return phase 1.
const dispersedPhaseInterface interface_
Interface.
virtual bool mixture() const
Whether or not there is a mass transfer rate for the mixture.
Macros for easy insertion into run-time selection tables.
stressControl lookup("compactNormalStress") >> compactNormalStress
deposition(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const phaseModel & phase2() const
Return phase 2.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual tmp< volScalarField > dmdtf() const
The mass transfer rate for the mixture.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.