After parting ways with RHR performance, I got really, really interested in CFD. Working with RHR, and our aero consultant meant that I had to learn 3D CAD (I’m an old school AutoCAD 2D cad person), so Fusion 360 was the tool I chose, and after messing with basic CFD programs, settled on openFoam, since it’s what our consultant used, it’s free, hardcore, and super flexible. The downside is that I am weak on Linux, and dual booting computers is boring.
So openFoam: it’s awesome, it just takes a lot of trial and error. And when you get to big and complex models, you need serious hardware or openFoam simply crashes when it runs out of memory. I tried working on a 4 core 16GB laptop, but it could only just barely handle simple models. My new prized workstation is a used (ebay) dual 10 core Xeon, so 20 cores with 128GB of RAM. I got a nice SSD and an old graphics card, installed Ubuntu, and got to work. I’d love to try CentOS and a Rocks/Beowulf cluster, but I’m not a professional, so I don’t need to spend more money on hardware to further accelerate things at this point. I think for fun I’ll build a cluster in Virtual Box so I can see how it works, but not needed for my work).
For reference, my good Dell laptop could run the built-in openFoam motorbike tutorial natively on Ubuntu in 6:40
VirtualBox under Win 10 with 4 cores and 10GB RAM, 10:18,
Windows 10 native Ubuntu virtualization (Bash on Windows) 8:00.
My new workstation chews through the tutorial at 2:46, with a 5,2,2 split of the meshing domain- I haven’t spent a lot of time messing with optimization of the decomposition of the domain, so it’s possible I can lower the times a bit. However, using the Scotch domain decomposition algorithm it ran a 3:21, so I think my 5,2,2 was a pretty good guess.
After figuring out the basics of openFoam and Paraview, my primary issue I had deal with is learning how to turn surface 3D models into watertight solids. Hum3D, where I bought the model for the S197, delivers an awesome and highly detailed exterior and interior surface model, but it needs to be converted to a solid, and then to an STL for openFoam. If there is no thickness to the surface/solid, Paraview will show this odd splotchy pattern, which means it’s trying to display the pressure or velocity, or other values, on the backside of the surface. Took a while to figure that out, Also importing those STL’s into Meshlab to remove non-manifold edges would result in massive holes in the body.
Honestly, I don’t know the best process for the surface to solid conversion- I had tried many ways to do this in Fusion, but what I settled (mostly) on doing is using the stitch command in the patch environment to get a reasonable number of joined surfaces, and then using the thicken command (by 1mm) on each surface. I had to go back and forth with unstitching and stitching various parts, while deleting really small but complex geometrical features like the mustang logo, or bleeder screws on brake calipers, or the lightbulbs hidden behind the surface of the headlight. Also, I deleted the entire interior (steering wheel, seats, etc.)
After much handwork, I got model that was “mostly” watertight when exporting as an STL from Fusion. I then would bring it into Meshlab and use the Quadratic Edge Collapse Decimation command to bring the model down to about 1 million faces and remove all non-manifold edges and vertices. At that point, it was ready for openFoam.
Building the openFoam case was tricky, it took many iterations until I was able to get results that were believable. I read up on standard practices of how large of a virtual wind tunnel domain should be used, and then I had to pick a block mesh density. I ended up with a block mesh of .25m blocks, and then a SnappyHexMesh setup of a basic refinement region, feature edge refinement and then a series of distance based refinement regions from the base model. I also had to increase the number of relaxation iterations to 300 for snapping the mesh to the surface.
In the end I got this pretty nice looking mesh, although meshing it took slightly over 3 hours, and then the actual run around 3 hours for only 500 iterations- which isn’t enough, the residuals were still converging when the run ended..
Still, 6 hours for a mesh, 500 iteration run, and some decent results isn’t bad. I’m still modeling the underside of the mustang, the model from Hum3D only gives you a flat floor, so I had to take measurements from my actual car to model things like the control arms, rockers, fuel cell, exhaust, etc. It’s a work in progress, but once I have an accurate floor and fender model (to design wheel well exhaust vents), I’ll be able to start designing a splitter, the canards, and the wing.
The goal is to make things out of wood or plastic, or 3D prints as much as possible, so that I can have total control of the aero elements