reactingEulerFoam: Multiphase partial elimination and re-organisation

Partial elimination has been implemented for the multiphase Euler-Euler
solver. This does a linear solution of the drag system when calculating
flux and velocity corrections after the solution of the pressure
equation. This can improve the behaviour of the solution in the event
that the drag coupling is high. It is controlled by means of a
"partialElimination" switch within the PIMPLE control dictionary in
fvSolution.

A re-organisation has also been done in order to remove the exposure of
the sub-modelling from the top-level solver. Rather than looping the
drag, virtual mass, lift, etc..., models directly, the solver now calls
a set of phase-system methods which group the different force terms.
These new methods are documented in MomentumTransferPhaseSystem.H. Many
other accessors have been removed as a consequence of this grouping.

A bug was also fixed whereby the face-based algorithm was not
transferring the momentum associated with a given interfacial mass
transfer.
This commit is contained in:
Will Bainbridge
2018-02-19 17:54:41 +00:00
parent 26418ee9d3
commit ba84383e26
50 changed files with 2109 additions and 1672 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "NicenoKEqn.H"
#include "fvOptions.H"
#include "twoPhaseSystem.H"
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -181,11 +182,13 @@ tmp<volScalarField> NicenoKEqn<BasicTurbulenceModel>::bubbleG() const
refCast<const twoPhaseSystem>(liquid.fluid());
const transportModel& gas = fluid.otherPhase(liquid);
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
tmp<volScalarField> bubbleG
(
Cp_*sqr(magUr)*fluid.drag(gas).K()/liquid.rho()
Cp_*sqr(magUr)*drag.K()/liquid.rho()
);
return bubbleG;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "LaheyKEpsilon.H"
#include "fvOptions.H"
#include "twoPhaseSystem.H"
#include "dragModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -191,6 +192,8 @@ tmp<volScalarField> LaheyKEpsilon<BasicTurbulenceModel>::bubbleG() const
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(liquid.fluid());
const transportModel& gas = fluid.otherPhase(liquid);
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
tmp<volScalarField> bubbleG
@ -198,7 +201,7 @@ tmp<volScalarField> LaheyKEpsilon<BasicTurbulenceModel>::bubbleG() const
Cp_
*(
pow3(magUr)
+ pow(fluid.drag(gas).CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
+ pow(drag.CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
*pow(magUr, 5.0/3.0)
)
*gas

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "continuousGasKEpsilon.H"
#include "fvOptions.H"
#include "twoPhaseSystem.H"
#include "dragModel.H"
#include "virtualMassModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -122,8 +123,11 @@ void continuousGasKEpsilon<BasicTurbulenceModel>::correctNut()
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
const transportModel& liquid = fluid.otherPhase(gas);
const virtualMassModel& virtualMass =
fluid.lookupSubModel<virtualMassModel>(gas, liquid);
volScalarField thetal(liquidTurbulence.k()/liquidTurbulence.epsilon());
volScalarField rhodv(gas.rho() + fluid.virtualMass(gas).Cvm()*liquid.rho());
volScalarField rhodv(gas.rho() + virtualMass.Cvm()*liquid.rho());
volScalarField thetag((rhodv/(18*liquid.rho()*liquid.nu()))*sqr(gas.d()));
volScalarField expThetar
(
@ -206,12 +210,15 @@ continuousGasKEpsilon<BasicTurbulenceModel>::rhoEff() const
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
const transportModel& liquid = fluid.otherPhase(gas);
const virtualMassModel& virtualMass =
fluid.lookupSubModel<virtualMassModel>(gas, liquid);
return tmp<volScalarField>
(
new volScalarField
(
IOobject::groupName("rhoEff", this->alphaRhoPhi_.group()),
gas.rho() + (fluid.virtualMass(gas).Cvm() + 3.0/20.0)*liquid.rho()
gas.rho() + (virtualMass.Cvm() + 3.0/20.0)*liquid.rho()
)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,7 @@ License
#include "fvOptions.H"
#include "bound.H"
#include "twoPhaseSystem.H"
#include "dragModel.H"
#include "virtualMassModel.H"
#include "fixedValueFvPatchFields.H"
#include "inletOutletFvPatchFields.H"
@ -389,7 +390,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::Ct2() const
volScalarField beta
(
(6*this->Cmu_/(4*sqrt(3.0/2.0)))
*fluid.drag(gas).K()/liquid.rho()
*fluid.Kd()/liquid.rho()
*(liquidTurbulence.k_/liquidTurbulence.epsilon_)
);
volScalarField Ct0((3 + beta)/(1 + beta + 2*gas.rho()/liquid.rho()));
@ -413,9 +414,9 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rhogEff() const
{
const transportModel& gas = this->transport();
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
return
gas.rho()
+ fluid.virtualMass(gas).Cvm()*fluid.otherPhase(gas).rho();
const virtualMassModel& virtualMass =
fluid.lookupSubModel<virtualMassModel>(gas, fluid.otherPhase(gas));
return gas.rho() + virtualMass.Cvm()*fluid.otherPhase(gas).rho();
}
@ -491,6 +492,8 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
const transportModel& liquid = fluid.otherPhase(gas);
const dragModel& drag = fluid.lookupSubModel<dragModel>(gas, liquid);
volScalarField magUr(mag(liquidTurbulence.U() - this->U()));
// Lahey model
@ -500,7 +503,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
*liquid*liquid.rho()
*(
pow3(magUr)
+ pow(fluid.drag(gas).CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
+ pow(drag.CdRe()*liquid.nu()/gas.d(), 4.0/3.0)
*pow(magUr, 5.0/3.0)
)
*gas
@ -510,7 +513,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
// Simple model
// tmp<volScalarField> bubbleG
// (
// Cp_*liquid*fluid.drag(gas).K()*sqr(magUr)
// Cp_*liquid*drag.K()*sqr(magUr)
// );
return bubbleG;