Backported simpleFoamResidual and interFoamPressure (vanilla OF 3.0.1)

This commit is contained in:
Vanja Skuric 2016-05-29 00:10:25 +02:00
parent b7c23999fc
commit 0385dd389b
3 changed files with 12 additions and 11 deletions

View file

@ -31,7 +31,8 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View file

@ -35,6 +35,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,6 +51,8 @@ int main(int argc, char *argv[])
# include "createMesh.H"
simpleControl simple(mesh);
forAll(timeDirs, timeI)
{
runTime.setTime(timeDirs[timeI], timeI);

View file

@ -35,6 +35,7 @@ Description
#include "fvCFD.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
#include "pisoControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,19 +56,14 @@ int main(int argc, char *argv[])
runTime.setTime(Times[startTime], startTime);
# include "createMesh.H"
# include "readGravitationalAcceleration.H"
const dictionary& piso = mesh.solutionDict().subDict("PISO");
pisoControl piso(mesh);
# include "readGravitationalAcceleration.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
int nNonOrthCorr = 0;
if (piso.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(piso.lookup("nNonOrthogonalCorrectors"));
}
for (label i = startTime; i < endTime; i++)
{
runTime.setTime(Times[i], i);
@ -195,7 +191,8 @@ int main(int argc, char *argv[])
pd
);
setRefCell(p, piso, pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf = fvc::interpolate(rUA);
@ -204,7 +201,7 @@ int main(int argc, char *argv[])
phi = fvc::interpolate(U) & mesh.Sf();
for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
while (piso.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(