| # Export an OpenFOAM case's latest time to VTK and copy to a Windows-visible dir. | |
| source /usr/lib/openfoam/openfoam2512/etc/bashrc | |
| CASE="${1:-/root/of_sphere_re1000}" | |
| OUT="${2:-/mnt/c/dev/ezflow_eval/of_sphere_re1000_vtk}" | |
| cd "$CASE" | |
| # write a .foam stub too (for ParaView's native OpenFOAM reader) | |
| touch case.foam | |
| foamToVTK -latestTime > log.foamToVTK 2>&1 | |
| rm -rf "$OUT"; mkdir -p "$OUT" | |
| cp -r VTK/* "$OUT"/ 2>/dev/null | |
| echo "=== exported files ===" | |
| find "$OUT" -maxdepth 2 -type f | head -30 | |