From 1dcf50d4b4cae6fb9f242841b8f986bc20c735d3 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 21 Feb 2015 21:39:01 +0000 Subject: [PATCH] icoFoam/nonNewtonianIcoFoam: Update to use pisoControl --- .../solvers/incompressible/icoFoam/icoFoam.C | 28 +++++++++++++------ .../nonNewtonianIcoFoam/nonNewtonianIcoFoam.C | 28 +++++++++++++------ .../incompressible/pisoFoam/pisoFoam.C | 2 -- .../general/include/readPISOControls.H | 17 ----------- 4 files changed, 38 insertions(+), 37 deletions(-) delete mode 100644 src/finiteVolume/cfdTools/general/include/readPISOControls.H diff --git a/applications/solvers/incompressible/icoFoam/icoFoam.C b/applications/solvers/incompressible/icoFoam/icoFoam.C index 78fa851e67..80e13faa8d 100644 --- a/applications/solvers/incompressible/icoFoam/icoFoam.C +++ b/applications/solvers/incompressible/icoFoam/icoFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,15 +30,18 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "pisoControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" - #include "createTime.H" #include "createMesh.H" + + pisoControl piso(mesh); + #include "createFields.H" #include "initContinuityErrs.H" @@ -50,9 +53,10 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - #include "readPISOControls.H" #include "CourantNo.H" + // Momentum predictor + fvVectorMatrix UEqn ( fvm::ddt(U) @@ -60,11 +64,13 @@ int main(int argc, char *argv[]) - fvm::laplacian(nu, U) ); - solve(UEqn == -fvc::grad(p)); + if (piso.momentumPredictor()) + { + solve(UEqn == -fvc::grad(p)); + } // --- PISO loop - - for (int corr=0; corr("nOuterCorrectors", 1); - - const int nCorr = - pisoDict.lookupOrDefault("nCorrectors", 1); - - const int nNonOrthCorr = - pisoDict.lookupOrDefault("nNonOrthogonalCorrectors", 0); - - const bool momentumPredictor = - pisoDict.lookupOrDefault("momentumPredictor", true); - - const bool transonic = - pisoDict.lookupOrDefault("transonic", false); -