Changed species' diffusivity to alphaEff

All multi-specie solvers function on the assumption that the
mass-diffusivities of the different species are the same. A consequence
of this is that the diffusivities of energy and mass must be the same,
otherwise mass diffusivity results in unphysical temperature
fluctuations. This change enforces this requirement across all
multi-species solvers.

For the same reason, the turbulent Schmidt number has been removed from
the multi-component phase model in reactingEulerFoam. In order to obey
physical constraints this Schmidt number had to be exactly the same as
the Prandtl number. This condition is now enforced by the solver, rather
than relying on the input being correct.
This commit is contained in:
Will Bainbridge
2019-09-30 10:41:02 +01:00
parent f1b975bbb1
commit 54f379f668
15 changed files with 20 additions and 37 deletions

View File

@ -23,7 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
reaction->R(Yi)
+ fvOptions(rho, Yi)

View File

@ -42,7 +42,7 @@ if (Y.size())
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence.muEff(), Yi)
- fvm::laplacian(turbulence.alphaEff(), Yi)
==
reaction.R(Yi)
+ fvOptions(rho, Yi)

View File

@ -24,7 +24,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
coalParcels.SYi(i, Yi)
+ combustion->R(Yi)

View File

@ -24,7 +24,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
parcels.SYi(i, Yi)
+ fvOptions(rho, Yi)

View File

@ -22,7 +22,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvScalarMatrix YEqn
(
mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
parcels.SYi(i, Yi)
+ combustion->R(Yi)

View File

@ -23,7 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
parcels.SYi(i, Yi)
+ combustion->R(Yi)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,12 +46,6 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel
)
:
BasePhaseModel(fluid, phaseName, index),
Sct_
(
"Sct",
dimless,
fluid.subDict(phaseName)
),
residualAlpha_
(
"residualAlpha",
@ -159,7 +153,7 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::YiEqn(volScalarField& Yi)
- fvm::laplacian
(
fvc::interpolate(alpha)
*fvc::interpolate(this->muEff()/Sct_),
*fvc::interpolate(this->alphaEff()),
Yi
)
==

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,6 @@ protected:
// Protected data
//- Turbulent Schmidt number
dimensionedScalar Sct_;
//- Residual phase fraction
dimensionedScalar residualAlpha_;

View File

@ -5,7 +5,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
LIB_LIBS = \
-lfiniteVolume \
@ -14,4 +15,5 @@ LIB_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lreactionThermophysicalModels \
-lturbulenceModels
-lturbulenceModels \
-lcompressibleTurbulenceModels

View File

@ -28,7 +28,7 @@ License
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulenceModel.H"
#include "turbulentFluidThermoModel.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermo.H"
@ -265,16 +265,16 @@ void Foam::semiPermeableBaffleMassFractionFvPatchScalarField::updateCoeffs()
const scalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
const turbulenceModel& turbModel =
db().lookupObject<turbulenceModel>
const compressible::turbulenceModel& turbModel =
db().lookupObject<compressible::turbulenceModel>
(
turbulenceModel::propertiesName
);
const scalarField muEffp(turbModel.muEff(patch().index()));
const scalarField AMuEffp(patch().magSf()*muEffp);
const scalarField alphaEffp(turbModel.alphaEff(patch().index()));
const scalarField AAlphaEffp(patch().magSf()*alphaEffp);
valueFraction() = phip/(phip - patch().deltaCoeffs()*AMuEffp);
refGrad() = - phiY()/AMuEffp;
valueFraction() = phip/(phip - patch().deltaCoeffs()*AAlphaEffp);
refGrad() = - phiY()/AAlphaEffp;
mixedFvPatchScalarField::updateCoeffs();
}

View File

@ -28,7 +28,6 @@ gas
d0 3e-3;
p0 1e5;
}
Sct 0.7;
residualAlpha 1e-6;
}

View File

@ -28,7 +28,6 @@ gas
d0 3e-3;
p0 1e5;
}
Sct 0.7;
residualAlpha 1e-6;
}

View File

@ -28,7 +28,6 @@ gas
d0 3e-3;
p0 1e5;
}
Sct 0.7;
residualAlpha 1e-6;
}
@ -41,7 +40,6 @@ liquid
{
d 1e-4;
}
Sct 0.7;
residualAlpha 1e-6;
}

View File

@ -30,7 +30,6 @@ steam
d0 3e-3;
p0 1e5;
}
Sct 0.7;
residualAlpha 1e-3;
}
@ -43,7 +42,6 @@ water
{
d 1e-4;
}
Sct 0.7;
residualAlpha 1e-3;
}

View File

@ -80,8 +80,6 @@ particles
);
}
Sct 1.0;
residualAlpha 1e-15;
}
@ -95,8 +93,6 @@ vapor
d 1;
}
Sct 1.0;
residualAlpha 1e-5;
}