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

[Commercial meshers] Importing a hex core mesh from Gambit

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2006, 03:58
Default Importing a hex core mesh from Gambit
  #1
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi! Is there any posibility to import a mesh generated with Gambit with "hex core"? There are some discussions about hanging nodes, and the conclusion as I red was that OpenFOAM should be able to handle such grids.
Attached, there is a small mesh as a nonworking example. If I try to import it, I get the following:
--------------------------------------
dragosm@lap08:~/OpenFOAM/dragosm-1.3/run/hangingNodes> fluentMeshToFoam ./ case hangingNodes.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : fluentMeshToFoam ./ case hangingNodes.msh
Date : Sep 15 2006
Time : 10:58:27
Host : lap08
PID : 8660
Root : /fsd/soft/OpenFOAM/dragosm-1.3/run/hangingNodes/
Case : case
Nprocs : 1
Create time


Dimension of grid: 3
Number of points: 2677
Reading points
number of faces: 21024
Reading mixed faces
Reading mixed faces
Reading uniform faces
Found unknown block
Embedded blocks in comment or unknown
Found end of section in unknown
Embedded blocks in comment or unknown
Found end of section in unknown
Found end of section in unknown
Number of cells: 9282
Reading mixed cells
Reading zone data
Reading zone data
Reading zone data


FINISHED LEXING


dimension of grid: 3
Creating shapes for 3-D cells


--> FOAM FATAL ERROR : Cannot find match for face 1.
Model: hex model face: 4(0 1 5 4) Mesh faces:
6
(
4(2552 2554 2558 2556)
4(2554 1463 1465 2558)
4(2556 2558 1465 1464)
3(1464 1462 2556)
3(2552 2556 1462)
3(2552 1462 2554)
)
Matched points: 8(2552 -1 -1 2556 2554 -1 -1 2558)

From function create3DCellShape(const label cellIndex, const labelList& faceLabels, const labelListList& faces, const labelList& owner, const labelList& neighbour, const label fluentCellModelID)
in file create3DCellShape.C at line 281.

FOAM aborting

Foam::error::printStack(Foam:stream&)
Foam::error::abort()
fluentMeshToFoam [0x409570]
fluentMeshToFoam [0x40e6a9]
__libc_start_main
__gxx_personality_v0
Aborted
------------------------------------------

Any chance to get the mesh in OpenFOAM?

Dragos



dmoroian is offline   Reply With Quote

Old   September 15, 2006, 05:21
Default Hello Dragos, The issue her
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Hello Dragos,

The issue here is that the Fluent hanging node format only allows 4-1 matching, which I find rather restrictive. Star-CD format can take any number of faces in a couple set (equivalent). For this reason, couple sets were never implemented in the Fluent mesh converter. If we wish to do this, some additional code is required in the converter. Can you create the hex core mesh in any other format?

Needless to say, once the mesh is converted, OpenFOAM will have no trouble because of its polyhdral mesh support.

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

Old   September 15, 2006, 06:27
Default Thanks for the answer Hrvoje!
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Thanks for the answer Hrvoje!
I can use tgrid to export in hypermesh, nastran, patran, and ansys formats. Gambit can export in rampant, nekton, polyflow, flowizard, ansys.
I will try to import the grid in starcd first and then from star to OpenFOAM, but can you also suggest me a workaround for this?

Dragos
dmoroian is offline   Reply With Quote

Old   September 17, 2006, 12:35
Default Hello Dragos, There's no ne
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Hello Dragos,

There's no need to go into Star-CD: just output Star-CD format files and use the starToFoam converter on them. In case of trouble, please drop me an E-mail and I'll help.

Enjoy,

Hrv

P.S. I hope you liked my fluid-structure interaction stuff - if you wish, I can provide the top-level solver for it to play around with.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 18, 2006, 02:04
Default Hrv + Dragos, Just to let y
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Hrv + Dragos,

Just to let you know, the newer Star-CD <u>solver</u> (version v4) no longer supports couples.
Before writing the .geom file, pro-STAR translates them into appropriate polyhedra.

The 'cpwrite' command still does exist, but I'm not sure for how much longer. In the long term, moving the cell matching and coupling code into Foam topo changing routines that can be anywhere might be a better idea.

/mark
olesen is offline   Reply With Quote

Old   September 18, 2006, 02:22
Default Hi Mark, Already done - sin
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Hi Mark,

Already done - since OpenFOAM supports polyhedra, there is no need to do anything (BTW, it's OpenFOAM that had it first).

As for moving the cpMatch, the code in the Star-CD converter is old and horrible and I'm looking forward to throwing it away. I did a much better job in topological changes and that has been working now for a number of years. Re-using the new stuff for crappy cpMatches insults my sense of beauty so it's not getting done. :-)

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

Old   September 18, 2006, 02:45
Default Hi Hrv, > I'm looking forwa
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Hi Hrv,

> I'm looking forward to throwing it away.

You needn't wait much longer.
I've revamped the starToFoam converter (star4ToFoam) to account for the new Star-CD formats as well as a few other aspects.
The reverse conversions (foamMeshToStar and foamMeshToStar -surface) are also possible.

In marketing jargon, star4ToFoam is 'baffle-ready'. Baffles are retained and prevent connectivity between the cells. The baffle cell associations are recorded on the patch - as per cyclic patches - as well as under polyMesh/interfaces (for possible topo changing).

Hopefully, some inventive soul will work on a family of baffle patches - slip/noslip, porous, heat injection etc. Until then, the baffles can still be used to split the mesh and impose wall conditions within the domain.

/mark
olesen is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh Changing When Importing from Fluent russel60 OpenFOAM Running, Solving & CFD 0 February 15, 2019 16:43
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
Hex Core Mesh LOCC enGrid 2 July 13, 2013 18:46
importing Icem mesh into Gambit srinivas FLUENT 4 December 12, 2008 04:06
Hex core mesh using ICEM CFD 10 john CFX 1 November 16, 2005 02:05


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