1 00:00:00 --> 00:00:07 Hello and welcome to the spoken tutorial on Importing Mesh files in OpenFOAM 2 00:00:07 --> 00:00:14 In this tutorial, you will learn to: Import Mesh files from a meshing software in OpenFOAM. 3 00:00:14 --> 00:00:26 To record this tutorial I am using Linux Operating system Ubuntu version 12.04. OpenFOAM version 2.1.1 ParaView version 3.12.0 4 00:00:26 --> 00:00:40 As a pre-requisite, the user should know how to generate a Mesh in software like - Gambit, Ansys ICEM , CFX, Salome etc. 5 00:00:40 --> 00:00:53 *Using blockMesh, we can easily make simple geometries.*For example- box, pipe etc. It is difficult to create complex geometries using blockMesh. 6 00:00:53 --> 00:01:05 *But OpenFOAM supports importing mesh from third party meshing software. There are commands available in OpenFOAM, to import these mesh files. 7 00:01:05 --> 00:01:08 We will now learn to import these files. 8 00:01:08 --> 00:01:22 Here is the geometry of our case. We have a square cylinder length 1m and height 1m. Inlet velocity is 1 m/s 9 00:01:22 --> 00:01:36 *We are solving this for a Reynolds Number (Re) = 100 *The domain chosen is 40m by 60m *The Boundary conditions are as shown in the diagram 10 00:01:36 --> 00:01:40 This is the mesh file generated in a meshing software. 11 00:01:40 --> 00:01:47 In your OpenFOAM working directory, go to the icoFoam solver and click on it. 12 00:01:47 --> 00:01:52 Now Create a folder by the name cylinder 13 00:01:52 --> 00:01:59 Now go to the cavity case.Copy the 0 and system folders from the cavity case. 14 00:01:59 --> 00:02:10 Paste this inside the cylinder folder.Note that, you do not need the constant folder. 15 00:02:10 --> 00:02:23 On my desktop, I have a Fluent mesh file with a .(dot) msh extension.It is named as cylmesh.msh 16 00:02:23 --> 00:02:32 Copy-and-paste this file in the cylinder folder in icoFoam.Our setup is now ready. 17 00:02:32 --> 00:02:37 Open the command terminal.Type run and press Enter. 18 00:02:37 --> 00:02:42 Type cd tutorials; press Enter. 19 00:02:42 --> 00:02:58 Type cd incompressible; press Enter.Type cd icoFoam; press EnterType cd cylinder and press Enter. 20 00:02:58 --> 00:03:20 For a Fluent mesh file, in the command terminal we need to typefluentMeshToFoam note that (MTF) are capital here (space) cylmesh.mshand press Enter 21 00:03:20 --> 00:03:28 On the terminal you will see that the mesh file is converted to openfoam data file 22 00:03:28 --> 00:03:31 Now go back to the cylinder folder 23 00:03:31 --> 00:03:38 The constant folder has been generated.Click on the constant folder to open it. 24 00:03:38 --> 00:03:42 Transport Property file is missing from the constant folder 25 00:03:42 --> 00:03:53 Go two levels back and copy the transport property from the constant folder of the cavity case. 26 00:03:53 --> 00:04:05 Paste this inside the constant folder of cylinder which we created just now.We will keep the default viscosity. 27 00:04:05 --> 00:04:08 Switch back to the terminal. 28 00:04:08 --> 00:04:15 Note that we do not run blockMesh command here.To view the boundary conditions in the mesh file 29 00:04:15 --> 00:04:25 Go to Constant > polyMesh.Type ls.You will see the boundary file. 30 00:04:25 --> 00:04:30 Open it in any editor of your choice. 31 00:04:30 --> 00:04:36 The boundary condition names are as seen in the geometry slide. 32 00:04:36 --> 00:04:45 In case of any error with the boundary names, you can refer the boundary fileclose this. 33 00:04:45 --> 00:04:52 In the terminal, go two levels back and go to the 0 folder. 34 00:04:52 --> 00:04:57 Open the pressure file in the 0 folder. 35 00:04:57 --> 00:05:08 Note that the boundary names should exactly match with the boundary file.Change them if needed.Close this file. 36 00:05:08 --> 00:05:15 Go one level back and go to the system folder. 37 00:05:15 --> 00:05:18 Open the controlDict file. 38 00:05:18 --> 00:05:25 We will change the end time of controlDict file.Close this. 39 00:05:25 --> 00:05:39 Go one level back.To start the iterations', type icoFoam and press EnterIterations running will be seen in the terminal. 40 00:05:39 --> 00:05:53 To view the geometry, type paraFoam and press Enter.In the ParaView window, click on the Apply button in the object inspector menu. 41 00:05:53 --> 00:06:03 You can see the geometry.In the Active variable control menu, change from solid color to U velocity 42 00:06:03 --> 00:06:08 The initial velocity condition is seen here. 43 00:06:08 --> 00:06:15 Click on the play button in the VCR menu on the top right-hand side. 44 00:06:15 --> 00:06:20 We can see the velocity contours with the passage of time. 45 00:06:20 --> 00:06:23 Close the paraview window. 46 00:06:23 --> 00:06:54 Here is a list of command to import geometry from other meshing software. ANSYS: ansysMeshToFoam space IDEAS: ideasTofoam space CFX: cfxToFoam space SALOME: ideasUnvToFoam space This brings us to the end of the tutorial. 47 00:06:54 --> 00:07:12 As an assignment Try importing the mesh file of circular cylinder. Mesh file by the name circcyl.mshis provided with this tutorial. Solve it using the icoFoam solver. 48 00:07:12 --> 00:07:18 In this tutorial we learnt: Importing geometry from other meshing software. 49 00:07:18 --> 00:07:30 Watch the video available at this URL:http://spoken-tutorial.org/What_is_a_Spoken_Tutorial.It summarizes the Spoken Tutorial project.If you do not have good bandwidth, you can download and watch it 50 00:07:30 --> 00:07:46 The Spoken Tutorial Project Team-Conducts workshops using spoken tutorials-Gives certificates to those who pass an online test-For more details, please write to contact@spoken-tutorial.org 51 00:07:46 --> 00:08:03 Spoken Tutorials Project is a part of the Talk to a Teacher project,It is supported by the National Mission on Education through ICT, MHRD,Government of India.This project is coordinated by http://spoken-tutorialMore information on the same is available at the following URL linkhttp://spoken-tutorial.org/NMEICT-Intro 52 00:08:03 --> 00:08:08 This is Rahul Joshi from IIT BOMBAY signing off.Thanks for joining