Made pressure source term implicit, added debugging option of YEqn.

This commit is contained in:
tlichtenegger
2017-08-28 07:46:38 +02:00
parent 7320c1f5cf
commit fd1bffd0e8
4 changed files with 37 additions and 2 deletions

View File

@ -42,6 +42,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
fvOptions.correct(Yi);
#include "debugYEqn.H"
Yi.max(0.0);
Yt += Yi;
}
@ -65,4 +67,4 @@ tmp<fv::convectionScheme<scalar> > mvConvection
Y[inertIndex].max(0.0);
}
}
particleCloud.clockM().stop("Y");
particleCloud.clockM().stop("Y");

View File

@ -148,6 +148,10 @@ int main(int argc, char *argv[])
}
}
particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
runTime.write();

View File

@ -0,0 +1,27 @@
{
volScalarField artMass = rhoeps;
scalar lowestValue(0.0);
label lVCell(-1);
forAll(Yi,cellI)
{
if(Yi[cellI] < 0.0)
{
artMass[cellI] *= Yi[cellI];
if(artMass[cellI] < lowestValue)
{
lowestValue=artMass[cellI];
lVCell = cellI;
}
}
else
{
artMass[cellI] *=0.0;
}
}
Info << "\nartificial mass of " << Y[i].name() << " per time step: "<< fvc::domainIntegrate(artMass) << endl;
if(lVCell > -1)
{
Info << "lowest value of " << lowestValue << " at cell " << lVCell << "with coordinates" << endl;
Info << "\t" << mesh.C()[lVCell].component(0) << "\t" << mesh.C()[lVCell].component(1) << "\t" << mesh.C()[lVCell].component(2) << endl;
}
}

View File

@ -45,6 +45,7 @@ else
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rhoeps, U, phi, rhorAUf);
volScalarField SmbyP(particleCloud.chemistryM(0).Sm() / p);
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
@ -55,7 +56,8 @@ else
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p)
==
particleCloud.chemistryM(0).Sm()
// particleCloud.chemistryM(0).Sm()
fvm::Sp(SmbyP, p)
+ fvOptions(psi, p, rho.name())
);