This repository contains the STL files and OpenFOAM control files that were used for the reverse sprinkler simulations in https://zmatt.net/reverse-sprinkler-part-3/
Basic usage:
- Ensure OpenFOAM is installed and in the path, e.g.
source /usr/lib/openfoam/openfoam/etc/bashrc
. I used ESI OpenFOAM v2406. - Run
make
at top level to generate meshes for all designs, or runmake
within a specific geometry directory (e.g.designA/geometry
) to generate a mesh for that design. - Run
make
within a case directory (e.g.designA/steady-100
) to run a simulation. - Open the
case.foam
file in Paraview for analysis.
By design, most files within the case directories are symlinks, for example
constant/turbulenceProperties
is a symlink to one of the
shared/constant/turbulenceProperties.*
files, this symlink can be modified to
change the turbulence model. In the committed cases, the steady-100
cases use
a laminar model (no turbulence). The transient-initial-500
case uses k-omega
SST to generate sane initial conditions for transient simulation, and
transient-500
then uses k-omega SST DDES (delayed detached eddy simulation)
for the actual transient simulation.
The flows are set up to be pressure-driven, with the outlet pressure derived
from the target Reynolds number supplied in the params
file in each case
directory. A correction factor in that file that can be altered to converge on
the required flow rate.
The five designs were drawn in Onshape:
- Design A: https://cad.onshape.com/documents/972924324f4b7380846c87b2/w/6c4e2cad260d9f3a81e4cdc8/e/9496ec194a56dd089c194d95
- Design B: https://cad.onshape.com/documents/1c32e01ef3334e96db67690f/w/2f56350e479405532855a46c/e/25c703ed53f84895258d062d
- Design C: https://cad.onshape.com/documents/76bea673445c12913a4942aa/w/6f5ab22ad81d5b2a8070925a/e/2b83b078a7259e26230dcdae
- Design D: https://cad.onshape.com/documents/41ca4284c9e610edeb9c9b57/w/8b90f2b45bcf01023b8d1a21/e/54e3ed552f9c54115abde596
- Design E: https://cad.onshape.com/documents/a61ee421ada3f753aac550c2/w/af063cb77ddebd99e7d94d72/e/db29fed9c6e26245a56661d8
If modifying the designs, export to STL, ensuring that STL Format is set to Text
and "Export unique parts as individual files" is checked. Then extract the
resulting zip file and run the two parts through util/mergeSTL.py
to generate
designX/constant/triSurface/geometry.stl
.