CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

Conversion problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 10, 2005, 08:24
Default Hello everybody, I have a beg
  #1
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 646
Rep Power: 10
dmoroian is on a distinguished road
Hello everybody,
I have a beginer's problem! I have generated a mesh using gambit 2.2.30. The mesh format is msh (for fluent). When I try to convert this to openfoam I get the following error:

mshToFoam ~/ dragosica-foam test_gradient.msh

...cut...

Exec : mshToFoam /home/dragos/ dragosica-foam test_gradient.msh
Date : Oct 10 2005
Time : 13:00:48
Host : bobby
PID : 28256
Root : /home/dragos/
Case : dragosica-foam
Nprocs : 1
Create time
--> FOAM FATAL IO ERROR : wrong token type - expected int found on line 1 the punctuation token '('

file: test_gradient.msh at line 1.

From function operator>>(Istream&, int&)
in file primitives/int/intIO.C at line 74.

FOAM exiting

Then I tried to import the mesh in neu format, but I get another error:

dragos@bobby:~/work/test_gradients$ gambitToFoam ~/ dragosica-foam test_gradient.neu

...cut...

Exec : gambitToFoam /home/dragos/ dragosica-foam test_gradient.neu
Date : Oct 10 2005
Time : 13:04:03
Host : bobby
PID : 28260
Root : /home/dragos/
Case : dragosica-foam
Nprocs : 1
Create time


Title: test_gradient
Written by Gambit version 2.2.30

File written on 10 Oct 2005 12:10:57
number of points: 9181
number of cells: 7875
number of patches: 2
Reading nodal coordinates
Reading cells

Reading cell streams
Reading cell stream labels
Finished reading cell stream labels
Reading patches
patch 0: name: inlet


--> FOAM FATAL IO ERROR : Attempt to get back from bad stream

file: IStringStream.sourceFile at line 3.

From function void Istream::getBack(token& t)
in file db/IOstreams/IOstreams/Istream.C at line 44.

FOAM exiting

Anyone knows what is the problem? At least gambitToFoam reads one boundary condition (inlet), but still does not finish.

Best regards,
Dragos
dmoroian is offline   Reply With Quote

Old   October 10, 2005, 10:07
Default @mshToFoam in your first examp
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
@mshToFoam in your first example: the utility you wanted to use is fluentMeshToFoam. mshToFoam is for a completely different format (.msh seems to be a very popular extension for all kinds of mesh files)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 10, 2005, 11:22
Default At least for the first problem
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 646
Rep Power: 10
dmoroian is on a distinguished road
At least for the first problem it was my fault. I should have used fluentMeshToFoam instead of mshToFoam. But it still remains the problem with gambitToFoam converter!
dmoroian is offline   Reply With Quote

Old   October 10, 2005, 11:26
Default Is your gambit file ascii or b
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,748
Rep Power: 20
hjasak will become famous soon enough
Is your gambit file ascii or binary? Binary is not supported, try writing it out ascii and converting again. The Gambit converter works fine over here (and it was me who wrote it) :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 11, 2005, 04:34
Default Yes, the gambit neutral file i
  #5
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 646
Rep Power: 10
dmoroian is on a distinguished road
Yes, the gambit neutral file is in ascii format. I wrote myself some converters (neu->tecplot) for it. Anyway I do not know how to create a neutral file format other than ascii (which should be ok).

Dragos
dmoroian is offline   Reply With Quote

Old   February 10, 2007, 22:28
Default dear itry to convert mesh fr
  #6
New Member
 
mohamed
Join Date: Mar 2009
Posts: 1
Rep Power: 0
mohamed is on a distinguished road
dear
itry to convert mesh from .neu to openfoam but i am faild i donot know why please help me their another thing i have cenataur in any format that i should get the mesh to put it in openfoam

gambitToFoam ~/OpenFOAM/mhalima-1.3/run/tutorials/icoFoam/ halima testfeb09.neu
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gambitToFoam /home/mhalima/OpenFOAM/mhalima-1.3/run/tutorials/icoFoam/ halima testfeb09.neu
Date : Feb 11 2007
Time : 03:01:34
Host : mhalima
PID : 7205
Root : /home/mhalima/OpenFOAM/mhalima-1.3/run/tutorials/icoFoam/
Case : halima
Nprocs : 1
Create time

Finished lexing
gambitToFoam:
Gambit file format does not provide information about the type of the patch (eg. wall, symmetry plane, cyclic etc).
All the patches have been created as type patch. Please reset after mesh conversion as necessary.

Default patch type set to empty


--> FOAM FATAL ERROR : points deallocated

From function const pointField& polyMesh::allPoints() const
in file meshes/polyMesh/polyMesh.C at line 642.

FOAM aborting

Foam::error::printStack(Foam:stream&)
Foam::error::abort()
Foam::polyMesh::allPoints() const
Foam::polyMesh::cellShapePointCells(Foam::List<foa m::cellshape> const&) const
Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Field<foam::vector<double> > const&, Foam::List<foam::cellshape> const&, Foam::List<foam::list<foam::face> > const&, Foam::List<foam::word> const&, Foam::List<foam::word> const&, Foam::word const&, Foam::List<foam::word> const&)
gambitToFoam [0x8050b70]
__libc_start_main
__gxx_personality_v0
Aborted
thanks alot
yours
m.halima
mohamed is offline   Reply With Quote

Old   May 10, 2007, 10:09
Default Hi everybody, I have a small
  #7
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 169
Rep Power: 7
cedric_duprat is on a distinguished road
Hi everybody,
I have a small problem with FluentMeshToFoam.
I have generated a mesh using gambit 2.3.16.
The mesh format is msh (for fluent).
I've got periodic faces in this file. (cyclic in Foam)
so I choose PERIODIC in gambit,and named it CYCLIC1.
When I try to convert it to Foam mesh, I got this error:
...
FINISHED LEXING

dimension of grid: 3
Creating shapes for 3-D cells
Creating patch for zone: 3 start: 1 end: 5925 type: shadow name: CYCLIC1_shadow

--> FOAM FATAL ERROR : fluent patch type shadow not recognised.

From function fluentToFoam::main(int argc, char *argv[])
in file fluentMeshToFoam.L at line 1258.

FOAM aborting

I don't know why this "shadow" is coming ...
Anyone knows what is the problem?

Best regards,
Cedric
cedric_duprat is offline   Reply With Quote

Old   May 10, 2007, 11:37
Default Hi Cedric, If I remember core
  #8
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 646
Rep Power: 10
dmoroian is on a distinguished road
Hi Cedric,
If I remember corectly, you cannot use the PERIODIC boundary condition! So, why don't you just set those faces as wall and then change the patch type in the boundary file that you get after the conversion?

Dragos
dmoroian is offline   Reply With Quote

Old   May 10, 2007, 12:01
Default Hi Dragos, Thank's for the ti
  #9
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 169
Rep Power: 7
cedric_duprat is on a distinguished road
Hi Dragos,
Thank's for the tips, it works correctly now.
I did't know that PERIODIC boundary condition doesn't work in conversion and I was a little bit ...suprised ;o)

Cedric
cedric_duprat is offline   Reply With Quote

Old   May 10, 2007, 12:02
Default Dragos is right. But make sure
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Dragos is right. But make sure that you have exactly the same meshes on both "walls" (there are ways to do that in Gambit, but don't ask me). Plus they should be in the same patch (use couplePatches afterwards to make sure that the faces are correctly ordered - see figure 6.4 in the UserGuide)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   May 10, 2007, 12:45
Default hi Bernhard, Thank you for th
  #11
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 169
Rep Power: 7
cedric_duprat is on a distinguished road
hi Bernhard,
Thank you for the adding comments, I will check my mesh again in Gambit. I'm sure that the mesh's parameters are the same for the two side of the "wall" but for the order of the faces, ... I'll check again.

Cedric
cedric_duprat is offline   Reply With Quote

Old   August 6, 2007, 06:54
Default hello everybody, I also have
  #12
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 169
Rep Power: 7
cedric_duprat is on a distinguished road
hello everybody,
I also have a beginer's problem! but I can't find the mistake ...
I have generated a mesh using gambit The mesh format is neu. When I try to convert this to openfoam I get the following error:
"
Default patch type set to empty
Foam::error::printStack(Foam:stream&)
Foam::sigSegv::sigSegvHandler(int)
/lib/tls/libpthread.so.0 [0xa75898]
Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Field<foam::vector<double> > const&, Foam::List<foam::cellshape> const&, Foam::List<foam::list<foam::face> > const&, Foam::List<foam::word> const&, Foam::List<foam::word> const&, Foam::word const&, Foam::List<foam::word> const&)
gambitToFoam [0x8051911]
__libc_start_main
__gxx_personality_v0
Segmentation fault"

So before this message, OF read correctly my 4 empty patchs (2 inlet, 1 outlet, 1 wall). Because there is no tips in the OF's message, ....I don't know what to do.

Anyone knows what is the problem, any advice?

Best regards,
Cedric
cedric_duprat is offline   Reply With Quote

Old   September 13, 2007, 17:35
Default Dear all, I generated a fl
  #13
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 7
qtian is on a distinguished road
Dear all,

I generated a fluent mesh with Gridgen. I am trying to convert fluent mesh to openFOam. For some reason, I am keep geting this warning message during "checking mesh" process.

It seems like non-orthogonality problem in the element, but I don't know how to solve this problem. I recheck mesh and did not see any place suspicious. Can anyone give me some help and advise? Thank you very much.

--> FOAM Warning :
From function primitiveMesh::checkFaceDotProduct(const bool report, labelHashSet* setPtr) const
in file meshes/primitiveMesh/primitiveMeshCheck.C at line 534
Severe non-orthogonality detected for face 31089 between cells 10443 and 10444: Angle = 176.177 deg.
--> FOAM Warning :
From function primitiveMesh::checkFaceDotProduct(const bool report, labelHashSet* setPtr) const
in file meshes/primitiveMesh/primitiveMeshCheck.C at line 534
Severe non-orthogonality detected for face 31090 between cells 10443 and 10626: Angle = 174.315 deg.
qtian is offline   Reply With Quote

Old   September 13, 2007, 20:18
Default E.g. use setSet to pick up the
  #14
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
E.g. use setSet to pick up the cells using these faces:

setSet <root> <case>
faceSet f0 new labelToFace (31089)
cellSet c0 new faceToCell f0 any
quit

This will write a VTK file for f0 (which now cotains that face label) and for (the outside faces of) c0 (which contains owner and neighbour of f0).
mattijs is offline   Reply With Quote

Old   September 13, 2007, 20:47
Default Mattijs, Could you please g
  #15
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 7
qtian is on a distinguished road
Mattijs,

Could you please give more explanation about your solution? I think I don't even quite understand what causes my problem. Thank you for your help.

QT
qtian is offline   Reply With Quote

Old   September 14, 2007, 06:44
Default It was not a solution, just a
  #16
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 15
mattijs is on a distinguished road
It was not a solution, just a way of visualising the problematic cell(s).

Your mesh as generated by Gridgen is incorrect. The maximum non-orthogonality for a mesh is 90 degrees, for it also to be 'runnable' quite a bit lower than that.
mattijs 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
Problem with Mesh conversion Gambit msh Foam Rachid BANNARI (Bannari) OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 25 September 11, 2011 08:58
Serial OK parallel failsmesh conversion problem r2d2 OpenFOAM Running, Solving & CFD 15 July 31, 2008 16:04
Ccm problem conversion rengu OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 0 December 18, 2007 05:26
Mesh Conversion Problem ms903 OpenFOAM Running, Solving & CFD 0 October 16, 2006 14:39
Unit Conversion Problem lambuhere CFX 0 August 20, 2004 05:49


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