aurora-multiphysics / hippo

hippo is an integration of OpenFOAM and MOOSE to enable thermohydraulic simulations
GNU General Public License v3.0
3 stars 0 forks source link

Avoid having to have separate input files for parallel runs #18

Open hsaunders1904 opened 3 weeks ago

hsaunders1904 commented 3 weeks ago

Description

Usually, to execute a MOOSE app in parallel, you just execute prefix the executable with mpirun and you're away. However, to run OpenFOAM cases in parallel, you need to pass the -parallel flag to the solver you're running. This is an issue for Hippo, because it means you can't run the same input file in serial and parallel.

To run a Hippo app in parallel, you need to add the -parallel flag to the foam_args argument in the [Mesh] block of your input file, then run it with mpirun:

[Mesh]
  type = FoamMesh
  foam_args = '-case buoyantCavity -parallel'
  foam_patch = 'topAndBottom frontAndBack'
  dim = 2
[]

If you do not run it with mpirun OpenFOAM will error.

If you do not add the -parallel flag and run Hippo with mpirun, OpenFOAM will complain that you're not running in parallel.

Ideally, being a MOOSE app, we want to be able to run the same Hippo input file in serial and in parallel just by running the app through mpirun.

Outputs

makeclean commented 3 weeks ago

Presumably within your MOOSE app you can query the size of the MPI world and if its greater than 1 then you could append automatically