From 7b2931272f624dbe2c5395ebea157f285bef1e98 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 5 Aug 2019 09:49:18 +0100 Subject: [PATCH] ENH: potentialFoam - phi output now controlled by the -writephi command line option --- .../basic/potentialFoam/potentialFoam.C | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index e9b2c9110a..10879eeaa5 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -83,6 +83,7 @@ Description \heading Options \plaintable -writep | write the Euler pressure + -writephi | Write the final volumetric flux -writePhi | Write the final velocity potential -initialiseUBCs | Update the velocity boundaries before solving for Phi \endplaintable @@ -114,6 +115,12 @@ int main(int argc, char *argv[]) "Initialise U boundary conditions" ); + argList::addBoolOption + ( + "writephi", + "Write the final volumetric flux field" + ); + argList::addBoolOption ( "writePhi", @@ -185,11 +192,16 @@ int main(int argc, char *argv[]) << (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value() << endl; - // Write U and phi + // Write U U.write(); - phi.write(); - // Optionally write Phi + // Optionally write the volumetric flux, phi + if (args.found("writephi")) + { + phi.write(); + } + + // Optionally write velocity potential, Phi if (args.found("writePhi")) { Phi.write();