dispersedPhaseInterface.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) 2021-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 
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  bool dispersedPhaseInterfaceAddedHeadSeparator =
35 
36  bool dispersedPhaseInterfaceAddedOldSeparatorToSeparator =
38  (
39  "in",
41  );
42 }
43 
44 namespace Foam
45 {
47  (
48  dispersedPhaseInterface,
49  separatorsToTypeName({separator()}).c_str(),
50  0
51  );
52  addToRunTimeSelectionTable(phaseInterface, dispersedPhaseInterface, word);
53 }
54 
55 
56 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
57 
59 (
60  const phaseModel& dispersed,
61  const phaseModel& continuous
62 )
63 :
64  phaseInterface(dispersed, continuous),
65  dispersed_(dispersed)
66 {}
67 
68 
70 (
71  const phaseSystem& fluid,
72  const word& name
73 )
74 :
75  phaseInterface(fluid, name),
76  dispersed_(identifyPhases(fluid, name, {separator()}).first())
77 {}
78 
79 
80 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
81 
83 {}
84 
85 
86 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
87 
89 {
90  return dispersed().name() + '_' + separator() + '_' + continuous().name();
91 }
92 
93 
95 {
96  return dispersed_;
97 }
98 
99 
101 {
102  return otherPhase(dispersed_);
103 }
104 
105 
107 {
108  return dispersed().U() - continuous().U();
109 }
110 
111 
113 {
114  return magUr()*dispersed().d()/continuous().thermo().nu();
115 }
116 
117 
119 {
120  return
121  continuous().thermo().nu()
122  *continuous().thermo().Cpv()
123  *continuous().rho()
124  /continuous().thermo().kappa();
125 }
126 
127 
129 {
130  return Eo(dispersed().d());
131 }
132 
133 
135 (
136  const volScalarField& d
137 ) const
138 {
139  return
140  mag(dispersed().rho() - continuous().rho())
141  *mag(g())
142  *sqr(d)
143  /sigma();
144 }
145 
146 
148 {
149  return
150  mag(g())
151  *continuous().thermo().nu()
152  *pow3
153  (
154  continuous().thermo().nu()
155  *continuous().rho()
156  /sigma()
157  );
158 }
159 
160 
162 {
163  return Re()*pow(Mo(), 0.23);
164 }
165 
166 
167 // ************************************************************************* //
dispersedPhaseInterface(const phaseModel &dispersed, const phaseModel &continuous)
Construct from phases.
labelList first(const UList< labelPair > &p)
Definition: patchToPatch.C:38
const uniformDimensionedVectorField & g() const
Return gravitational acceleration.
fluidReactionThermo & thermo
Definition: createFields.H:28
static word separator()
Return the separator that delimits this interface&#39;s name.
virtual tmp< volVectorField > U() const =0
Return the velocity.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual word name() const
Name.
tmp< volScalarField > rho() const
Average density.
phaseInterface(const phaseModel &phase1, const phaseModel &phase2)
Construct from phases.
virtual tmp< volScalarField > rho() const =0
Return the density field.
const word & name() const
Definition: phaseModel.H:110
tmp< volScalarField > d() const
Return the Sauter-mean diameter.
tmp< volScalarField > Pr() const
Prandtl number.
static bool addOldSeparatorToSeparator(const word &oldSeparator, const word &separator)
Add a old separator to separator to the table.
virtual tmp< volScalarField > Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
Macros for easy insertion into run-time selection tables.
virtual ~dispersedPhaseInterface()
Destructor.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
tmp< volScalarField > Eo() const
Eotvos number.
static bool addHeadSeparator(const word &separator)
Add a head separator to the list.
static Tuple2< const phaseModel &, const phaseModel & > identifyPhases(const phaseSystem &fluid, const word &name, const wordList &separators)
Return references to the phases associated with a given name, and a.
A class for handling words, derived from string.
Definition: word.H:59
const rhoThermo & thermo() const
Return const-access to phase rhoThermo.
Definition: phaseModel.H:121
tmp< volScalarField > Mo() const
Morton Number.
const phaseModel & continuous() const
Continuous phase.
virtual const volScalarField & kappa() const =0
Thermal conductivity of mixture [W/m/K].
const phaseModel & dispersed() const
Dispersed phase.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
tmp< volScalarField > Re() const
Reynolds number.
tmp< volScalarField > magUr() const
Relative velocity magnitude.
const phaseSystem & fluid() const
Return the phase system.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
tmp< volVectorField > Ur() const
Relative velocity.
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
Definition: fluidThermo.C:73
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< volScalarField > Ta() const
Takahashi Number.
tmp< volScalarField > sigma() const
Surface tension coefficient.
A class for managing temporary objects.
Definition: PtrList.H:53
const phaseModel & otherPhase() const
Phase on the other side of the interface.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
#define defineTypeNameAndDebugWithName(Type, Name, DebugSwitch)
Define the typeName and debug information, lookup as Name.
Definition: className.H:124
Namespace for OpenFOAM.