From b4f8bce87c929135a9afef1f488419077f35efe9 Mon Sep 17 00:00:00 2001 From: Vanja Skuric Date: Sat, 28 May 2016 12:33:12 +0200 Subject: [PATCH] Backported multiSolver and tutorials (vanilla OF 3.0.1) --- .../multiSolverDemo/createFields_icoFoam.H | 3 ++- .../multiSolverDemo/multiSolverDemo.C | 2 ++ .../multiSolver/multiSolverDemo/solverIcoFoam.H | 10 ++++++---- .../multiSolverDemo/solverScalarTransportFoam.H | 15 +++++---------- .../parTeeFitting2d/system/fvSchemes | 6 ------ .../parTeeFitting2d/system/multiFvSchemes | 11 ----------- .../teeFitting2d/system/fvSchemes | 6 ------ .../teeFitting2d/system/multiFvSchemes | 17 ----------------- 8 files changed, 15 insertions(+), 55 deletions(-) diff --git a/applications/solvers/multiSolver/multiSolverDemo/createFields_icoFoam.H b/applications/solvers/multiSolver/multiSolverDemo/createFields_icoFoam.H index 6a7d6b9a8..2e2c782db 100644 --- a/applications/solvers/multiSolver/multiSolverDemo/createFields_icoFoam.H +++ b/applications/solvers/multiSolver/multiSolverDemo/createFields_icoFoam.H @@ -52,4 +52,5 @@ label pRefCell = 0; scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); + setRefCell(p, piso.dict(), pRefCell, pRefValue); + mesh.schemesDict().setFluxRequired(p.name()); diff --git a/applications/solvers/multiSolver/multiSolverDemo/multiSolverDemo.C b/applications/solvers/multiSolver/multiSolverDemo/multiSolverDemo.C index 27091f810..084de4811 100644 --- a/applications/solvers/multiSolver/multiSolverDemo/multiSolverDemo.C +++ b/applications/solvers/multiSolver/multiSolverDemo/multiSolverDemo.C @@ -35,6 +35,8 @@ Author #include "fvCFD.H" #include "multiSolver.H" +#include "pisoControl.H" +#include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiSolver/multiSolverDemo/solverIcoFoam.H b/applications/solvers/multiSolver/multiSolverDemo/solverIcoFoam.H index 1fedb60d0..2a2407e3c 100644 --- a/applications/solvers/multiSolver/multiSolverDemo/solverIcoFoam.H +++ b/applications/solvers/multiSolver/multiSolverDemo/solverIcoFoam.H @@ -1,6 +1,9 @@ # include "createTime.H" # include "createMesh.H" + + pisoControl piso(mesh); + # include "createFields_icoFoam.H" # include "initContinuityErrs.H" @@ -12,7 +15,6 @@ { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" # include "CourantNo.H" fvVectorMatrix UEqn @@ -26,7 +28,7 @@ // --- PISO loop - for (int corr=0; corr("nNonOrthogonalCorrectors", 0); - - bool momentumPredictor = - simple.lookupOrDefault("momentumPredictor", true); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + while (simple.correctNonOrthogonal()) { solve ( diff --git a/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/fvSchemes b/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/fvSchemes index bb9073fa0..f5a68b410 100644 --- a/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/fvSchemes +++ b/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/fvSchemes @@ -50,10 +50,4 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/multiFvSchemes b/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/multiFvSchemes index 23c909a7d..137a5fc46 100644 --- a/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/multiFvSchemes +++ b/tutorials/multiSolver/multiSolverDemo/parTeeFitting2d/system/multiFvSchemes @@ -97,12 +97,6 @@ multiSolver { default corrected; } - - fluxRequired - { - default no; - p; - } } scalarTransportFoam @@ -139,11 +133,6 @@ multiSolver { default corrected; } - - fluxRequired - { - default no; - } } } diff --git a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/fvSchemes b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/fvSchemes index bb9073fa0..f5a68b410 100644 --- a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/fvSchemes +++ b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/fvSchemes @@ -50,10 +50,4 @@ snGradSchemes default corrected; } -fluxRequired -{ - default no; - p ; -} - // ************************************************************************* // diff --git a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/multiFvSchemes b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/multiFvSchemes index 23c909a7d..77740ea9f 100644 --- a/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/multiFvSchemes +++ b/tutorials/multiSolver/multiSolverDemo/teeFitting2d/system/multiFvSchemes @@ -53,12 +53,6 @@ multiSolver { default corrected; } - - fluxRequired - { - default no; - p; - } } icoFoam2 @@ -97,12 +91,6 @@ multiSolver { default corrected; } - - fluxRequired - { - default no; - p; - } } scalarTransportFoam @@ -139,11 +127,6 @@ multiSolver { default corrected; } - - fluxRequired - { - default no; - } } }