driftFluxFoam: Generalised the treatment of the effect of flow curvature
Rather than rely on the MRF rotation the effect of acceleration due to flow curvature on the dispersed is now handled directly using the Ud.grad(Ud) term derived from the phase momentum equation. This means that any flow curvature from bulk rotation to recirulation zones now affect the separation of the dispersed phase from the continuous phase in a physical manner.
This commit is contained in:
@ -1,12 +1,10 @@
|
|||||||
// Solve the Momentum equation
|
// Solve the Momentum equation
|
||||||
|
|
||||||
MRF.correctBoundaryVelocity(U);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||||
+ MRF.DDt(rho, U)
|
+ mixture.MRF().DDt(rho, U)
|
||||||
+ fvc::div(UdmModel.tauDm())
|
+ mixture.divTauDm()
|
||||||
+ turbulence->divDevTau(U)
|
+ turbulence->divDevTau(U)
|
||||||
==
|
==
|
||||||
fvModels.source(rho, U)
|
fvModels.source(rho, U)
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
dimensionedScalar(phi.dimensions(), 0)
|
dimensionedScalar(phi.dimensions(), 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField phir(fvc::flux(UdmModel.Udm()));
|
surfaceScalarField phir(fvc::flux(mixture.Udm()));
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -29,8 +29,13 @@ volVectorField U
|
|||||||
#include "createPhi.H"
|
#include "createPhi.H"
|
||||||
|
|
||||||
|
|
||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "readhRef.H"
|
||||||
|
#include "gh.H"
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading incompressibleTwoPhaseInteractingMixture\n" << endl;
|
Info<< "Reading incompressibleTwoPhaseInteractingMixture\n" << endl;
|
||||||
incompressibleTwoPhaseInteractingMixture mixture(U, phi);
|
incompressibleTwoPhaseInteractingMixture mixture(U, phi, g);
|
||||||
|
|
||||||
volScalarField& alpha1(mixture.alpha1());
|
volScalarField& alpha1(mixture.alpha1());
|
||||||
|
|
||||||
@ -63,11 +68,6 @@ surfaceScalarField rhoPhi
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
#include "readGravitationalAcceleration.H"
|
|
||||||
#include "readhRef.H"
|
|
||||||
#include "gh.H"
|
|
||||||
|
|
||||||
|
|
||||||
// Construct compressible turbulence model
|
// Construct compressible turbulence model
|
||||||
autoPtr<compressible::momentumTransportModel> turbulence
|
autoPtr<compressible::momentumTransportModel> turbulence
|
||||||
(
|
(
|
||||||
@ -75,7 +75,6 @@ autoPtr<compressible::momentumTransportModel> turbulence
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
volScalarField p
|
volScalarField p
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -109,19 +108,5 @@ mesh.schemes().setFluxRequired(alpha1.name());
|
|||||||
// MULES Correction
|
// MULES Correction
|
||||||
tmp<surfaceScalarField> talphaPhiCorr0;
|
tmp<surfaceScalarField> talphaPhiCorr0;
|
||||||
|
|
||||||
#include "createMRF.H"
|
|
||||||
|
|
||||||
// Relative Velocity
|
|
||||||
autoPtr<relativeVelocityModel> UdmModelPtr
|
|
||||||
(
|
|
||||||
relativeVelocityModel::New
|
|
||||||
(
|
|
||||||
mixture,
|
|
||||||
mixture,
|
|
||||||
g,
|
|
||||||
MRF
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createFvModels.H"
|
#include "createFvModels.H"
|
||||||
#include "createFvConstraints.H"
|
#include "createFvConstraints.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,15 +37,12 @@ Description
|
|||||||
#include "CMULES.H"
|
#include "CMULES.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "incompressibleTwoPhaseInteractingMixture.H"
|
#include "incompressibleTwoPhaseInteractingMixture.H"
|
||||||
#include "relativeVelocityModel.H"
|
|
||||||
#include "momentumTransportModel.H"
|
#include "momentumTransportModel.H"
|
||||||
#include "compressibleMomentumTransportModels.H"
|
#include "compressibleMomentumTransportModels.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureReference.H"
|
#include "pressureReference.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "gaussLaplacianScheme.H"
|
|
||||||
#include "uncorrectedSnGrad.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -64,7 +61,6 @@ int main(int argc, char *argv[])
|
|||||||
volScalarField& alpha2(mixture.alpha2());
|
volScalarField& alpha2(mixture.alpha2());
|
||||||
const dimensionedScalar& rho1 = mixture.rhod();
|
const dimensionedScalar& rho1 = mixture.rhod();
|
||||||
const dimensionedScalar& rho2 = mixture.rhoc();
|
const dimensionedScalar& rho2 = mixture.rhoc();
|
||||||
relativeVelocityModel& UdmModel(UdmModelPtr());
|
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
@ -85,9 +81,9 @@ int main(int argc, char *argv[])
|
|||||||
// --- Pressure-velocity PIMPLE corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
fvModels.correct();
|
mixture.correct();
|
||||||
|
|
||||||
UdmModel.correct();
|
fvModels.correct();
|
||||||
|
|
||||||
#include "alphaEqnSubCycle.H"
|
#include "alphaEqnSubCycle.H"
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,8 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "incompressibleTwoPhaseInteractingMixture.H"
|
#include "incompressibleTwoPhaseInteractingMixture.H"
|
||||||
|
#include "relativeVelocityModel.H"
|
||||||
|
#include "fvcDiv.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -39,8 +41,9 @@ namespace Foam
|
|||||||
Foam::incompressibleTwoPhaseInteractingMixture::
|
Foam::incompressibleTwoPhaseInteractingMixture::
|
||||||
incompressibleTwoPhaseInteractingMixture
|
incompressibleTwoPhaseInteractingMixture
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
volVectorField& U,
|
||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi,
|
||||||
|
const uniformDimensionedVectorField& g
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
twoPhaseMixture(U.mesh()),
|
twoPhaseMixture(U.mesh()),
|
||||||
@ -60,6 +63,10 @@ incompressibleTwoPhaseInteractingMixture
|
|||||||
|
|
||||||
U_(U),
|
U_(U),
|
||||||
|
|
||||||
|
g_(g),
|
||||||
|
|
||||||
|
MRF_(U.mesh()),
|
||||||
|
|
||||||
mu_
|
mu_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -71,14 +78,145 @@ incompressibleTwoPhaseInteractingMixture
|
|||||||
U_.mesh(),
|
U_.mesh(),
|
||||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), 0),
|
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), 0),
|
||||||
calculatedFvPatchScalarField::typeName
|
calculatedFvPatchScalarField::typeName
|
||||||
)
|
),
|
||||||
|
|
||||||
|
UdmModel_(relativeVelocityModel::New(*this, *this, g))
|
||||||
{
|
{
|
||||||
correct();
|
correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::
|
||||||
|
~incompressibleTwoPhaseInteractingMixture()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::mixtureViscosityModel&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::muModel() const
|
||||||
|
{
|
||||||
|
return muModel_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::viscosityModel&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::nucModel() const
|
||||||
|
{
|
||||||
|
return nucModel_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::dimensionedScalar&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::rhod() const
|
||||||
|
{
|
||||||
|
return rhod_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::dimensionedScalar&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::rhoc() const
|
||||||
|
{
|
||||||
|
return rhoc_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::dimensionedScalar&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::dd() const
|
||||||
|
{
|
||||||
|
return dd_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::scalar
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::alphaMax() const
|
||||||
|
{
|
||||||
|
return alphaMax_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::volVectorField&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::U() const
|
||||||
|
{
|
||||||
|
return U_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::IOMRFZoneList&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::MRF() const
|
||||||
|
{
|
||||||
|
return MRF_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::mu() const
|
||||||
|
{
|
||||||
|
return mu_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::mu(const label patchi) const
|
||||||
|
{
|
||||||
|
return mu_.boundaryField()[patchi];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::rho() const
|
||||||
|
{
|
||||||
|
return alpha1()*rhod_ + alpha2()*rhoc_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::rho(const label patchi) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
alpha1().boundaryField()[patchi]*rhod_.value()
|
||||||
|
+ alpha2().boundaryField()[patchi]*rhoc_.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::nu() const
|
||||||
|
{
|
||||||
|
return mu_/rho();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::nu(const label patchi) const
|
||||||
|
{
|
||||||
|
return mu_.boundaryField()[patchi]/rho(patchi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::volVectorField&
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::Udm() const
|
||||||
|
{
|
||||||
|
return UdmModel_->Udm();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volVectorField>
|
||||||
|
Foam::incompressibleTwoPhaseInteractingMixture::divTauDm() const
|
||||||
|
{
|
||||||
|
return fvc::div(UdmModel_->tauDm());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::incompressibleTwoPhaseInteractingMixture::correct()
|
||||||
|
{
|
||||||
|
MRF_.correctBoundaryVelocity(U_);
|
||||||
|
mu_ = muModel_->mu(rhoc_*nucModel_->nu(), U_);
|
||||||
|
UdmModel_->correct();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::incompressibleTwoPhaseInteractingMixture::read()
|
bool Foam::incompressibleTwoPhaseInteractingMixture::read()
|
||||||
{
|
{
|
||||||
if (twoPhaseMixture::read())
|
if (twoPhaseMixture::read())
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,16 +37,19 @@ SourceFiles
|
|||||||
#ifndef incompressibleTwoPhaseInteractingMixture_H
|
#ifndef incompressibleTwoPhaseInteractingMixture_H
|
||||||
#define incompressibleTwoPhaseInteractingMixture_H
|
#define incompressibleTwoPhaseInteractingMixture_H
|
||||||
|
|
||||||
|
#include "twoPhaseMixture.H"
|
||||||
#include "viscosityModel.H"
|
#include "viscosityModel.H"
|
||||||
#include "mixtureViscosityModel.H"
|
#include "mixtureViscosityModel.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "uniformDimensionedFields.H"
|
||||||
#include "viscosity.H"
|
#include "IOMRFZoneList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class relativeVelocityModel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class incompressibleTwoPhaseInteractingMixture Declaration
|
Class incompressibleTwoPhaseInteractingMixture Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -70,10 +73,19 @@ class incompressibleTwoPhaseInteractingMixture
|
|||||||
//- Optional maximum dispersed phase-fraction (e.g. packing limit)
|
//- Optional maximum dispersed phase-fraction (e.g. packing limit)
|
||||||
scalar alphaMax_;
|
scalar alphaMax_;
|
||||||
|
|
||||||
const volVectorField& U_;
|
volVectorField& U_;
|
||||||
|
|
||||||
|
//- Acceleration due to gravity
|
||||||
|
const uniformDimensionedVectorField& g_;
|
||||||
|
|
||||||
|
//- Optional MRF zones
|
||||||
|
IOMRFZoneList MRF_;
|
||||||
|
|
||||||
volScalarField mu_;
|
volScalarField mu_;
|
||||||
|
|
||||||
|
//- Dispersed phase relative velocity model
|
||||||
|
autoPtr<relativeVelocityModel> UdmModel_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -85,104 +97,69 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
incompressibleTwoPhaseInteractingMixture
|
incompressibleTwoPhaseInteractingMixture
|
||||||
(
|
(
|
||||||
const volVectorField& U,
|
volVectorField& U,
|
||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi,
|
||||||
|
const uniformDimensionedVectorField& g
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~incompressibleTwoPhaseInteractingMixture()
|
virtual ~incompressibleTwoPhaseInteractingMixture();
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return const-access to the mixture viscosityModel
|
//- Return const-access to the mixture viscosityModel
|
||||||
const mixtureViscosityModel& muModel() const
|
const mixtureViscosityModel& muModel() const;
|
||||||
{
|
|
||||||
return muModel_();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return const-access to the continuous-phase viscosityModel
|
//- Return const-access to the continuous-phase viscosityModel
|
||||||
const viscosityModel& nucModel() const
|
const viscosityModel& nucModel() const;
|
||||||
{
|
|
||||||
return nucModel_();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return const-access to the dispersed-phase density
|
//- Return const-access to the dispersed-phase density
|
||||||
const dimensionedScalar& rhod() const
|
const dimensionedScalar& rhod() const;
|
||||||
{
|
|
||||||
return rhod_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return const-access to continuous-phase density
|
//- Return const-access to continuous-phase density
|
||||||
const dimensionedScalar& rhoc() const
|
const dimensionedScalar& rhoc() const;
|
||||||
{
|
|
||||||
return rhoc_;
|
|
||||||
};
|
|
||||||
|
|
||||||
//- Return the diameter of the dispersed-phase particles
|
//- Return the diameter of the dispersed-phase particles
|
||||||
const dimensionedScalar& dd() const
|
const dimensionedScalar& dd() const;
|
||||||
{
|
|
||||||
return dd_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- 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;
|
||||||
{
|
|
||||||
return alphaMax_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return const-access to the mixture velocity
|
//- Return const-access to the mixture velocity
|
||||||
const volVectorField& U() const
|
const volVectorField& U() const;
|
||||||
{
|
|
||||||
return U_;
|
//- Return MRF zones
|
||||||
}
|
const IOMRFZoneList& MRF() const;
|
||||||
|
|
||||||
//- Return the dynamic mixture viscosity
|
//- Return the dynamic mixture viscosity
|
||||||
tmp<volScalarField> mu() const
|
tmp<volScalarField> mu() const;
|
||||||
{
|
|
||||||
return mu_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the dynamic mixture viscosity for patch
|
//- Return the dynamic mixture viscosity for patch
|
||||||
virtual tmp<scalarField> mu(const label patchi) const
|
virtual tmp<scalarField> mu(const label patchi) const;
|
||||||
{
|
|
||||||
return mu_.boundaryField()[patchi];
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the mixture density
|
//- Return the mixture density
|
||||||
virtual tmp<volScalarField> rho() const
|
virtual tmp<volScalarField> rho() const;
|
||||||
{
|
|
||||||
return alpha1()*rhod_ + alpha2()*rhoc_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the mixture density for patch
|
//- Return the mixture density for patch
|
||||||
virtual tmp<scalarField> rho(const label patchi) const
|
virtual tmp<scalarField> rho(const label patchi) const;
|
||||||
{
|
|
||||||
return
|
|
||||||
alpha1().boundaryField()[patchi]*rhod_.value()
|
|
||||||
+ alpha2().boundaryField()[patchi]*rhoc_.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the mixture viscosity
|
//- Return the mixture viscosity
|
||||||
virtual tmp<volScalarField> nu() const
|
virtual tmp<volScalarField> nu() const;
|
||||||
{
|
|
||||||
return mu_/rho();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the mixture viscosity for patch
|
//- Return the mixture viscosity for patch
|
||||||
virtual tmp<scalarField> nu(const label patchi) const
|
virtual tmp<scalarField> nu(const label patchi) const;
|
||||||
{
|
|
||||||
return mu_.boundaryField()[patchi]/rho(patchi);
|
//- Return the diffusion velocity of the dispersed phase
|
||||||
}
|
const volVectorField& Udm() const;
|
||||||
|
|
||||||
|
//- Return the div stress tensor due to the phase transport
|
||||||
|
tmp<volVectorField> divTauDm() const;
|
||||||
|
|
||||||
//- Correct the laminar viscosity
|
//- Correct the laminar viscosity
|
||||||
virtual void correct()
|
virtual void correct();
|
||||||
{
|
|
||||||
mu_ = muModel_->mu(rhoc_*nucModel_->nu(), U_);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Read base phaseProperties dictionary
|
//- Read base phaseProperties dictionary
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|||||||
@ -61,6 +61,12 @@ Foam::mixtureViscosityModels::Quemada::Quemada
|
|||||||
optionalSubDict(typeName + "Coeffs").lookup("alphaMax")
|
optionalSubDict(typeName + "Coeffs").lookup("alphaMax")
|
||||||
),
|
),
|
||||||
q_(optionalSubDict(typeName + "Coeffs").lookupOrDefault("q", scalar(2))),
|
q_(optionalSubDict(typeName + "Coeffs").lookupOrDefault("q", scalar(2))),
|
||||||
|
muMax_
|
||||||
|
(
|
||||||
|
"muMax",
|
||||||
|
dimDynamicViscosity,
|
||||||
|
optionalSubDict(typeName + "Coeffs").lookup("muMax")
|
||||||
|
),
|
||||||
alpha_
|
alpha_
|
||||||
(
|
(
|
||||||
mesh.lookupObject<volScalarField>
|
mesh.lookupObject<volScalarField>
|
||||||
@ -84,7 +90,7 @@ Foam::mixtureViscosityModels::Quemada::mu
|
|||||||
const volVectorField& U
|
const volVectorField& U
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return muc*pow(1.0 - alpha_/alphaMax_, -q_);
|
return min(muc*pow(1.0 - alpha_/alphaMax_, -q_), muMax_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,9 @@ class Quemada
|
|||||||
//- Exponent (defaults to 2)
|
//- Exponent (defaults to 2)
|
||||||
scalar q_;
|
scalar q_;
|
||||||
|
|
||||||
|
//- Maximum viscosity
|
||||||
|
dimensionedScalar muMax_;
|
||||||
|
|
||||||
//- Dispersed phase fraction
|
//- Dispersed phase fraction
|
||||||
const volScalarField& alpha_;
|
const volScalarField& alpha_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ Foam::mixtureViscosityModels::plastic::plastic
|
|||||||
plasticViscosityCoeff_
|
plasticViscosityCoeff_
|
||||||
(
|
(
|
||||||
"coeff",
|
"coeff",
|
||||||
dimensionSet(1, -1, -1, 0, 0),
|
dimDynamicViscosity,
|
||||||
plasticCoeffs_.lookup("coeff")
|
plasticCoeffs_.lookup("coeff")
|
||||||
),
|
),
|
||||||
plasticViscosityExponent_
|
plasticViscosityExponent_
|
||||||
@ -66,12 +66,7 @@ Foam::mixtureViscosityModels::plastic::plastic
|
|||||||
dimless,
|
dimless,
|
||||||
plasticCoeffs_.lookup("exponent")
|
plasticCoeffs_.lookup("exponent")
|
||||||
),
|
),
|
||||||
muMax_
|
muMax_("muMax", dimDynamicViscosity, plasticCoeffs_.lookup("muMax")),
|
||||||
(
|
|
||||||
"muMax",
|
|
||||||
dimensionSet(1, -1, -1, 0, 0),
|
|
||||||
plasticCoeffs_.lookup("muMax")
|
|
||||||
),
|
|
||||||
alpha_
|
alpha_
|
||||||
(
|
(
|
||||||
mesh.lookupObject<volScalarField>
|
mesh.lookupObject<volScalarField>
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
(
|
(
|
||||||
"phiHbyA",
|
"phiHbyA",
|
||||||
fvc::flux(HbyA)
|
fvc::flux(HbyA)
|
||||||
+ MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi))
|
+ mixture.MRF().zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi))
|
||||||
);
|
);
|
||||||
MRF.makeRelative(phiHbyA);
|
mixture.MRF().makeRelative(phiHbyA);
|
||||||
adjustPhi(phiHbyA, U, p_rgh);
|
adjustPhi(phiHbyA, U, p_rgh);
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
@ -21,7 +21,7 @@
|
|||||||
phiHbyA += phig;
|
phiHbyA += phig;
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
constrainPressure(p_rgh, U, phiHbyA, rAUf, mixture.MRF());
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,11 +44,10 @@ Foam::relativeVelocityModels::general::general
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
relativeVelocityModel(dict, mixture, g, MRF),
|
relativeVelocityModel(dict, mixture, g),
|
||||||
a_("a", dimless, dict),
|
a_("a", dimless, dict),
|
||||||
a1_("a1", dimless, dict),
|
a1_("a1", dimless, dict),
|
||||||
Vc_("Vc", dimTime, dict),
|
Vc_("Vc", dimTime, dict),
|
||||||
@ -67,9 +66,7 @@ Foam::relativeVelocityModels::general::~general()
|
|||||||
void Foam::relativeVelocityModels::general::correct()
|
void Foam::relativeVelocityModels::general::correct()
|
||||||
{
|
{
|
||||||
Udm_ =
|
Udm_ =
|
||||||
(rhoc_/rho())
|
(rhoc_/rho())*Vc_*acceleration()
|
||||||
*Vc_
|
|
||||||
*(g_ + MRF_.centrifugalAcceleration())
|
|
||||||
*(
|
*(
|
||||||
exp(-a_*max(alphad_ - residualAlpha_, scalar(0)))
|
exp(-a_*max(alphad_ - residualAlpha_, scalar(0)))
|
||||||
- exp(-a1_*max(alphad_ - residualAlpha_, scalar(0)))
|
- exp(-a1_*max(alphad_ - residualAlpha_, scalar(0)))
|
||||||
|
|||||||
@ -80,8 +80,7 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
#include "slipFvPatchFields.H"
|
#include "slipFvPatchFields.H"
|
||||||
#include "partialSlipFvPatchFields.H"
|
#include "partialSlipFvPatchFields.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -71,8 +72,7 @@ Foam::relativeVelocityModel::relativeVelocityModel
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixture_(mixture),
|
mixture_(mixture),
|
||||||
@ -81,8 +81,6 @@ Foam::relativeVelocityModel::relativeVelocityModel
|
|||||||
rhoc_(mixture.rhoc()),
|
rhoc_(mixture.rhoc()),
|
||||||
rhod_(mixture.rhod()),
|
rhod_(mixture.rhod()),
|
||||||
g_(g),
|
g_(g),
|
||||||
MRF_(MRF),
|
|
||||||
|
|
||||||
Udm_
|
Udm_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -106,8 +104,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word modelType(dict.lookup(typeName));
|
word modelType(dict.lookup(typeName));
|
||||||
@ -134,8 +131,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
|
|||||||
(
|
(
|
||||||
dict.optionalSubDict(modelType + "Coeffs"),
|
dict.optionalSubDict(modelType + "Coeffs"),
|
||||||
mixture,
|
mixture,
|
||||||
g,
|
g
|
||||||
MRF
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -155,6 +151,15 @@ Foam::tmp<Foam::volScalarField> Foam::relativeVelocityModel::rho() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volVectorField>
|
||||||
|
Foam::relativeVelocityModel::acceleration() const
|
||||||
|
{
|
||||||
|
const volVectorField Ud(mixture_.U() + Udm_);
|
||||||
|
|
||||||
|
return g_ - (Ud & fvc::grad(Ud));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||||
{
|
{
|
||||||
const volScalarField betac(alphac_*rhoc_);
|
const volScalarField betac(alphac_*rhoc_);
|
||||||
|
|||||||
@ -36,7 +36,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "incompressibleTwoPhaseInteractingMixture.H"
|
#include "incompressibleTwoPhaseInteractingMixture.H"
|
||||||
#include "uniformDimensionedFields.H"
|
#include "uniformDimensionedFields.H"
|
||||||
#include "MRFZoneList.H"
|
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -81,9 +80,6 @@ protected:
|
|||||||
//- Acceleration due to gravity
|
//- Acceleration due to gravity
|
||||||
const uniformDimensionedVectorField& g_;
|
const uniformDimensionedVectorField& g_;
|
||||||
|
|
||||||
//- MRF zones
|
|
||||||
const MRFZoneList& MRF_;
|
|
||||||
|
|
||||||
//- Dispersed diffusion velocity
|
//- Dispersed diffusion velocity
|
||||||
mutable volVectorField Udm_;
|
mutable volVectorField Udm_;
|
||||||
|
|
||||||
@ -101,10 +97,9 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
),
|
),
|
||||||
(dict, mixture, g, MRF)
|
(dict, mixture, g)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -115,8 +110,7 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
@ -128,8 +122,7 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -154,6 +147,10 @@ public:
|
|||||||
return Udm_;
|
return Udm_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the dispersed phase acceleration
|
||||||
|
// Including buoyancy and flow curvature
|
||||||
|
tmp<volVectorField> acceleration() const;
|
||||||
|
|
||||||
//- Return the stress tensor due to the phase transport
|
//- Return the stress tensor due to the phase transport
|
||||||
tmp<volSymmTensorField> tauDm() const;
|
tmp<volSymmTensorField> tauDm() const;
|
||||||
|
|
||||||
|
|||||||
@ -44,11 +44,10 @@ Foam::relativeVelocityModels::simple::simple
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
relativeVelocityModel(dict, mixture, g, MRF),
|
relativeVelocityModel(dict, mixture, g),
|
||||||
a_("a", dimless, dict),
|
a_("a", dimless, dict),
|
||||||
Vc_("Vc", dimTime, dict),
|
Vc_("Vc", dimTime, dict),
|
||||||
residualAlpha_("residualAlpha", dimless, dict)
|
residualAlpha_("residualAlpha", dimless, dict)
|
||||||
@ -66,8 +65,7 @@ Foam::relativeVelocityModels::simple::~simple()
|
|||||||
void Foam::relativeVelocityModels::simple::correct()
|
void Foam::relativeVelocityModels::simple::correct()
|
||||||
{
|
{
|
||||||
Udm_ =
|
Udm_ =
|
||||||
(rhoc_/rho())
|
(rhoc_/rho())*Vc_*acceleration()
|
||||||
*Vc_*(g_ + MRF_.centrifugalAcceleration())
|
|
||||||
*pow(scalar(10), -a_*max(alphad_, scalar(0)));
|
*pow(scalar(10), -a_*max(alphad_, scalar(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,8 +77,7 @@ public:
|
|||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const incompressibleTwoPhaseInteractingMixture& mixture,
|
const incompressibleTwoPhaseInteractingMixture& mixture,
|
||||||
const uniformDimensionedVectorField& g,
|
const uniformDimensionedVectorField& g
|
||||||
const MRFZoneList& MRF
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user