From cd7a8eb4ae6071016aefc65d55c721cd102d73ab Mon Sep 17 00:00:00 2001 From: Vanja Skuric Date: Fri, 6 May 2016 09:15:00 +0200 Subject: [PATCH] Backported potentialIbFoam to OF 3.0.1 format --- .../immersedBoundary/potentialIbFoam/Make/options | 3 +++ .../immersedBoundary/potentialIbFoam/potentialIbFoam.C | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/Make/options b/applications/solvers/immersedBoundary/potentialIbFoam/Make/options index b2ecef30a..448c4b608 100644 --- a/applications/solvers/immersedBoundary/potentialIbFoam/Make/options +++ b/applications/solvers/immersedBoundary/potentialIbFoam/Make/options @@ -1,6 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude EXE_LIBS = \ @@ -9,5 +11,6 @@ EXE_LIBS = \ -lsurfMesh \ -lsampling \ -ldynamicMesh \ + -ldynamicFvMesh \ -limmersedBoundary \ -llduSolvers diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C b/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C index fcbf81aa0..8fd0773c4 100644 --- a/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C +++ b/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C @@ -32,6 +32,7 @@ Description #include "fvCFD.H" #include "immersedBoundaryFvPatch.H" #include "immersedBoundaryAdjustPhi.H" +#include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,16 +44,18 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" + + simpleControl simple(mesh); + # include "createIbMasks.H" # include "createFields.H" -# include "readSIMPLEControls.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Calculating potential flow" << endl; // Do correctors over the complete set - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + while (simple.correctNonOrthogonal()) { phi = faceIbMask*(linearInterpolate(U) & mesh.Sf()); @@ -86,7 +89,7 @@ int main(int argc, char *argv[]) // Correct the flux phi -= pEqn.flux(); - if (nonOrth != nNonOrthCorr) + if (!simple.finalNonOrthogonalIter()) { p.relax(); }