Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
509529ca
Commit
509529ca
authored
Jan 22, 2014
by
william
Browse files
ENH: Added bubble library functionality to twoPhaseEulerFoam
parent
a3e1fd80
Changes
116
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/twoPhaseEulerFoam/UEqns.H
View file @
509529ca
...
...
@@ -8,30 +8,36 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
volScalarField
dragCoeff
(
fluid
.
dragCoeff
());
{
volVectorField
liftForce
(
fluid
.
liftForce
(
U
));
volScalarField
virtualMassCoeff
(
fluid
.
virtualMassCoeff
());
volVectorField
liftForce
(
fluid
.
liftForce
());
volVectorField
wallLubricationForce
(
fluid
.
wallLubricationForce
());
volVectorField
turbulentDispersionForce
(
fluid
.
turbulentDispersionForce
());
{
U1Eqn
=
(
fvm
::
ddt
(
alpha1
,
U1
)
+
fvm
::
div
(
alphaPhi1
,
U1
)
// Compressibity correction
-
fvm
::
Sp
(
fvc
::
ddt
(
alpha1
)
+
fvc
::
div
(
alphaPhi1
),
U1
)
+
fluid
.
Cvm
()
*
rho2
*
alpha1
*
alpha2
/
rho1
*
(
+
phase1
.
turbulence
().
divDevReff
(
U1
)
==
-
fvm
::
Sp
(
dragCoeff
/
rho1
,
U1
)
-
alpha1
*
alpha2
/
rho1
*
(
liftForce
+
wallLubricationForce
+
turbulentDispersionForce
)
-
virtualMassCoeff
/
rho1
*
(
fvm
::
ddt
(
U1
)
+
fvm
::
div
(
phi1
,
U1
)
-
fvm
::
Sp
(
fvc
::
div
(
phi1
),
U1
)
-
DDtU2
)
+
phase1
.
turbulence
().
divDevReff
(
U1
)
==
-
fvm
::
Sp
(
dragCoeff
/
rho1
,
U1
)
-
alpha1
*
alpha2
/
rho1
*
(
liftForce
-
fluid
.
Cvm
()
*
rho2
*
DDtU2
)
);
mrfZones
.
addCoriolis
(
alpha1
*
(
1
+
fluid
.
Cvm
()
*
rho2
*
alpha2
/
rho1
)
,
U1Eqn
);
mrfZones
.
addCoriolis
(
alpha1
+
virtualMassCoeff
/
rho1
,
U1Eqn
);
U1Eqn
.
relax
();
}
...
...
@@ -40,22 +46,25 @@ volScalarField dragCoeff(fluid.dragCoeff());
(
fvm
::
ddt
(
alpha2
,
U2
)
+
fvm
::
div
(
alphaPhi2
,
U2
)
// Compressibity correction
-
fvm
::
Sp
(
fvc
::
ddt
(
alpha2
)
+
fvc
::
div
(
alphaPhi2
),
U2
)
+
fluid
.
Cvm
()
*
rho2
*
alpha1
*
alpha2
/
rho2
*
(
+
phase2
.
turbulence
().
divDevReff
(
U2
)
==
-
fvm
::
Sp
(
dragCoeff
/
rho2
,
U2
)
+
alpha1
*
alpha2
/
rho2
*
(
liftForce
+
wallLubricationForce
+
turbulentDispersionForce
)
-
virtualMassCoeff
/
rho2
*
(
fvm
::
ddt
(
U2
)
+
fvm
::
div
(
phi2
,
U2
)
-
fvm
::
Sp
(
fvc
::
div
(
phi2
),
U2
)
-
DDtU1
)
+
phase2
.
turbulence
().
divDevReff
(
U2
)
==
-
fvm
::
Sp
(
dragCoeff
/
rho2
,
U2
)
+
alpha1
*
alpha2
/
rho2
*
(
liftForce
+
fluid
.
Cvm
()
*
rho2
*
DDtU1
)
);
mrfZones
.
addCoriolis
(
alpha2
*
(
1
+
fluid
.
Cvm
()
*
rho2
*
alpha1
/
rho2
)
,
U2Eqn
);
mrfZones
.
addCoriolis
(
alpha2
+
virtualMassCoeff
/
rho2
,
U2Eqn
);
U2Eqn
.
relax
();
}
}
applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H
View file @
509529ca
Info
<<
"Creating twoPhaseSystem
\n
"
<<
endl
;
twoPhaseSystem
fluid
(
mesh
);
twoPhaseSystem
fluid
(
mesh
,
g
);
phaseModel
&
phase1
=
fluid
.
phase1
();
phaseModel
&
phase2
=
fluid
.
phase2
();
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files
View file @
509529ca
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/noDrag/noDrag.C
dragModels/segregated/segregated.C
dragModels/Ergun/Ergun.C
dragModels/Gibilaro/Gibilaro.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
dragModels/SchillerNaumann/SchillerNaumann.C
dragModels/Gibilaro/Gibilaro.C
dragModels/WenYu/WenYu.C
dragModels/SyamlalOBrien/SyamlalOBrien.C
dragModels/TomiyamaCorrelated/TomiyamaCorrelated.C
dragModels/TomiyamaAnalytic/TomiyamaAnalytic.C
dragModels/WenYu/WenYu.C
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
heatTransferModels/RanzMarshall/RanzMarshall.C
swarmCorrections/swarmCorrection/swarmCorrection.C
swarmCorrections/swarmCorrection/newSwarmCorrection.C
swarmCorrections/noSwarm/noSwarm.C
swarmCorrections/TomiyamaSwarm/TomiyamaSwarm.C
liftModels/liftModel/liftModel.C
liftModels/liftModel/newLiftModel.C
liftModels/noLift/noLift.C
liftModels/constantCoefficient/constantCoefficient.C
liftModels/constantLiftCoefficient/constantLiftCoefficient.C
liftModels/TomiyamaLift/TomiyamaLift.C
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
heatTransferModels/noHeatTransfer/noHeatTransfer.C
heatTransferModels/RanzMarshall/RanzMarshall.C
virtualMassModels/virtualMassModel/virtualMassModel.C
virtualMassModels/virtualMassModel/newVirtualMassModel.C
virtualMassModels/noVirtualMass/noVirtualMass.C
virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C
virtualMassModels/Lamb/Lamb.C
wallLubricationModels/wallLubricationModel/wallLubricationModel.C
wallLubricationModels/wallLubricationModel/newWallLubricationModel.C
wallLubricationModels/noWallLubrication/noWallLubrication.C
wallLubricationModels/Antal/Antal.C
turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C
turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C
turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C
turbulentDispersionModels/Gosman/Gosman.C
aspectRatioModels/aspectRatioModel/aspectRatioModel.C
aspectRatioModels/aspectRatioModel/newAspectRatioModel.C
aspectRatioModels/constantAspectRatio/constantAspectRatio.C
aspectRatioModels/Vakhrushev/Vakhrushev.C
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/options
View file @
509529ca
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/transportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-I../twoPhaseSystem/lnInclude
LIB_LIBS = \
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/Vakhrushev/Vakhrushev.C
0 → 100644
View file @
509529ca
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"Vakhrushev.H"
#include
"orderedPhasePair.H"
#include
"addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
namespace
aspectRatioModels
{
defineTypeNameAndDebug
(
Vakhrushev
,
0
);
addToRunTimeSelectionTable
(
aspectRatioModel
,
Vakhrushev
,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
aspectRatioModels
::
Vakhrushev
::
Vakhrushev
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
)
:
aspectRatioModel
(
dict
,
pair
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam
::
aspectRatioModels
::
Vakhrushev
::~
Vakhrushev
()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
aspectRatioModels
::
Vakhrushev
::
E
()
const
{
volScalarField
Ta
(
pair_
.
Ta
());
return
neg
(
Ta
-
scalar
(
1
))
*
scalar
(
1
)
+
pos
(
Ta
-
scalar
(
1
))
*
neg
(
Ta
-
scalar
(
39
.
8
))
*
pow3
(
0
.
81
+
0
.
206
*
tanh
(
1
.
6
-
2
*
log10
(
max
(
Ta
,
scalar
(
1
)))))
+
pos
(
Ta
-
scalar
(
39
.
8
))
*
0
.
24
;
}
// ************************************************************************* //
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/Vakhrushev/Vakhrushev.H
0 → 100644
View file @
509529ca
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::Vakhrushev
Description
SourceFiles
Vakhrushev.C
\*---------------------------------------------------------------------------*/
#ifndef Vakhrushev_H
#define Vakhrushev_H
#include
"aspectRatioModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
namespace
aspectRatioModels
{
/*---------------------------------------------------------------------------*\
Class Vakhrushev Declaration
\*---------------------------------------------------------------------------*/
class
Vakhrushev
:
public
aspectRatioModel
{
public:
//- Runtime type information
TypeName
(
"Vakhrushev"
);
// Constructors
//- Construct from a dictionary and an ordered phase pair
Vakhrushev
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
);
//- Destructor
virtual
~
Vakhrushev
();
// Member Functions
//- Aspect ratio
virtual
tmp
<
volScalarField
>
E
()
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace aspectRatioModels
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.C
0 → 100644
View file @
509529ca
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"aspectRatioModel.H"
#include
"orderedPhasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
defineTypeNameAndDebug
(
aspectRatioModel
,
0
);
defineRunTimeSelectionTable
(
aspectRatioModel
,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
aspectRatioModel
::
aspectRatioModel
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
)
:
pair_
(
pair
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam
::
aspectRatioModel
::~
aspectRatioModel
()
{}
// ************************************************************************* //
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/aspectRatioModel.H
0 → 100644
View file @
509529ca
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::aspectRatioModel
Description
SourceFiles
aspectRatioModel.C
\*---------------------------------------------------------------------------*/
#ifndef aspectRatioModel_H
#define aspectRatioModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include
"volFields.H"
#include
"dictionary.H"
#include
"runTimeSelectionTables.H"
namespace
Foam
{
class
orderedPhasePair
;
/*---------------------------------------------------------------------------*\
Class aspectRatioModel Declaration
\*---------------------------------------------------------------------------*/
class
aspectRatioModel
{
protected:
// Protected data
//- Phase pair
const
orderedPhasePair
&
pair_
;
public:
//- Runtime type information
TypeName
(
"aspectRatioModel"
);
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr
,
aspectRatioModel
,
dictionary
,
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
),
(
dict
,
pair
)
);
// Constructors
//- Construct from a dictionary and an ordered phase pair
aspectRatioModel
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
);
//- Destructor
virtual
~
aspectRatioModel
();
// Selectors
static
autoPtr
<
aspectRatioModel
>
New
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
);
// Member Functions
//- Aspect ratio
virtual
tmp
<
volScalarField
>
E
()
const
=
0
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C
0 → 100644
View file @
509529ca
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"aspectRatioModel.H"
#include
"orderedPhasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
aspectRatioModel
>
Foam
::
aspectRatioModel
::
New
(
const
dictionary
&
dict
,
const
orderedPhasePair
&
pair
)
{
word
aspectRatioModelType
(
dict
.
lookup
(
"type"
));
Info
<<
"Selecting aspectRatioModel for "
<<
pair
<<
": "
<<
aspectRatioModelType
<<
endl
;
dictionaryConstructorTable
::
iterator
cstrIter
=
dictionaryConstructorTablePtr_
->
find
(
aspectRatioModelType
);
if
(
cstrIter
==
dictionaryConstructorTablePtr_
->
end
())
{
FatalErrorIn
(
"aspectRatioModel::New"
)
<<
"Unknown aspectRatioModelType type "
<<
aspectRatioModelType
<<
endl
<<
endl
<<
"Valid aspectRatioModel types are : "
<<
endl
<<
dictionaryConstructorTablePtr_
->
sortedToc
()
<<
exit
(
FatalError
);
}
return
cstrIter
()(
dict
,
pair
);