OpenFOAM/C3/Importing-mesh-file-in-OpenFOAM/English-timed

From Script | Spoken-Tutorial
Revision as of 18:38, 20 February 2017 by PoojaMoolya (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Time Narration
00:00 Hello and welcome to the spoken tutorial on Importing Mesh files in OpenFOAM.
00:07 In this tutorial, you will learn to:

Import Mesh files from a meshing software in OpenFOAM.

00:14 To record this tutorial, I am using:

Linux Operating system Ubuntu version 12.04 OpenFOAM version 2.1.1 ParaView version 3.12.0

00:26 As a prerequisite, the user should know how to generate a Mesh in softwares like -

Gambit, Ansys ICEM , CFX, Salome etc.

00:40 Using blockMesh, we can easily make simple geometries. For example- box, pipe etc.

It is difficult to create complex geometries using blockMesh.

00:53 But OpenFOAM supports importing mesh from third party meshing software.

There are commands available in OpenFOAM to import these mesh files.

01:05 We will now learn to import these files.
01:08 Here is the geometry of our case.

We have a square cylinder:length 1m and height 1m.Inlet velocity is 1 m/s.

01:22 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.

01:36 This is the mesh file generated in a meshing software.
01:40 In your OpenFOAM working directory, go to the icoFoam solver and click on it.
01:47 Now, create a folder by the name cylinder.
01:52 Now go to the cavity case. Copy the '0' (zero0 and system folders from the cavity case.
01:59 Paste this inside the cylinder folder. Note that you do not need the constant folder.
02:10 On my desktop, I have a Fluent mesh file with a .(dot) msh extension. It is named as cylmesh.msh.
02:23 Copy-and-paste this file in the cylinder folder, in icoFoam. Our setup is now ready.
02:32 Open the command terminal. Type "run" and press Enter.
02:37 Type: cd space tutorials; press Enter.
02:42 Type: cd space incompressible and press Enter. Type cd space icoFoam; press Enter. Type cd space cylinder and press Enter.
02:58 For a Fluent mesh file, in the command terminal, we need to type "fluentMeshToFoam" (Note that M, T, F are capital here) (space) "cylmesh.msh" and press Enter.
03:20 On the terminal, you will see that the mesh file is now converted to openFoam data file.
03:28 Now, go back to the cylinder folder.
03:31 The constant folder has been generated. Click on the constant folder to open it.
03:38 transport Property file is missing from the constant folder.
03:42 Go two levels back and copy the transport property from the constant folder of the cavity case.
03:53 Paste this inside the constant folder of cylinder which we created just now. We will keep the default viscosity.
04:05 Switch back to the terminal.
04:08 Note that we do not run blockMesh command here. To view the boundary conditions in the mesh file,
04:15 go to Constant > polyMesh. Type "ls". You will see the boundary file.
04:25 Open it in any editor of your choice.
04:30 The boundary condition names are as seen in the geometry slide.
04:36 In case of any error with the boundary names, you can refer the boundary file. Close this.
04:45 In the terminal, go two levels back and go to the '0' (zero) folder.
04:52 Open the pressure file in the '0' (zero) folder.
04:57 Note that the boundary names should exactly match with the boundary file. Change them if needed. Close this file.
05:08 Go one level back and go to the system folder.
05:15 Open the controlDict file.
05:18 We will change the end time of the controlDict file. Close this.
05:25 Go one level back. To start the iterations, type "icoFoam" and press Enter. Iterations running will be seen in the terminal.
05:39 To view the geometry, type paraFoam and press Enter. In the ParaView window, click on the Apply button in the object inspector menu.
05:53 You can see the geometry. In the Active variable control menu, change from solid color to 'U' velocity.
06:03 The initial velocity condition is seen here.
06:08 Click on the play button in the VCR menu, on the top right-hand side.
06:15 We can see the velocity contours with the passage of time.
06:20 Close the paraview window.
06:23 Here is a list of commands to import geometry from other meshing software.

ANSYS : ansysToFoam space <filename> IDEAS : ideasTofoam space <filename> CFX : cfxToFoam space <filename> SALOME : ideasUnvToFoam space <filename>

This brings us to the end of the tutorial.

06:54 As an assignment-

Try importing the mesh file of a circular cylinder. Mesh file by the name circcyl.mshis provided with this tutorial. Solve it using the 'icoFoam' solver.

07:12 In this tutorial, we learnt importing geometry from other meshing softwares.
07:18 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.

07:30 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

07:46 Spoken Tutorial 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. More information on this mission is available at the following URL:

http://spoken-tutorial.org/NMEICT-Intro

08:03 This is Rahul Joshi from IIT Bombay, signing off. Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14