twoPhaseEulerFoam: Move the residualAlpha used for drag into the phaseModel

This is necessary to guarantee consistency between the residualAlpha
used for drag and buoyancy in a multi-phase system
This commit is contained in:
Henry
2015-06-07 18:55:24 +01:00
parent 9bc5a92f70
commit c937c4c9ba
37 changed files with 188 additions and 142 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "TomiyamaAspectRatio.H" #include "TomiyamaAspectRatio.H"
#include "orderedPhasePair.H" #include "phasePair.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,7 +49,7 @@ namespace aspectRatioModels
Foam::aspectRatioModels::TomiyamaAspectRatio::TomiyamaAspectRatio Foam::aspectRatioModels::TomiyamaAspectRatio::TomiyamaAspectRatio
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
: :
VakhrushevEfremov(dict, pair), VakhrushevEfremov(dict, pair),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,7 +74,7 @@ public:
TomiyamaAspectRatio TomiyamaAspectRatio
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "VakhrushevEfremov.H" #include "VakhrushevEfremov.H"
#include "orderedPhasePair.H" #include "phasePair.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,7 +49,7 @@ namespace aspectRatioModels
Foam::aspectRatioModels::VakhrushevEfremov::VakhrushevEfremov Foam::aspectRatioModels::VakhrushevEfremov::VakhrushevEfremov
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
: :
aspectRatioModel(dict, pair) aspectRatioModel(dict, pair)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -73,7 +73,7 @@ public:
VakhrushevEfremov VakhrushevEfremov
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "Wellek.H" #include "Wellek.H"
#include "orderedPhasePair.H" #include "phasePair.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,7 +49,7 @@ namespace aspectRatioModels
Foam::aspectRatioModels::Wellek::Wellek Foam::aspectRatioModels::Wellek::Wellek
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
: :
aspectRatioModel(dict, pair) aspectRatioModel(dict, pair)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -79,7 +79,7 @@ public:
Wellek Wellek
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "aspectRatioModel.H" #include "aspectRatioModel.H"
#include "orderedPhasePair.H" #include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -40,7 +40,7 @@ namespace Foam
Foam::aspectRatioModel::aspectRatioModel Foam::aspectRatioModel::aspectRatioModel
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
: :
pair_(pair) pair_(pair)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,7 +44,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
class orderedPhasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class aspectRatioModel Declaration Class aspectRatioModel Declaration
@ -57,7 +57,7 @@ protected:
// Protected data // Protected data
//- Phase pair //- Phase pair
const orderedPhasePair& pair_; const phasePair& pair_;
public: public:
@ -74,7 +74,7 @@ public:
dictionary, dictionary,
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
), ),
(dict, pair) (dict, pair)
); );
@ -86,7 +86,7 @@ public:
aspectRatioModel aspectRatioModel
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );
@ -99,7 +99,7 @@ public:
static autoPtr<aspectRatioModel> New static autoPtr<aspectRatioModel> New
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,15 +24,15 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "aspectRatioModel.H" #include "aspectRatioModel.H"
#include "orderedPhasePair.H" #include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::aspectRatioModel > Foam::autoPtr<Foam::aspectRatioModel>
Foam::aspectRatioModel::New Foam::aspectRatioModel::New
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
{ {
word aspectRatioModelType(dict.lookup("type")); word aspectRatioModelType(dict.lookup("type"));

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "constantAspectRatio.H" #include "constantAspectRatio.H"
#include "orderedPhasePair.H" #include "phasePair.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,7 +49,7 @@ namespace aspectRatioModels
Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio Foam::aspectRatioModels::constantAspectRatio::constantAspectRatio
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
) )
: :
aspectRatioModel(dict, pair), aspectRatioModel(dict, pair),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
constantAspectRatio constantAspectRatio
( (
const dictionary& dict, const dictionary& dict,
const orderedPhasePair& pair const phasePair& pair
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,8 +66,11 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::Ergun::CdRe() const
(4/3) (4/3)
*( *(
150 150
*max(scalar(1) - pair_.continuous(), residualAlpha_) *max
/max(pair_.continuous(), residualAlpha_) (
scalar(1) - pair_.continuous(),
pair_.continuous().residualAlpha()
)/max(pair_.continuous(), pair_.continuous().residualAlpha())
+ 1.75 + 1.75
*pair_.Re() *pair_.Re()
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,12 +62,15 @@ Foam::dragModels::Gibilaro::~Gibilaro()
Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::CdRe() const Foam::tmp<Foam::volScalarField> Foam::dragModels::Gibilaro::CdRe() const
{ {
volScalarField alpha2(max(scalar(1) - pair_.dispersed(), residualAlpha_)); volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
return return
(4/3) (4/3)
*(17.3/alpha2 + 0.336*pair_.Re()) *(17.3/alpha2 + 0.336*pair_.Re())
*max(pair_.continuous(), residualAlpha_) *max(pair_.continuous(), pair_.continuous().residualAlpha())
*pow(alpha2, -2.8); *pow(alpha2, -2.8);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,8 +64,13 @@ Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann()
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::dragModels::GidaspowSchillerNaumann::CdRe() const Foam::dragModels::GidaspowSchillerNaumann::CdRe() const
{ {
volScalarField alpha2(max(scalar(1) - pair_.dispersed(), residualAlpha_)); volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
volScalarField Re(alpha2*pair_.Re()); volScalarField Re(alpha2*pair_.Re());
volScalarField CdsRe volScalarField CdsRe
( (
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2 neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2
@ -75,7 +80,7 @@ Foam::dragModels::GidaspowSchillerNaumann::CdRe() const
return return
CdsRe CdsRe
*pow(alpha2, -2.65) *pow(alpha2, -2.65)
*max(pair_.continuous(), residualAlpha_); *max(pair_.continuous(), pair_.continuous().residualAlpha());
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,7 +62,11 @@ Foam::dragModels::SyamlalOBrien::~SyamlalOBrien()
Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const
{ {
volScalarField alpha2(max(scalar(1) - pair_.dispersed(), residualAlpha_)); volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
volScalarField A(pow(alpha2, 4.14)); volScalarField A(pow(alpha2, 4.14));
volScalarField B volScalarField B
( (
@ -81,7 +85,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const
return return
CdsRe CdsRe
*max(pair_.continuous(), residualAlpha_) *max(pair_.continuous(), pair_.continuous().residualAlpha())
/sqr(Vr); /sqr(Vr);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -63,7 +63,11 @@ Foam::dragModels::WenYu::~WenYu()
Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const
{ {
volScalarField alpha2(max(scalar(1) - pair_.dispersed(), residualAlpha_)); volScalarField alpha2
(
max(scalar(1) - pair_.dispersed(), pair_.continuous().residualAlpha())
);
volScalarField Re(pair_.Re()); volScalarField Re(pair_.Re());
volScalarField CdsRe volScalarField CdsRe
( (
@ -74,7 +78,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const
return return
CdsRe CdsRe
*pow(alpha2, -2.65) *pow(alpha2, -2.65)
*max(pair_.continuous(), residualAlpha_); *max(pair_.continuous(), pair_.continuous().residualAlpha());
} }

View File

@ -90,8 +90,7 @@ Foam::dragModel::dragModel
dict.subDict("swarmCorrection"), dict.subDict("swarmCorrection"),
pair pair
) )
), )
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha"))
{} {}
@ -117,15 +116,18 @@ Foam::tmp<Foam::volScalarField> Foam::dragModel::Ki() const
Foam::tmp<Foam::volScalarField> Foam::dragModel::K() const Foam::tmp<Foam::volScalarField> Foam::dragModel::K() const
{ {
return max(pair_.dispersed(), residualAlpha_)*Ki(); return max(pair_.dispersed(), pair_.dispersed().residualAlpha())*Ki();
} }
Foam::tmp<Foam::surfaceScalarField> Foam::dragModel::Kf() const Foam::tmp<Foam::surfaceScalarField> Foam::dragModel::Kf() const
{ {
return return
max(fvc::interpolate(pair_.dispersed()), residualAlpha_) max
*fvc::interpolate(Ki()); (
fvc::interpolate(pair_.dispersed()),
pair_.dispersed().residualAlpha()
)*fvc::interpolate(Ki());
} }

View File

@ -65,9 +65,6 @@ protected:
//- Swarm correction //- Swarm correction
autoPtr<swarmCorrection> swarmCorrection_; autoPtr<swarmCorrection> swarmCorrection_;
//- Residual phase fraction
const dimensionedScalar residualAlpha_;
public: public:
@ -130,13 +127,6 @@ public:
// Member Functions // Member Functions
//- Return the residual phase-fraction
// used to stabilize the phase momentum as the phase-fraction -> 0
const dimensionedScalar& residualAlpha() const
{
return residualAlpha_;
}
//- Drag coefficient //- Drag coefficient
virtual tmp<volScalarField> CdRe() const = 0; virtual tmp<volScalarField> CdRe() const = 0;

View File

@ -112,7 +112,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
/max /max
( (
alpha1 + alpha2, alpha1 + alpha2,
residualAlpha_ pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha()
) )
); );
volScalarField magGradI volScalarField magGradI
@ -120,7 +120,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
max max
( (
mag(fvc::grad(I)), mag(fvc::grad(I)),
residualAlpha_/L (pair_.phase1().residualAlpha() + pair_.phase2().residualAlpha())/L
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,6 +25,8 @@ Class
Foam::heatTransferModels::RanzMarshall Foam::heatTransferModels::RanzMarshall
Description Description
Ranz-Marshall correlation for turbulent heat transfer from the surface of a
sphere to the surrounding fluid.
SourceFiles SourceFiles
RanzMarshall.C RanzMarshall.C

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,7 +46,16 @@ Foam::heatTransferModel::heatTransferModel
) )
: :
pair_(pair), pair_(pair),
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha")) residualAlpha_
(
"residualAlpha",
dimless,
dict.lookupOrDefault<scalar>
(
"residualAlpha",
pair_.dispersed().residualAlpha().value()
)
)
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,16 @@ Foam::swarmCorrections::TomiyamaSwarm::TomiyamaSwarm
) )
: :
swarmCorrection(dict, pair), swarmCorrection(dict, pair),
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha")), residualAlpha_
(
"residualAlpha",
dimless,
dict.lookupOrDefault<scalar>
(
"residualAlpha",
pair_.dispersed().residualAlpha().value()
)
),
l_("l", dimless, dict.lookup("l")) l_("l", dimless, dict.lookup("l"))
{} {}

View File

@ -57,7 +57,16 @@ Foam::turbulentDispersionModels::Burns::Burns
: :
turbulentDispersionModel(dict, pair), turbulentDispersionModel(dict, pair),
sigma_("sigma", dimless, dict.lookup("sigma")), sigma_("sigma", dimless, dict.lookup("sigma")),
residualAlpha_("residualAlpha", dimless, dict.lookup("residualAlpha")) residualAlpha_
(
"residualAlpha",
dimless,
dict.lookupOrDefault<scalar>
(
"residualAlpha",
pair_.dispersed().residualAlpha().value()
)
)
{} {}

View File

@ -7,7 +7,7 @@ volScalarField rAU1
1.0 1.0
/( /(
U1Eqn.A() U1Eqn.A()
+ max(fluid.residualAlpha(phase1) - alpha1, scalar(0)) + max(phase1.residualAlpha() - alpha1, scalar(0))
*rho1/runTime.deltaT() *rho1/runTime.deltaT()
) )
); );
@ -17,18 +17,18 @@ volScalarField rAU2
1.0 1.0
/( /(
U2Eqn.A() U2Eqn.A()
+ max(fluid.residualAlpha(phase2) - alpha2, scalar(0)) + max(phase2.residualAlpha() - alpha2, scalar(0))
*rho2/runTime.deltaT() *rho2/runTime.deltaT()
) )
); );
surfaceScalarField alpharAUf1 surfaceScalarField alpharAUf1
( (
fvc::interpolate(max(alpha1, fluid.residualAlpha(phase1))*rAU1) fvc::interpolate(max(alpha1, phase1.residualAlpha())*rAU1)
); );
surfaceScalarField alpharAUf2 surfaceScalarField alpharAUf2
( (
fvc::interpolate(max(alpha2, fluid.residualAlpha(phase2))*rAU2) fvc::interpolate(max(alpha2, phase2.residualAlpha())*rAU2)
); );
// Turbulent diffusion, particle-pressure, lift and wall-lubrication fluxes // Turbulent diffusion, particle-pressure, lift and wall-lubrication fluxes
@ -104,7 +104,7 @@ while (pimple.correct())
rAU1 rAU1
*( *(
U1Eqn.H() U1Eqn.H()
+ max(fluid.residualAlpha(phase1) - alpha1, scalar(0)) + max(phase1.residualAlpha() - alpha1, scalar(0))
*rho1*U1.oldTime()/runTime.deltaT() *rho1*U1.oldTime()/runTime.deltaT()
); );
@ -117,7 +117,7 @@ while (pimple.correct())
rAU2 rAU2
*( *(
U2Eqn.H() U2Eqn.H()
+ max(fluid.residualAlpha(phase2) - alpha2, scalar(0)) + max(phase2.residualAlpha() - alpha2, scalar(0))
*rho2*U2.oldTime()/runTime.deltaT() *rho2*U2.oldTime()/runTime.deltaT()
); );
@ -145,7 +145,7 @@ while (pimple.correct())
*( *(
ghSnGradRho ghSnGradRho
- alphaf1*fvc::interpolate(rho2 - rho1)*(g & mesh.Sf()) - alphaf1*fvc::interpolate(rho2 - rho1)*(g & mesh.Sf())
) )
); );

View File

@ -6,7 +6,7 @@ surfaceScalarField alphaRhof10
"alphaRhof10", "alphaRhof10",
fvc::interpolate fvc::interpolate
( (
max(alpha1.oldTime(), fluid.residualAlpha(phase1)) max(alpha1.oldTime(), phase1.residualAlpha())
*rho1.oldTime() *rho1.oldTime()
) )
); );
@ -16,7 +16,7 @@ surfaceScalarField alphaRhof20
"alphaRhof20", "alphaRhof20",
fvc::interpolate fvc::interpolate
( (
max(alpha2.oldTime(), fluid.residualAlpha(phase2)) max(alpha2.oldTime(), phase2.residualAlpha())
*rho2.oldTime() *rho2.oldTime()
) )
); );
@ -105,13 +105,13 @@ while (pimple.correct())
surfaceScalarField alpharAUf1 surfaceScalarField alpharAUf1
( (
IOobject::groupName("alpharAUf", phase1.name()), IOobject::groupName("alpharAUf", phase1.name()),
max(alphaf1, fluid.residualAlpha(phase1))*rAUf1 max(alphaf1, phase1.residualAlpha())*rAUf1
); );
surfaceScalarField alpharAUf2 surfaceScalarField alpharAUf2
( (
IOobject::groupName("alpharAUf", phase2.name()), IOobject::groupName("alpharAUf", phase2.name()),
max(alphaf2, fluid.residualAlpha(phase2))*rAUf2 max(alphaf2, phase2.residualAlpha())*rAUf2
); );
volScalarField rho("rho", fluid.rho()); volScalarField rho("rho", fluid.rho());

View File

@ -36,6 +36,7 @@ License
#include "partialSlipFvPatchFields.H" #include "partialSlipFvPatchFields.H"
#include "surfaceInterpolate.H" #include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phaseModel::phaseModel Foam::phaseModel::phaseModel
@ -64,6 +65,12 @@ Foam::phaseModel::phaseModel
( (
phaseProperties.subDict(name_) phaseProperties.subDict(name_)
), ),
residualAlpha_
(
"residualAlpha",
dimless,
fluid.subDict(phaseName).lookup("residualAlpha")
),
alphaMax_(phaseDict_.lookupOrDefault("alphaMax", 1.0)), alphaMax_(phaseDict_.lookupOrDefault("alphaMax", 1.0)),
thermo_(rhoThermo::New(fluid.mesh(), name_)), thermo_(rhoThermo::New(fluid.mesh(), name_)),
U_ U_
@ -212,23 +219,27 @@ Foam::tmp<Foam::volScalarField> Foam::phaseModel::d() const
return dPtr_().d(); return dPtr_().d();
} }
Foam::PhaseCompressibleTurbulenceModel<Foam::phaseModel>& Foam::PhaseCompressibleTurbulenceModel<Foam::phaseModel>&
Foam::phaseModel::turbulence() Foam::phaseModel::turbulence()
{ {
return turbulence_(); return turbulence_();
} }
const Foam::PhaseCompressibleTurbulenceModel<Foam::phaseModel>& const Foam::PhaseCompressibleTurbulenceModel<Foam::phaseModel>&
Foam::phaseModel::turbulence() const Foam::phaseModel::turbulence() const
{ {
return turbulence_(); return turbulence_();
} }
void Foam::phaseModel::correct() void Foam::phaseModel::correct()
{ {
return dPtr_->correct(); return dPtr_->correct();
} }
bool Foam::phaseModel::read(const dictionary& phaseProperties) bool Foam::phaseModel::read(const dictionary& phaseProperties)
{ {
phaseDict_ = phaseProperties.subDict(name_); phaseDict_ = phaseProperties.subDict(name_);

View File

@ -71,6 +71,10 @@ class phaseModel
dictionary phaseDict_; dictionary phaseDict_;
//- Return the residual phase-fraction for given phase
// Used to stabilize the phase momentum as the phase-fraction -> 0
dimensionedScalar residualAlpha_;
//- Optional maximum phase-fraction (e.g. packing limit) //- Optional maximum phase-fraction (e.g. packing limit)
scalar alphaMax_; scalar alphaMax_;
@ -129,6 +133,13 @@ public:
//- Return the other phase in this two-phase system //- Return the other phase in this two-phase system
const phaseModel& otherPhase() const; const phaseModel& otherPhase() const;
//- Return the residual phase-fraction for given phase
// Used to stabilize the phase momentum as the phase-fraction -> 0
const dimensionedScalar& residualAlpha() const
{
return residualAlpha_;
}
//- Optional maximum phase-fraction (e.g. packing limit) //- Optional maximum phase-fraction (e.g. packing limit)
// Defaults to 1 // Defaults to 1
scalar alphaMax() const scalar alphaMax() const

View File

@ -48,14 +48,6 @@ License
#include "HashPtrTable.H" #include "HashPtrTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
Foam::dimensionedScalar Foam::twoPhaseSystem::zeroResidualAlpha_
(
"zeroResidualAlpha", dimless, 0
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::twoPhaseSystem::twoPhaseSystem Foam::twoPhaseSystem::twoPhaseSystem
@ -588,20 +580,6 @@ bool Foam::twoPhaseSystem::read()
} }
const Foam::dimensionedScalar&
Foam::twoPhaseSystem::residualAlpha(const phaseModel& phase) const
{
if (drag_->hasModel(phase))
{
return drag_->phaseModel(phase).residualAlpha();
}
else
{
return zeroResidualAlpha_;
}
}
const Foam::dragModel& Foam::twoPhaseSystem::drag(const phaseModel& phase) const const Foam::dragModel& Foam::twoPhaseSystem::drag(const phaseModel& phase) const
{ {
return drag_->phaseModel(phase); return drag_->phaseModel(phase);

View File

@ -116,9 +116,6 @@ class twoPhaseSystem
autoPtr<BlendedInterfacialModel<turbulentDispersionModel> > autoPtr<BlendedInterfacialModel<turbulentDispersionModel> >
turbulentDispersion_; turbulentDispersion_;
//- Default residual alpha (0)
static dimensionedScalar zeroResidualAlpha_;
// Private member functions // Private member functions
@ -185,13 +182,6 @@ public:
// Access // Access
//- Return the residual phase-fraction for given phase
// Used to stabilize the phase momentum as the phase-fraction -> 0
const dimensionedScalar& residualAlpha
(
const phaseModel& phase
) const;
//- Return the drag model for the given phase //- Return the drag model for the given phase
const dragModel& drag(const phaseModel& phase) const; const dragModel& drag(const phaseModel& phase) const;

View File

@ -25,6 +25,8 @@ air
d0 3e-3; d0 3e-3;
p0 1e5; p0 1e5;
} }
residualAlpha 1e-6;
} }
water water
@ -34,6 +36,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-6;
} }
blending blending
@ -73,7 +77,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -84,7 +87,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -95,7 +97,6 @@ drag
(air and water) (air and water)
{ {
type segregated; type segregated;
residualAlpha 1e-6;
m 0.5; m 0.5;
n 8; n 8;
swarmCorrection swarmCorrection

View File

@ -25,6 +25,8 @@ air
d0 3e-3; d0 3e-3;
p0 1e5; p0 1e5;
} }
residualAlpha 1e-6;
} }
water water
@ -34,6 +36,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-6;
} }
blending blending
@ -73,7 +77,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -84,7 +87,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -95,7 +97,6 @@ drag
(air and water) (air and water)
{ {
type segregated; type segregated;
residualAlpha 1e-6;
m 0.5; m 0.5;
n 8; n 8;
swarmCorrection swarmCorrection

View File

@ -19,22 +19,29 @@ phases (particles air);
particles particles
{ {
residualAlpha 1e-6;
diameterModel constant; diameterModel constant;
constantCoeffs constantCoeffs
{ {
d 3e-4; d 3e-4;
} }
alphaMax 0.62; alphaMax 0.62;
residualAlpha 1e-6;
} }
air air
{ {
residualAlpha 0;
diameterModel constant; diameterModel constant;
constantCoeffs constantCoeffs
{ {
d 1; d 1;
} }
residualAlpha 0;
} }
blending blending
@ -60,7 +67,6 @@ drag
(particles in air) (particles in air)
{ {
type GidaspowErgunWenYu; type GidaspowErgunWenYu;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {

View File

@ -25,6 +25,8 @@ air
d0 3e-3; d0 3e-3;
p0 1e5; p0 1e5;
} }
residualAlpha 1e-6;
} }
water water
@ -34,6 +36,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-6;
} }
blending blending
@ -73,7 +77,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -84,7 +87,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {

View File

@ -46,6 +46,8 @@ air
} }
); );
} }
residualAlpha 1e-6;
} }
water water
@ -55,6 +57,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-6;
} }
blending blending
@ -94,7 +98,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -105,7 +108,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -116,7 +118,6 @@ drag
(air and water) (air and water)
{ {
type segregated; type segregated;
residualAlpha 1e-6;
m 0.5; m 0.5;
n 8; n 8;
swarmCorrection swarmCorrection

View File

@ -25,7 +25,8 @@ particles
d 3e-4; d 3e-4;
} }
alphaMax 0.62; alphaMax 0.62;
residualAlpha 1e-6;
} }
air air
@ -35,6 +36,8 @@ air
{ {
d 1; d 1;
} }
residualAlpha 0;
} }
blending blending
@ -60,7 +63,6 @@ drag
(particles in air) (particles in air)
{ {
type GidaspowErgunWenYu; type GidaspowErgunWenYu;
residualAlpha 1e-6;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {

View File

@ -25,6 +25,8 @@ air
d0 3e-3; d0 3e-3;
p0 1e5; p0 1e5;
} }
residualAlpha 1e-4;
} }
water water
@ -34,6 +36,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-4;
} }
blending blending
@ -73,7 +77,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-4;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -84,7 +87,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-4;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {

View File

@ -25,6 +25,8 @@ air
d0 3e-3; d0 3e-3;
p0 1e5; p0 1e5;
} }
residualAlpha 1e-4;
} }
water water
@ -34,6 +36,8 @@ water
{ {
d 1e-4; d 1e-4;
} }
residualAlpha 1e-4;
} }
blending blending
@ -73,7 +77,6 @@ drag
(air in water) (air in water)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-4;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -84,7 +87,6 @@ drag
(water in air) (water in air)
{ {
type SchillerNaumann; type SchillerNaumann;
residualAlpha 1e-4;
residualRe 1e-3; residualRe 1e-3;
swarmCorrection swarmCorrection
{ {
@ -95,7 +97,6 @@ drag
(air and water) (air and water)
{ {
type segregated; type segregated;
residualAlpha 1e-4;
m 0.5; m 0.5;
n 8; n 8;
swarmCorrection swarmCorrection