mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Additional options for treatment of Y fields.
This commit is contained in:
@ -19,10 +19,11 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (Y[i].name() != inertSpecie || ignoreInertSpecie)
|
||||
if (Y[i].name() == inertSpecie) inertIndex = i;
|
||||
if (Y[i].name() != inertSpecie || propagateInertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rhoeps, Yi)
|
||||
@ -42,23 +43,27 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
fvOptions.correct(Yi);
|
||||
|
||||
#include "debugYEqn.H"
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
else
|
||||
{
|
||||
inertIndex = i;
|
||||
if (Y[i].name() != inertSpecie) Yt += Yi;
|
||||
}
|
||||
}
|
||||
|
||||
if (ignoreInertSpecie)
|
||||
if (inertIndex!=-1)
|
||||
{
|
||||
Y[inertIndex].max(inertLowerBound);
|
||||
Y[inertIndex].min(inertUpperBound);
|
||||
}
|
||||
|
||||
if (propagateInertSpecie)
|
||||
{
|
||||
if (inertIndex!=-1) Yt /= (1-Y[inertIndex] + VSMALL);
|
||||
forAll(Y,i)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
Yi = Yi/Yt;
|
||||
if (i!=inertIndex)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
Yi = Yi/(Yt+VSMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -17,10 +17,14 @@
|
||||
// read molecular weight
|
||||
volScalarField W(composition.W());
|
||||
|
||||
bool ignoreInertSpecie = true;
|
||||
bool propagateInertSpecie = true;
|
||||
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
|
||||
const scalar inertLowerBound(thermo.lookupOrDefault<scalar>("inertLowerBound",0.0));
|
||||
|
||||
const scalar inertUpperBound(thermo.lookupOrDefault<scalar>("inertUpperBound",1.0));
|
||||
|
||||
if (!composition.contains(inertSpecie))
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
Info << "\nartificial mass of species " << Y[i].name() << " per time step: "<< fvc::domainIntegrate(artMass) << endl;
|
||||
if(lVCell > -1)
|
||||
{
|
||||
Pout << "lowest value of " << lowestValue << " at cell " << lVCell << " with coordinates" << endl;
|
||||
Pout << Y[i].name() << ": time / lowest value " << runTime.timeName() << "\t" << lowestValue << "\n\tat cell " << lVCell << " with coordinates";
|
||||
Pout << "\t" << mesh.C()[lVCell].component(0) << "\t" << mesh.C()[lVCell].component(1) << "\t" << mesh.C()[lVCell].component(2) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user