This makes a mesh of a vertical-axis wind turbine.
This has been tested with gmsh 3.0.6
.
You will also need OpenFOAM.
It will be helpful to have ParaView.
- Generate the mesh.
gmsh ./1.txt -3 -smooth 2 -clmax .25 -o ./Turbine.msh
- Converts mesh file to OpenFOAM.
gmshToFoam ./Turbine.msh
createPatch -overwrite
renumberMesh -overwrite
NOTE: Kunal had an issue so he added $End at the end of the Turbine.msh and it ran ok.
- Sometimes the
0/
files have been overwritten, so copy the original files from0.orig/
.
rm -rf 0
cp -rf 0.orig 0
- Decomposes the mesh into pieces, so you can run in parallel.
decomposePar
- Remove the mesh file; you dont need it anymore.
rm -rf ./Turbine.msh
-
scp files to the supercomputer (i.e. Comet).
-
Remove all intermediate files:
rm -rf processor*
rm -rf *.pos
rm -rf *.msh
rm -rf constant/polyMesh
- Run OpenFOAM on the supercomputer!
If you want to run it locally, you can edit decomposeParDict
to 4 (or however many cores you have), go through the process, and run
mpirun -np 4 pimpleFoam -parallel | tee pimplefoam.log