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-------------------------------------------------------------------------------
11License
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
36namespace Foam
37{
38namespace phaseTransferModels
39{
42}
43}
44
45
46// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47
49(
50 const dictionary& dict,
51 const phasePair& pair
52)
53:
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// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:61
const volVectorField & U() const
Definition: phaseModel.H:176
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Definition: phaseModel.C:148
const dimensionedScalar & rho() const
Definition: phaseModel.H:171
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
const phaseModelList & phases() const
Return the phase models.
Definition: phaseSystemI.H:37
Phase transfer model representing change from a dispersed phase to a film as a result of deposition o...
Definition: deposition.H:59
virtual ~deposition()
Destructor.
Definition: deposition.C:63
virtual tmp< volScalarField > dmdt() const
The mass transfer rate.
Definition: deposition.C:70
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Namespace for OpenFOAM.
dimensionedScalar sign(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
dictionary dict