diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H index b9fa52c0ff..50691c0154 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H @@ -2,17 +2,28 @@ volScalarField rAUrel(1.0/UrelEqn().A()); volVectorField HbyA("HbyA", Urel); HbyA = rAUrel*UrelEqn().H(); - UrelEqn.clear(); surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); adjustPhi(phiHbyA, Urel, p); + tmp rAtUrel(rAUrel); + + if (simple.consistent()) + { + rAtUrel = 1.0/(1.0/rAUrel - UrelEqn().H1()); + phiHbyA += + fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf(); + HbyA -= (rAUrel - rAtUrel())*fvc::grad(p); + } + + UrelEqn.clear(); + // Non-orthogonal pressure corrector loop while (simple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( - fvm::laplacian(rAUrel, p) == fvc::div(phiHbyA) + fvm::laplacian(rAtUrel(), p) == fvc::div(phiHbyA) ); pEqn.setReference(pRefCell, pRefValue); @@ -31,7 +42,7 @@ p.relax(); // Momentum corrector - Urel = HbyA - rAUrel*fvc::grad(p); + Urel = HbyA - rAtUrel()*fvc::grad(p); Urel.correctBoundaryConditions(); fvOptions.correct(Urel); } diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H index 4d669c8db2..fddb3b05d4 100644 --- a/applications/solvers/incompressible/simpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/pEqn.H @@ -2,20 +2,29 @@ volScalarField rAU(1.0/UEqn().A()); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); - UEqn.clear(); surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); - fvOptions.makeRelative(phiHbyA); - adjustPhi(phiHbyA, U, p); + tmp rAtU(rAU); + + if (simple.consistent()) + { + rAtU = 1.0/(1.0/rAU - UEqn().H1()); + phiHbyA += + fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf(); + HbyA -= (rAU - rAtU())*fvc::grad(p); + } + + UEqn.clear(); + // Non-orthogonal pressure corrector loop while (simple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( - fvm::laplacian(rAU, p) == fvc::div(phiHbyA) + fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA) ); pEqn.setReference(pRefCell, pRefValue); @@ -34,7 +43,7 @@ p.relax(); // Momentum corrector - U = HbyA - rAU*fvc::grad(p); + U = HbyA - rAtU()*fvc::grad(p); U.correctBoundaryConditions(); fvOptions.correct(U); } diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 8448153a69..8e3dd89075 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,16 +37,21 @@ namespace Foam void Foam::solutionControl::read(const bool absTolOnly) { - const dictionary& solnDict = this->dict(); + const dictionary& solutionDict = this->dict(); // Read solution controls nNonOrthCorr_ = - solnDict.lookupOrDefault