Added solver for pseudo-steady conditions.

This commit is contained in:
Thomas Lichtenegger
2018-11-13 15:23:48 +01:00
parent e8fd37e965
commit 4b8b50b427
10 changed files with 49 additions and 25 deletions

View File

@ -1,3 +0,0 @@
cfdemSolverRhoSimple.C
EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoSimple

View File

@ -0,0 +1,3 @@
cfdemSolverRhoSteadyPimple.C
EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoSteadyPimple

View File

@ -31,11 +31,12 @@ Description
#include "psiThermo.H" #include "psiThermo.H"
#include "turbulentFluidThermoModel.H" #include "turbulentFluidThermoModel.H"
#include "bound.H" #include "bound.H"
#include "simpleControl.H" #include "pimpleControl.H"
#include "fvOptions.H" #include "fvOptions.H"
#include "localEulerDdtScheme.H" #include "localEulerDdtScheme.H"
#include "fvcSmooth.H" #include "fvcSmooth.H"
#include "cfdemCloudEnergy.H" #include "cfdemCloudEnergy.H"
#include "implicitCouple.H" #include "implicitCouple.H"
#include "clockModel.H" #include "clockModel.H"
@ -68,13 +69,21 @@ int main(int argc, char *argv[])
#include "checkModelType.H" #include "checkModelType.H"
turbulence->validate(); turbulence->validate();
// #include "compressibleCourantNo.H"
// #include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (simple.loop()) while (runTime.run())
{ {
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
particleCloud.clockM().start(1,"Global"); particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
@ -103,23 +112,38 @@ int main(int argc, char *argv[])
particleCloud.clockM().stop("Coupling"); particleCloud.clockM().stop("Coupling");
particleCloud.clockM().start(26,"Flow"); particleCloud.clockM().start(26,"Flow");
volScalarField rhoeps("rhoeps",rho*voidfraction); volScalarField rhoeps("rhoeps",rho*voidfraction);
// Pressure-velocity SIMPLE corrector while (pimple.loop())
{
// if needed, perform drag update here
if (pimple.nCorrPIMPLE() <= 1)
{
#include "rhoEqn.H"
}
// --- Pressure-velocity PIMPLE corrector loop
#include "UEqn.H" #include "UEqn.H"
// besides this pEqn, OF offers a "simple consistent"-option
#include "pEqn.H"
rhoeps=rho*voidfraction;
#include "EEqn.H" #include "EEqn.H"
turbulence->correct(); // --- Pressure corrector loop
while (pimple.correct())
{
// besides this pEqn, OF offers a "pimple consistent"-option
#include "pEqn.H"
rhoeps=rho*voidfraction;
}
particleCloud.clockM().start(32,"postFlow"); if (pimple.turbCorr())
if(hasEvolved) particleCloud.postFlow(); {
turbulence->correct();
}
}
particleCloud.clockM().stop("Flow");
particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow"); particleCloud.clockM().stop("postFlow");
runTime.write(); runTime.write();
@ -129,7 +153,7 @@ int main(int argc, char *argv[])
<< " ClockTime = " << runTime.elapsedClockTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl; << nl << endl;
particleCloud.clockM().stop("Flow");
particleCloud.clockM().stop("Global"); particleCloud.clockM().stop("Global");
} }

View File

@ -158,7 +158,7 @@ Info<< "Reading thermophysical properties\n" << endl;
dimensionedScalar::lookupOrDefault dimensionedScalar::lookupOrDefault
( (
"rhoMax", "rhoMax",
simple.dict(), pimple.dict(),
dimDensity, dimDensity,
GREAT GREAT
) )
@ -169,7 +169,7 @@ Info<< "Reading thermophysical properties\n" << endl;
dimensionedScalar::lookupOrDefault dimensionedScalar::lookupOrDefault
( (
"rhoMin", "rhoMin",
simple.dict(), pimple.dict(),
dimDensity, dimDensity,
0 0
) )
@ -189,7 +189,7 @@ Info<< "Reading thermophysical properties\n" << endl;
label pRefCell = 0; label pRefCell = 0;
scalar pRefValue = 0.0; scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue); setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());

View File

@ -14,7 +14,7 @@ volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phiUs("phiUs", fvc::interpolate(rhoeps*rAU*Ksl*Us)& mesh.Sf()); surfaceScalarField phiUs("phiUs", fvc::interpolate(rhoeps*rAU*Ksl*Us)& mesh.Sf());
if (simple.transonic()) if (pimple.transonic())
{ {
// transonic version not implemented yet // transonic version not implemented yet
} }
@ -34,7 +34,7 @@ else
// Update the pressure BCs to ensure flux consistency // Update the pressure BCs to ensure flux consistency
constrainPressure(p, rhoeps, U, phi, rhorAUf); constrainPressure(p, rhoeps, U, phi, rhorAUf);
while (simple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())
{ {
// Pressure corrector // Pressure corrector
fvScalarMatrix pEqn fvScalarMatrix pEqn
@ -49,7 +49,7 @@ else
pEqn.solve(); pEqn.solve();
if (simple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

@ -7,6 +7,6 @@ cfdemSolverRhoPimple/dir
cfdemSolverPisoMS/dir cfdemSolverPisoMS/dir
cfdemSolverPiso/dir cfdemSolverPiso/dir
cfdemSolverRhoPimple/dir cfdemSolverRhoPimple/dir
cfdemSolverRhoSimple/dir cfdemSolverRhoSteadyPimple/dir
cfdemSolverIB/dir cfdemSolverIB/dir
cfdemSolverPisoScalar/dir cfdemSolverPisoScalar/dir