CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   PotentialFoam use with a snappyhexmesh (https://www.cfd-online.com/Forums/openfoam-solving/239441-potentialfoam-use-snappyhexmesh.html)

stachstach November 5, 2021 11:29

PotentialFoam use with a snappyhexmesh
 
hello,


I am trying to run potentialFoam on a mesh I generated using snappyHexMesh.
My problem is that when i run this:

Code:

#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

canCompile || exit 0    # Dynamic code
mkdir -p constant/triSurface
#copy DTC hull surface from resources folder
cp -f /mnt/c/Users/blu/Desktop/MESH_2.stl constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
for i in 1 2
do
    runApplication -s $i \
        topoSet -dict system/topoSetDict.${i}

    runApplication -s $i \
        refineMesh -dict system/refineMeshDict -overwrite
done
runApplication decomposePar
runApplication foamJob -p -s snappyHexMesh
#runApplication snappyHexMesh -overwrite -parallel
runApplication reconstructParMesh -mergeTol 1e-06 -latestTime
restore0Dir

and preview the mesh in paraview everything is ok, but on running this:
Code:

runApplication potentialFoam
immediately after, potentialFoam seems to create the mesh anew, and it does not have my feature extracted from the .stl file. It appears potentialfoam is only running blockMesh and refinements, but does not run snappyHexMesh.


Is there a way to make potentialFoam use the mesh generated in previous steps?


thanks!


All times are GMT -4. The time now is 07:57.