Okay, these are the contents of the
Allrun file:
Code:
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
restore0Dir
runApplication blockMesh
runApplication $(getApplication) -withFunctionObjects -writePhi -writep
runApplication postProcess -func streamFunction
#------------------------------------------------------------------------------
Instead of executing the
Allrun script, run the following commands one by one in your terminal (or however it is called on Windows) by omitting the
runApplication function. Then you can see where exactly errors occur and you can report them to us:
Code:
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions
Note that
restore0Dir copies the
0.orig folder and renames it to
0. You can do this also manually. Background: The field files inside the
0 folder, in this case
U and
p, contain the initial boundary conditions for the case. When results are written or certain preprocessing steps are taken however, the boundary conditions get replaced and overwritten in the field files by a list of values for each cell in the domain. In many cases they will be left untouched and the results are written to another time step folder. Since the
potentialFoam solver doesn't use time steps however, this is one of the cases where running the solver will overwrite the initial
U and
p files inside the
0 folder and you would loose the initial boundary conditions. To avoid that, the purpose of the
0.orig folder is therefore to serve as a template/copy for the initial conditions it contains. Solvers don't read it however because they look for the
0 folder without
.orig suffix. If a solver doesn't find the
0 folder, it will complain that it doesn't find the field files. Thus, copy the
0.orig folder and rename it to
0 in order to have a copy of the initial fields that can be read by solvers and safely overwritten.
Code:
potentialFoam -withFunctionObjects -writePhi -writep
Note: The function
getApplication in the
Allrun script reads the application dictionary entry of the
controlDict file, which in this case is
potentialFoam.
Code:
postProcess -func streamFunction
I tried this with OpenFOAM v1912 on macOS and it worked. Only thing I had to do was change the
-writePhi option of
potentialFoam to
-writephi, because
postProcess -func streamFunction requires the
phi field.
Good luck!