deposition.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) 2018 OpenFOAM Foundation
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 "deposition.H"
29 #include "phasePair.H"
30 #include "phaseSystem.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace phaseTransferModels
38 {
41 }
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
48 (
49  const dictionary& dict,
50  const phasePair& pair
51 )
52 :
53  phaseTransferModel(dict, pair),
54  dropletName_(dict.lookup("droplet")),
55  surfaceName_(dict.lookup("surface")),
56  efficiency_(readScalar(dict.lookup("efficiency")))
57 {}
58 
59 
60 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
61 
63 {}
64 
65 
66 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
67 
70 {
71  const phaseModel* dropletPtr = nullptr;
72  scalar sign = 1;
73  if (dropletName_ == pair_.first())
74  {
75  dropletPtr = &pair_.phase1();
76  sign = -1;
77  }
78  else if (dropletName_ == pair_.second())
79  {
80  dropletPtr = &pair_.phase2();
81  sign = 1;
82  }
83  else
84  {
86  << "The specified droplet phase, " << dropletName_ << ", is not in "
87  << "the " << pair_ << " pair"
88  << exit(FatalError);
89  }
90 
91  const phaseModel& droplet = *dropletPtr;
92  const phaseModel& surface = droplet.fluid().phases()[surfaceName_];
93 
94  return
95  1.5*sign*efficiency_
96  *droplet.rho()*droplet*surface/surface.d()
97  *mag(droplet.U() - surface.U());
98 }
99 
100 
101 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:51
Foam::phaseTransferModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(phaseTransferModel, deposition, dictionary)
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::phaseModel::rho
virtual tmp< volScalarField > rho() const =0
Return the density field.
Foam::phaseModel::d
tmp< volScalarField > d() const
Return the Sauter-mean diameter.
Definition: phaseModel.C:130
Foam::phaseTransferModel
Definition: phaseTransferModel.H:53
Foam::phaseTransferModels::deposition::dmdt
virtual tmp< volScalarField > dmdt() const
The mass transfer rate.
Definition: deposition.C:69
Foam::sign
dimensionedScalar sign(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:166
Foam::phaseTransferModels::deposition::deposition
deposition(const dictionary &dict, const phasePair &pair)
Construct from components.
Definition: deposition.C:48
Foam::phaseTransferModels::defineTypeNameAndDebug
defineTypeNameAndDebug(deposition, 0)
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::phaseModel::fluid
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Definition: phaseModel.C:112
Foam::phaseModel::U
virtual tmp< volVectorField > U() const =0
Return the velocity.
Foam::phaseSystem::phases
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:37
deposition.H
Foam::phaseTransferModels::deposition::~deposition
virtual ~deposition()
Destructor.
Definition: deposition.C:62
Foam::phaseTransferModels::deposition
Phase transfer model representing change from a dispersed phase to a film as a result of deposition o...
Definition: deposition.H:56