OpenFoam Workflow (3): Import Mesh in OpenFoam

Please like, comment and share, if you enjoyed this video :-)

0:00 Create new case folder with structure
1:45 Import mesh to OpenFoam (ideasUnvToFoam)
2:30 Change boundary type for walls in polyMesh
3:25 Check the mesh visually in with paraFoam

Transcript

Welcome back to the third part of this tutorial, where we'll take a quick look at the OpenFOAM import steps. Generally, when you're working on your first case, it can be much more complex. However, I've prepared a laminar case in advance that we can use, making things easier.

In OpenFOAM, a handy feature is that you can simply copy the three most crucial folders of an existing case into a new case. This way, you don't need to start from scratch. For this tutorial, I'm using the former case structure as it aligns with our Salome case, with the same names for Inlet, Outlet, and Walls, simplifying the process.

Here's what we have so far: our UNV file contains the mesh, and within the case structure, we have everything we need, including velocity, pressure, and Alpha water for a water and air simulation. You'll also find the necessary constants and the polymesh folder where our mesh will be imported. The controlDict file and other settings are stored in the system folder.

Now, let's move on to the next step. We have our UNV file, and OpenFOAM provides a helpful tool called "ideasUnvToFoam" for importing the mesh.

This command imports the mesh into the "polymesh" folder, and you should see that it was imported without any errors.

Before we proceed, there's one important detail to address. Go to the "polymesh" folder and open the "boundary" file. In this file, you'll see that OpenFOAM has already imported our Inlet, Outlet, and Walls boundaries from Salome. For the Walls, it's essential to change the type from "patch" to "wall" (without an 's') to ensure OpenFOAM correctly recognizes them. Failure to rename the type can lead to errors.

Now, let's move to ParaView to visualize the mesh. When you open ParaView, you should be able to view the imported mesh.

In the ParaView window, you can see how the mesh looks in 3D and wireframe modes. Please note that we haven't performed any calculations in OpenFOAM at this point; it's merely a check to ensure the mesh import went smoothly. There should be no errors or unusual elements visible in the mesh.

In summary, in this third part of the tutorial, we've successfully imported the mesh into OpenFOAM, adjusted the boundary conditions for the walls, and verified that the mesh appears correct in ParaView. In the next tutorial, we'll delve deeper into the various files that make up the OpenFOAM case.