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

[Commercial meshers] Conversion problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2005, 07:24
Default Conversion problem
  #1
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
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, 09:07
Default @mshToFoam in your first examp
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 10:22
Default At least for the first problem
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
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, 10:26
Default Is your gambit file ascii or b
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
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, 03:34
Default Yes, the gambit neutral file i
  #5
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
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, 21: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, 09:09
Default Hi everybody, I have a small
  #7
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
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, 10:37
Default Hi Cedric, If I remember core
  #8
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
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, 11:01
Default Hi Dragos, Thank's for the ti
  #9
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
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, 11:02
Default Dragos is right. But make sure
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 11:45
Default hi Bernhard, Thank you for th
  #11
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
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, 05:54
Default hello everybody, I also have
  #12
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
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, 16:35
Default Dear all, I generated a fl
  #13
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17
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, 19:18
Default E.g. use setSet to pick up the
  #14
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
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, 19:47
Default Mattijs, Could you please g
  #15
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17
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, 05:44
Default It was not a solution, just a
  #16
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
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


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
Mesh& steptime independant: conduction-convection problem Fati1 Main CFD Forum 1 October 28, 2018 13:52
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
[ICEM] Problem with 2D to 3D block conversion using Multizone Arvind_CFD ANSYS Meshing & Geometry 0 March 12, 2015 23:02
Problem in implementing new sgs model zoptirik OpenFOAM Programming & Development 0 January 29, 2015 05:35
Unit Conversion Problem lambuhere CFX 0 August 20, 2004 04:49


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