mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Made pressure source term implicit, added debugging option of YEqn.
This commit is contained in:
@ -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");
|
||||
|
||||
@ -148,6 +148,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
particleCloud.clockM().start(31,"postFlow");
|
||||
particleCloud.postFlow();
|
||||
particleCloud.clockM().stop("postFlow");
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
||||
|
||||
27
applications/solvers/cfdemSolverRhoPimpleChem/debugYEqn.H
Normal file
27
applications/solvers/cfdemSolverRhoPimpleChem/debugYEqn.H
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -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())
|
||||
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user