CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Commercial meshers] How to convert a .msh file to open Foam?

Register Blogs Community New Posts Updated Threads Search

Like Tree22Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2011, 01:47
Default
  #21
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
check if you have a surface called "wall". Gambit puts all surfaces without BC in a "wall" set, and those surfaces are defined as wall.
Then display the surface "wall" and check if they match the location where the flow seems to stop.
If yes, then in Gambit your probably have non connected surface at this location.
Danath likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 25, 2011, 08:01
Default
  #22
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
i connect the faces of the volumes which are in touch

after that i create the mesh and after i merge the volumes

all is ok

when i try to to pass the mesh to the foam i see


Create time

Dimension of grid: 3
Number of points: 58874
PointGroup: 1 start: 0 end: 58873. Reading points...done.
Number of faces: 58922
FaceGroup: 2 start: 0 end: 44. Reading mixed faces...done.
FaceGroup: 3 start: 45 end: 84. Reading mixed faces...done.
FaceGroup: 4 start: 85 end: 58921. Reading mixed faces...done.
Number of cells: 0
Zone: 2 name: Vin type: velocity-inlet. Reading zone data...done.
Zone: 3 name: Outlet type: outflow. Reading zone data...done.
Zone: 4 name: walls type: wall. Reading zone data...done.
Zone: 6 name: default-interior type: interior. Reading zone data...done.

FINISHED LEXING

Creating patch 0 for zone: 2 name: Vin type: velocity-inlet
Creating patch 1 for zone: 3 name: Outlet type: outflow
Creating patch 2 for zone: 4 name: walls type: wall
patch 0 from Fluent indices: 0 to: 44 type: velocity-inlet
patch 1 from Fluent indices: 45 to: 84 type: outflow
patch 2 from Fluent indices: 85 to: 58921 type: wall


--> FOAM FATAL ERROR:
Illegal cell label -1 in neighbour addressing for face 0

From function polyMesh::initMesh()
in file meshes/polyMesh/polyMeshInitMesh.C at line 65.

FOAM exiting



what is going wrong;
Danath is offline   Reply With Quote

Old   October 25, 2011, 08:06
Default
  #23
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
Quote:
Originally Posted by Danath View Post
i connect the faces of the volumes which are in touch

after that i create the mesh and after i merge the volumes
After merging the volumes, you need to remesh the new volume.
Then you can use the filter of any volume operation, and select Unmeshed. And finally select all. If any volume goes right, then this volume is unmeshed.
Danath likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 25, 2011, 08:34
Default
  #24
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
i umeshed my volume (now i have one volume)

i try to remesh but i have problems because the mesh in not 3d and not in the whole drew

i try to use all the sources (so i take alla the faces as sources )

but my volume cannot meshed with all face used as sources faces!

what do you recommend ?
Danath is offline   Reply With Quote

Old   October 25, 2011, 08:36
Default
  #25
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
post pictures
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 25, 2011, 12:14
Default
  #26
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
i think i have serious problem!

Should i redrew it from the beggining with edges?
Attached Images
File Type: jpg problem mesh.jpg (69.5 KB, 61 views)
File Type: jpg problem mesh 1.jpg (72.8 KB, 41 views)
Danath is offline   Reply With Quote

Old   October 26, 2011, 05:27
Default
  #27
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
From your pictures it sounds you only have one volume.
Better do some splits to make hexa meshing easier:
*do some splits like I did (you can see where are surfaces neede for splits >> pink edges).
*Then no problem for meshing volumes
Sans titre.pngSans titre2.pngSans titre1.jpg
Danath likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 31, 2011, 07:05
Default
  #28
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
thanks a lot! -mAx-

without your help ι would be forced to fail!
Attached Images
File Type: jpg Fuelcell.jpg (35.0 KB, 55 views)
Danath is offline   Reply With Quote

Old   November 16, 2011, 11:57
Default
  #29
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
hello again
i write in terminal transformPoints -scale "(0.01 0.01 0.01)" in order to scale my domain in cm

now i want to scale my domain in m so i suppose that i must write in terminal transformPoints -scale (100 100 100)

am i right?
Danath is offline   Reply With Quote

Old   November 19, 2011, 04:08
Default
  #30
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
yes but you forgot "..."
transformPoints -scale "(100 100 100)"
Danath and zaynah04 like this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   November 21, 2011, 07:52
Default
  #31
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
hello again!

i have set U= 1m/s and i change Re (<2000) after every measurment (P,U)
deltaT 0.05

i set endtime = 2

is it enough? for my case ?
Attached Images
File Type: jpg Gambit 1.jpg (26.3 KB, 8 views)
File Type: jpg gambit 2.jpg (34.6 KB, 11 views)
Danath is offline   Reply With Quote

Old   November 21, 2011, 13:55
Default
  #32
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
check CFL conditions in theory
Danath likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   December 22, 2011, 10:02
Default
  #33
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
hello!

If i want to calculate residence time what can i do?
Danath is offline   Reply With Quote

Old   January 4, 2012, 02:32
Default
  #34
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
no idea this time
kingjewel1 likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   March 25, 2012, 19:50
Default
  #35
Senior Member
 
Join Date: Jul 2009
Posts: 260
Rep Power: 18
kingjewel1 is on a distinguished road
Quote:
Originally Posted by Danath View Post
hello!

If i want to calculate residence time what can i do?
Many thanks to @Max indeed!

Residence time you can calculate from releasing a scalar in the domain. Diffusion=1e-16 (0 causes things to crash). Turn off momentum, pressure, turbulence. Just solve scalar.
Danath likes this.
kingjewel1 is offline   Reply With Quote

Old   March 27, 2012, 13:45
Default
  #36
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
thanks a lot both of you!
Danath is offline   Reply With Quote

Old   August 29, 2012, 08:31
Default
  #37
Member
 
Evangelos
Join Date: Sep 2011
Posts: 87
Rep Power: 15
Danath is on a distinguished road
hello !

i want to create and mesh a geometry via ansys workbench.

I will use openFoam to solve

My question is the geometry pass from workbench to openFoam or i must use I Deas NX to create and mesh the geometry ?

http://www.openfoam.com/features/mesh-conversion.php

i am a little bit confused!
Danath is offline   Reply With Quote

Old   August 29, 2012, 09:00
Default
  #38
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
no only the mesh is passed to OF.
If you are able to export your mesh as .msh file for instance, then you may be able to convert the mesh file into OF using fluent3DMeshToFoam
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   October 22, 2012, 20:02
Default
  #39
Member
 
hadi abdollahzadeh
Join Date: Aug 2012
Location: Iran-yasouj
Posts: 59
Rep Power: 14
dark lancer is on a distinguished road
hi
I am beginner in the openfoam and decide to solve a problem with dsmc code.
I create my body in catia and then import it to ansys and I use workbench to create my mesh file(.msh) and then I create a newfolder and create (0,constant and polyMesh,system) and copy the controlDict,decomposeParDict and the other folder from supersonic corner to my newfolder and then I put my (.msh)file into my polyMesh then run fluentmeshtofoam and I see this error:
[hadi@hadi polyMesh]$ fluentMeshToFoam hemishpherical.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : fluentMeshToFoam hemishpherical.msh
Date : Oct 21 2012
Time : 21:46:05
Host : "hadi.msi"
PID : 3346
Case : /home/hadi/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/bluntbodyathypersonic/constant/polyMesh
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

--> FOAM FATAL IO ERROR:
cannot find file
file: /home/hadi/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/bluntbodyathypersonic/constant/polyMesh/system/controlDict at line 0.
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.
FOAM exiting
[hadi@hadi polyMesh]$
dark lancer is offline   Reply With Quote

Old   October 23, 2012, 02:21
Default
  #40
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
you are calling fluentMeshToFoam from your_case_directory/constant/polyMesh instead of your_case_directory.
Move also your *.msh file into your_case_directory (not in /polyMesh)
dark lancer likes this.
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18


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