From d046df2fae9b4e188d120c58b72271f75ffbfb0a Mon Sep 17 00:00:00 2001 From: ignis Date: Sat, 3 Feb 2018 11:29:40 +0900 Subject: [PATCH] phi calculation due to turbulence.phi() returning volume flux --- .../combustion/postSootFoam/Make/options | 1 + .../MossBrookesSoot/MossBrookesSoot.C | 27 +++++++++++++------ .../MossBrookesSoot/MossBrookesSoot.H | 6 ++--- .../khanGreeveSoot/khanGreeveSoot.C | 15 ++++++++--- 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/applications/solvers/combustion/postSootFoam/Make/options b/applications/solvers/combustion/postSootFoam/Make/options index dbaad516f..194d0d40c 100644 --- a/applications/solvers/combustion/postSootFoam/Make/options +++ b/applications/solvers/combustion/postSootFoam/Make/options @@ -30,6 +30,7 @@ EXE_LIBS = \ -lchemistryModel \ -lcombustionModels \ -lradiationModels \ + -lradiationSootModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.C b/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.C index 256a5bc64..5d9acab9c 100644 --- a/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.C +++ b/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.C @@ -351,16 +351,27 @@ void Foam::radiation::MossBrookesSoot::correct() calcSource(); - const volScalarField rho_ = thermo_.rho(); + const volScalarField &rho_ = thermo_.rho(); - const volScalarField &nut_ = turbulence().nut(); + const volVectorField &U_ = turbulence().U(); - const surfaceScalarField phi_ (turbulence().phi()); + volScalarField Dsoot (turbulence().mut()/PrtSoot); + + const surfaceScalarField phi_ + ( + IOobject + ( + "phiSoot", + mesh().time().timeName(), + mesh() + ), + linearInterpolate(rho_*U_) & mesh().Sf() + ); fvScalarMatrix SootEqn ( fvm::div(phi_, soot_) - - fvm::laplacian((rho_*nut_/PrtSoot), soot_) + - fvm::laplacian(Dsoot, soot_) == Snet_ ); @@ -372,7 +383,7 @@ void Foam::radiation::MossBrookesSoot::correct() fvScalarMatrix NucConcEqn ( fvm::div(phi_, NucConc_) - - fvm::laplacian((rho_*nut_/PrtSoot), NucConc_) + - fvm::laplacian(Dsoot, NucConc_) == NSnet_ ); @@ -393,9 +404,9 @@ void Foam::radiation::MossBrookesSoot::correct() void Foam::radiation::MossBrookesSoot::calcSource() { - const volScalarField rho_ = thermo_.rho(); - const volScalarField T_ = thermo_.T(); - const volScalarField p_ = thermo_.p(); + const volScalarField &rho_ = thermo_.rho(); + const volScalarField &T_ = thermo_.T(); + const volScalarField &p_ = thermo_.p(); const scalar precI = mixture_.species()[coeffsDict_.lookup("Precursor")]; const scalar growI = mixture_.species()[coeffsDict_.lookup("SurfaceGrowSpecie")]; diff --git a/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.H b/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.H index 35dfb3900..286e16a55 100644 --- a/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.H +++ b/src/thermophysicalModels/radiationSootModel/MossBrookesSoot/MossBrookesSoot.H @@ -153,15 +153,15 @@ class MossBrookesSoot //- Soot particle mean diameter volScalarField sootMeanDiameter_; + //- soot number density normalization factor + const dimensionedScalar Nnorm; + //- Soot turbulent Prandtl number scalar PrtSoot; //- Density of soot particle scalar rhoSoot; - //- soot number density normalization factor - const dimensionedScalar Nnorm; - //- Model constant for soot inception rate scalar Calpha; diff --git a/src/thermophysicalModels/radiationSootModel/khanGreeveSoot/khanGreeveSoot.C b/src/thermophysicalModels/radiationSootModel/khanGreeveSoot/khanGreeveSoot.C index e6f5e1185..809717845 100644 --- a/src/thermophysicalModels/radiationSootModel/khanGreeveSoot/khanGreeveSoot.C +++ b/src/thermophysicalModels/radiationSootModel/khanGreeveSoot/khanGreeveSoot.C @@ -271,15 +271,24 @@ void Foam::radiation::khanGreeveSoot::correct() const volScalarField &rho_ = thermo_.rho(); - const volScalarField &nut_ = turbulence().nut(); + const volVectorField &U_ = turbulence().U(); - const surfaceScalarField phi_ (turbulence().phi()); + const surfaceScalarField phi_ + ( + IOobject + ( + "phiSoot", + mesh().time().timeName(), + mesh() + ), + linearInterpolate(rho_*U_) & mesh().Sf() + ); fvScalarMatrix SootEqn ( fvm::ddt(rho_, soot_) + fvm::div(phi_, soot_) - - fvm::laplacian((rho_*nut_/PrtSoot), soot_) + - fvm::laplacian((turbulence().mut()/PrtSoot), soot_) == Snet_ );