OpenFOAM Baby Steps - 2D Flow Over a Cylinder
This is Episode 1 in this series using FreeCAD and the CfdOF Workbench to work through various OpenFOAM cases. This is a 2D, inviscid, transient run.
In the Parts Design Workbench, 'pad' the sketch (1 mm) to create a 3D part. Change to the Draft Workbench and Explode the part to separate the faces. Rename the faces to something more useful. Then use the Part Workbench to Boolean the faces into a single part.
In the CfdOF Workbench, create an Analysis Container. As a side-note, selecting each of the items in the tree under the analysis container will open a Task Tab to make various choices. I did not initially realize that there are other options in the Property window when you select an item in the Model tab. For example, this is the only place to select an output folder different than the default, or to choose multiple processors for the computations. Step through the first three items under the CfdAnalysis item in the tree. I chose transient analysis from 0-5 seconds, writing output every .04 seconds, air as the fluid. Select the Constraint icon on the workbench (looks like two rectangles with an arrow pointing to the middle), make the boundary a 'Constraint' and the sub-type '2D bounding plane'. Choose the front face and add it to the Boundary Face List. Repeat this with another constraint for the far wall. Select the boolean object and create a mesh. The default values worked for me the first time. Once that completes, select the mesh and create a sub-mesh, adding the cylinder wall as the boundary.
Create additional constraints, 1 for each remaining face. For my setup, the inlet is on the left, outlet on the right, top/bottom/cylinder face all share an inviscid wall constraint. Write and run the case............and wait. Even with a high tolerance and relatively sparse mesh the squirrels were calculating for several hours.
Once it completes (without errors), the solver Task has the option to send the data to ParaView for analysis and output.
I was happy with the ability to get usable data using CfdOF. I went through about 5 iterations to avoid errors, but the GUI made it relatively simple to get back to a workable case and figure out the cause of the error. Currently, there isn't the ability to use a SimpleGrading or other scheme to change mesh size/density. It is possible to manually edit the text files, just as you do with OpenFOAM itself. Next Baby-Step?.....a 3D wing using the Airplane Design Workbench!