OpenFOAM/C3/Exporting-geometry-from-Salome-to-OpenFOAM/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Tutorial: Exporting geometry from Salome to OpenFOAM.


Script and Narration : Saurabh S. Sawant


Keywords: Video tutorial,CFD.


Visual Cue
Narration
Slide 1: Title

Play the slide

Hello and welcome to the spoken tutorial on Exporting the geometry from Salome to OpenFOAM.
Slide 2 : Learning Objectives

Play the slide

In this tutorial we will see:

Group the meshed geometry parts in Salome.

Export the geometry to OpenFOAM.

Create a case directory for simulation.

View the geometry in ParaView.



Slide 3: System Requirement

Play the slide


To record this tutorial,


I am using Linux operating system Ubuntu 12.10


OpenFOAM version 2.1.1


ParaView version 3.12.0


Salome version 6.6.0



Slide 4:Prerequisites

Play the slide

To practice this tutorial the learner should first perform the tutorial on,

Creating and meshing a Curved-Pipe Geometry in Salome.



Open Salome. Open Salome as shown in the previous tutorial.
Go to file>>Open Go to file>>Open
Go to Desktop. Go to Desktop.
Click on Curved-geometry.hdf. Click on Curved-geometry.hdf.
Press Open. Press Open.
Go to mesh-module from the modules toolbar. Go to mesh-module from the modules toolbar.



Open the mesh tree from the object browser. Open the mesh tree from the object browser.



Right click on Mesh_1 and click on Show. Right click on Mesh_1 and click on Show.

The mesh on the geometry is visible.



Close the python console window. Let me close the python console window.
Now we have to name the the meshed geometry parts as we require it in OpenFOAM.
Right click on Mesh_1 and click on Create Group. To create Groups on this mesh, right click on Mesh_1 and click on Create Group.



Select the element type as Face. Select the element type as Face.



Select the group type as Group on Geometry. Select the group type as Group on Geometry.



Click on the button in front of Geometrical Object and select Direct Geometrical Selection. Click on the button in front of Geometrical Object and select Direct Geometrical Selection.
Open the geometry tree in the object browser.

Open the pipe_1 tree.

Open the geometry tree in the object browser.

Open the pipe_1 tree.



Select the inlet group in the geometry tree that we had created in the previous tutorial. Select the inlet group in the geometry tree that we had created in the previous tutorial.



Select the color as red. You can select the color as red.



Name the group as inlet. Name the group as inlet.



Click on Apply and close. Click on Apply and close.

inlet group is seen in the tree.

Create the outlet group. Similarly, create the outlet group.

I have created outlet group.

Right click on mesh_1 and click on create group. Now to create the group of the whole outer surface, right click on mesh_1 and click on create group.



Select Element Type as Face and the Group Type as Group on filter. Select Element Type as Face and the Group Type as Group on filter.



Click on Set filter. Click on Set filter.



Click on the Add button. Click on the Add button.
Click on Apply and Close. Click on Apply and Close.



Change the color to blue. You can change the color to blue.



Click on Apply and Close. Again click on Apply and Close.

Group_1 has been created.

In the mesh menu, click on cut groups. Now, in the mesh menu, click on cut groups.



Select the main object as Group_2 and tool object as inlet. Select the main object as Group_2 and tool object as inlet.



Hold the shift key and also select the tool object as outlet. Hold the shift key and also select the tool object as outlet.



Name the' result name as walls'. Name the' result name as walls'.



Select the color as purple.

and click on Apply and Close.

You can select the color as purple.

and click on Apply and Close.

We see the group, 'walls'.

Right click on the Group_1 and delete this group Right click on the Group_1 and delete this group as we do not want to see it in OpenFOAM.



Save the work by clicking on save document option. Save the work by clicking on save document option.
Right click on mesh_1. Go to Export>> Unv File. Now right click on mesh_1. Go to Export>> Unv File.
Name the file as bentpipe. Name the file as bentpipe.



Save this file on the Desktop. I am saving this file on the Desktop.



We see bentpipe.unv file on the desktop.



Create a folder named bentpipe on the desktop. Create a folder named bentpipe on the desktop.



move bentpipe.unv file to this folder. Now, move bentpipe.unv file to this folder.
Go to the icoFoam folder in OpenFOAM. Now, to perform simulation on this geometry in OpenFOAM using icoFoam solver,

Go to the icoFoam folder in OpenFOAM.

For the location of this folder, go to the tutorial on lid driven cavity.



Copy and Paste bentpipe folder from the desktop to this icoFoam folder. Copy and Paste bentpipe folder from the desktop to this icoFoam folder.



copy and paste the system folder from cavity folder to this bentpipe folder. Also, copy and paste the system folder from cavity folder to this bentpipe folder.
Go inside the bentpipe folder throgh command terminal. Now, go inside the bentpipe folder throgh command terminal.

I am inside the bentpipe folder.

Type ls and press Enter. Type ls and press Enter. We can see the system folder and the bentpipe.unv file.
type ideasUnvToFoam bentpipe.unv Now, type ideasUnvToFoam bentpipe.(dot)unv, Note that U, T and F are capital. Press Enter.
Type ls. Type ls.

We can see the constant folder has been created.

Type cd (space) Constant. Type cd (space) Constant.
Type cd (space) polyMesh. Type cd (space) polyMesh.
Type ls. Press Enter. Type ls. Press Enter.
Come out of the polyMesh folder. We see that the geometry files have been created.

Come out of the polyMesh folder.

Come out of the geometry folder. Come out of the geometry folder.
Type

transformPoints (space) -'(0.01 0.01 0.01)' and press Enter.

Now, to convert the geometry scale to centimeters, type

transformPoints (space) -'(0.01 0.01 0.01)' and press Enter.

Geometry has been converted to centimeters.

Minimize the terminal. Minimize the terminal.
Go inside the bentpipe folder. Go inside the bentpipe folder.



Go inside constant folder. Go inside constant folder.



We see that the transportProperties file is not there.



Copy the transportProperties file from the cavity folder and save it inside the constant folder. Copy the transportProperties file from the cavity folder and save it inside the constant folder.



Come out of the constant folder. Now, come out of the constant folder.
Copy the 0 (zero) folder from the cavity folder. We need the 0 (zero) folder having P and U files.

Copy the 0 (zero) folder from the cavity folder.



I have copied the 0 (zero) folder.



Go inside the 0 (zero) folder. Go inside the 0 (zero) folder.



Open the p file Open the p file



Make sure that you give boundary patches for inlet, outlet and walls as we had created in Salome.



Erase movingWall and type inlet. Erase movingWall and type inlet.



Erase fixedWall and type outlet. Erase fixedWall and type outlet.



Erase frontAndBack and type walls. Erase frontAndBack and type walls.



Save the file and Close the file. Save the file and Close the file.



Make changes in U file. Similarly,

Make changes in U file.

For appropriate boundary conditions,

refer to the tutorial on Hagen-Poiseuille flow.



I have made the changes and given the appropriate boundary conditions.
You may also make the changes in transportProperties and ControlDict files by refering to the tutorial on Hagen-Poiseuille flow.
Close the Home Folder. Let's close the Home Folder.
Go to terminal. Now, go to terminal.



Type paraFoam.


Type paraFoam.



Click on Apply in the Object Inspector Menu. This will open ParaView. Click on Apply in the Object Inspector Menu.



In the drop down menu click on Surface with Edges. In the drop down menu click on Surface with Edges.



Zoom in. Lets have a closer view by zooming in.



We see hexahedral mesh.



We see the groups have been created as we had named it in Salome- Inlet outlet and walls.



Volume inside the surface is automatically grouped as internal mesh.
Slide 11: Summary In this tutorial we have learned:


How to group the meshed geometry parts in Salome.

How to export the geometry to OpenFOAM.

How to create a case directory for simulation.

And to view the geometry in ParaView.

Slide 12 : Assignment For Assignment,

Run the simulation by making appropriate changes in the files as described.

Export the geometries that you have created on your own.

And run the simulations on those geometries.



Slide 13 :

About Spoken tutorials

The video is available at the following 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.

Slide 14:

About Spoken tutorials

The Spoken Tutorial Project Team

-Conducts workshops using spoken tutorials

-Gives certificates to those who pass an online test

-For more details, contact@spoken-tutorial.org

Slide 15:

Acknowledgement


Spoken Tutorials are part of 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-tutorial

More information on this mission is available at, http://spoken-tutorial.org/NMEICT-Intro

I am Saurabh Sawant, from IIT Bombay, Thank you.

Contributors and Content Editors

P12575