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  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "deposition.H"
30 #include "phasePair.H"
31 #include "phaseSystem.H"
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 namespace phaseTransferModels
39 {
42 }
43 }
44 
45 
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 
49 (
50  const dictionary& dict,
51  const phasePair& pair
52 )
53 :
54  phaseTransferModel(dict, pair),
55  dropletName_(dict.get<word>("droplet")),
56  surfaceName_(dict.get<word>("surface")),
57  efficiency_(dict.get<scalar>("efficiency"))
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
62 
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
68 
71 {
72  const phaseModel* dropletPtr = nullptr;
73  scalar sign = 1;
74  if (dropletName_ == pair_.first())
75  {
76  dropletPtr = &pair_.phase1();
77  sign = -1;
78  }
79  else if (dropletName_ == pair_.second())
80  {
81  dropletPtr = &pair_.phase2();
82  sign = 1;
83  }
84  else
85  {
87  << "The specified droplet phase, " << dropletName_ << ", is not in "
88  << "the " << pair_ << " pair"
89  << exit(FatalError);
90  }
91 
92  const phaseModel& droplet = *dropletPtr;
93  const phaseModel& surface = droplet.fluid().phases()[surfaceName_];
94 
95  return
96  1.5*sign*efficiency_
97  *droplet.rho()*droplet*surface/surface.d()
98  *mag(droplet.U() - surface.U());
99 }
100 
101 
102 // ************************************************************************* //
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
Foam::phaseTransferModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(phaseTransferModel, deposition, dictionary)
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::phaseModel::d
tmp< volScalarField > d() const
Definition: phaseModel.C:257
Foam::phaseTransferModel
Definition: phaseTransferModel.H:55
Foam::phaseTransferModels::deposition::dmdt
virtual tmp< volScalarField > dmdt() const
The mass transfer rate.
Definition: deposition.C:70
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:49
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:123
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:453
Foam::phaseModel::U
const volVectorField & U() const
Definition: phaseModel.H:172
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:100
Foam::phaseSystem::phases
const phaseModelTable & phases() const
Constant access the phases.
Definition: phaseSystem.C:931
Foam::phaseModel::rho
const dimensionedScalar & rho() const
Definition: phaseModel.H:167
deposition.H
Foam::phaseTransferModels::deposition::~deposition
virtual ~deposition()
Destructor.
Definition: deposition.C:63
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