CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

How to convert a .msh file to open Foam?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree21Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   October 23, 2012, 06:18
Default
  #41
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
thank -mAx-
its work
dark lancer is offline   Reply With Quote

Old   October 27, 2012, 07:14
Default
  #42
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
hi
I can convert my .msh file and create some files that includes boundry,faces,points,zonepoints and ...
now how can I create the blockMesh file?
dark lancer is offline   Reply With Quote

Old   October 27, 2012, 12:01
Default
  #43
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 2,972
Rep Power: 30
-mAx- will become famous soon enough
no blockMesh is just another way for meshing.
In your case you can go and define your boundary conditions
Don't forget to scale your problem with transformPoints
Also checkMesh and renumberMesh
archeoptyrx likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 28, 2012, 14:36
Default
  #44
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by dark lancer View Post
hi
I can convert my .msh file and create some files that includes boundry,faces,points,zonepoints and ...
now how can I create the blockMesh file?
blockMeshDict is for once that you want to create your mesh in OpenFOAM,
when you import your file from gambit or some where else it is not necessary any more,
now the main file you maybe want to change is "boundary" file in constant/polyMesh
there, you can define your boundary name or type!

also as Max told, another tools are checkMesh and transportPoints

checkMesh is an utility which shows whether your mesh is suitable for OpenFOAM or not and return some essential results of your mesh.
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   November 13, 2012, 10:51
Default
  #45
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
thanks for reply
now I have a file .msh and when convert it I see this error

Creating patch 0 for zone: 3 name: wall type: wall
Creating patch 1 for zone: 4 name: body type: wall
Creating patch 2 for zone: 5 name: outlet type: outflow
Creating patch 3 for zone: 6 name: inlet type: inlet-vent
Creating cellZone 0 name: fluid type: fluid
Creating faceZone 0 name: default-interior type: interior
faceZone from Fluent indices: 217967 to: 26546254 type: interior
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Aborted (core dumped)
[hadi@hadi bluntbody]$
dark lancer is offline   Reply With Quote

Old   November 13, 2012, 10:57
Default
  #46
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 2,972
Rep Power: 30
-mAx- will become famous soon enough
Quote:
Originally Posted by dark lancer View Post
... cannot satisfy memory request.
$

How big is your mesh, and how many ram-memory do you have?
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   November 13, 2012, 11:59
Default
  #47
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
my size of file 1.8gig and my ram is 8gig
dark lancer is offline   Reply With Quote

Old   November 14, 2012, 01:41
Default
  #48
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 2,972
Rep Power: 30
-mAx- will become famous soon enough
Quote:
Originally Posted by dark lancer View Post
my size of file 1.8gig and my ram is 8gig
how many cells?
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   November 28, 2012, 02:52
Default
  #49
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
hi
I excute the checkMesh , All of them its Ok but at the end line :

Quote:
moosaie@:~/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/hemispherical> checkMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : checkMesh
Date : Nov 17 2012
Time : 12:53:01
Host : ".site"
PID : 6467
Case : /home/moosaie/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/hemispherical
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 1489344
faces: 4387940
internal faces: 4308820
cells: 1449460
boundary patches: 5
point zones: 0
face zones: 1
cell zones: 1

Overall number of cells of each type:
hexahedra: 1449460
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
body 17480 17694 ok (non-closed singly connected)
symmetry 34040 34576 ok (non-closed singly connected)
outlet_from_side 13524 13764 ok (non-closed singly connected)
outlet 10902 11079 ok (non-closed singly connected)
inlet 3174 3267 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-262.5 -262.5 -0.4142099593) (1375 262.5 262.5)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (1.756589626e-16 1.121895293e-15 5.86943899e-15) OK.
Max cell openness = 1.916326799e-15 OK.
Max aspect ratio = 61.10879384 OK.
Minumum face area = 0.01039895189. Maximum face area = 280.93608. Face area magnitudes OK.
Min volume = 0.001605026005. Max volume = 2372.742765. Total volume = 167688127. Cell volumes OK.
Mesh non-orthogonality Max: 86.44406365 average: 27.94667529
*Number of severely non-orthogonal faces: 20108.
Non-orthogonality check OK.
<<Writing 20108 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
***Max skewness = 4.752768679, 879 highly skew faces detected which may impair the quality of the results
<<Writing 879 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
dark lancer is offline   Reply With Quote

Old   November 28, 2012, 09:05
Default
  #50
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
you can see high skewness mesh in paraview, but what exactly do you want to know?
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   November 28, 2012, 11:10
Default
  #51
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
salam
I want to know what is this?and what should I do for this error?
Quote:
Failed 1 mesh checks.
where can I see high skewness mesh in paraview?
I see my geometry in paraFoam and its look like gambit file.
dark lancer is offline   Reply With Quote

Old   November 29, 2012, 06:21
Default
  #52
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by dark lancer View Post
salam
I want to know what is this?and what should I do for this error?

where can I see high skewness mesh in paraview?
I see my geometry in paraFoam and its look like gambit file.
search mesh skewness, you will find alot
but if you want to see the high skewness cells
in paraview, activate include sets , then choose skew cells
dark lancer likes this.
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   December 9, 2012, 07:02
Default
  #53
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
hi
I solved my skew error with divided the volumes in to the small parts.but now I face this error:
non positive volumes exists.
I check the volumes in the Examine mesh/volume and I put the the upper limit in to the 0 then show a face.I remesh and after check I don't see that faces and any thing but when I converted I see this error again:
non positive volumes exists.
dark lancer is offline   Reply With Quote

Old   December 9, 2012, 11:54
Default
  #54
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
maybe it returns for the direction of block definition
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   January 31, 2013, 07:30
Question
  #55
Member
 
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 52
Rep Power: 6
asoltoon is on a distinguished road
Hello All,

I have a *.msh file and I'm trying to convert it to OpenFoam format. when I use fluentMeshToFoam or fluent3DMeshToFoam functions, the mesh is apparently converted. Even when I check the mesh with checkMesh function it says that the mesh is O.K. but when I make the mesh by blockMesh it makes an error:

Quote:
Cannot open mesh description file
"/home/ali/OpenFOAM/ali-2.1.1/run/tutorials/multiphase/LTSInterFoam/wigleyHull2/constant/polyMesh/blockMeshDict"
my question is how the blockMeshDict should be created for my mesh?
When I put another tutorials blockMeshDict file beside my mesh, the blockMesh works but the mesh shown in Paraview is just a cube, that is my outer boundary not all of it.
What should I do to fix the problem?

Thanks in advance,
Ali
asoltoon is offline   Reply With Quote

Old   January 31, 2013, 07:34
Default
  #56
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 2,972
Rep Power: 30
-mAx- will become famous soon enough
Once your mesh is converted with fluentMeshToFoam or fluent3DMeshToFoam, then your geometry is ready.
What do you want to do with blockMesh?
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   February 1, 2013, 16:34
Default
  #57
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 4
dark lancer is on a distinguished road
salam
dear Ali
when you create your mesh and covert it ,It's not nessary use blockMesh
because blockMesh is utility that create mesh
after convert your mesh ,set your B.Cs and run your case
asoltoon likes this.
dark lancer is offline   Reply With Quote

Old   February 2, 2013, 06:12
Default
  #58
Member
 
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 52
Rep Power: 6
asoltoon is on a distinguished road
Hi MAX,

My Problem is solved. thanks for the reply.

Regards, Ali
asoltoon is offline   Reply With Quote

Old   February 2, 2013, 06:14
Default
  #59
Member
 
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 52
Rep Power: 6
asoltoon is on a distinguished road
Dear Hadi,

Thanks for the reply,
my problem is solved,

Regards,
Ali
asoltoon is offline   Reply With Quote

Old   May 2, 2013, 15:29
Unhappy Fluent mesh conversion
  #60
Member
 
sud
Join Date: May 2013
Posts: 65
Rep Power: 4
archeoptyrx is on a distinguished road
Hi danath ,

I tried converting in the same way u did . but it shows errors for me ..
my msh file is flat.msh.
I created a folder named Flat plate (/OpenFOAM/OpenFOAM-2.2.0/tutorials/incompressible/simpleFoam/Flat Plate$)

I then copied the flat.msh into this .

I also copied the O , constant , system in any one of the tutorials folder into it .
now the Flat plate folder consists of the following things

1.0 folder
2.constant folder
3.system folder
4.flat.msh

when i pointed to the Flat plate folder and in the terminal , i gave

fluentMeshToFoam flat.msh ..

It shows error .. . I am struggling a lot to do this simple conversion . Can you help me with this ..
archeoptyrx is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM 300 October 29, 2014 19:00
OpenFOAM 1.7.1 installation on LINUX UBUNTU 10.10 electrosin OpenFOAM Installation 39 July 1, 2014 07:55
Installation of OpenFOAM-1.6 on Ubuntu 9.10 marval OpenFOAM Installation 2 March 17, 2010 09:33
Version 15 on Mac OS X gschaider OpenFOAM Installation 120 December 2, 2009 11:23
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19


All times are GMT -4. The time now is 17:17.