CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... (http://www.cfd-online.com/Forums/openfoam-meshing-other/)
-   -   Importing a hex core mesh from Gambit (http://www.cfd-online.com/Forums/openfoam-meshing-other/61726-importing-hex-core-mesh-gambit.html)

dmoroian September 15, 2006 03:58

Hi! Is there any posibility to
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
Foam::error::abort()
fluentMeshToFoam [0x409570]
fluentMeshToFoam [0x40e6a9]
__libc_start_main
__gxx_personality_v0
Aborted
------------------------------------------

Any chance to get the mesh in OpenFOAM?

Dragos




hjasak September 15, 2006 05:21

Hello Dragos, The issue her
 
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

dmoroian September 15, 2006 06:27

Thanks for the answer Hrvoje!
 
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

hjasak September 17, 2006 12:35

Hello Dragos, There's no ne
 
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.

olesen September 18, 2006 02:04

Hrv + Dragos, Just to let y
 
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

hjasak September 18, 2006 02:22

Hi Mark, Already done - sin
 
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

olesen September 18, 2006 02:45

Hi Hrv, > I'm looking forwa
 
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


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