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/)
-   -   Fluent case to openfoam mesh (http://www.cfd-online.com/Forums/openfoam-meshing-other/106077-fluent-case-openfoam-mesh.html)

Mat_fr August 17, 2012 12:03

Fluent case to openfoam mesh
 
Dear all,

I have a tricky problem to expose :

I would like to perform OF simulations starting from FLUENT data. However, I only have the .cas (also .dat) file. Indeed, the mesh was modified inside FLUENT (refinement, adaptation of cell size, etc), then the .msh file doesn't match with the simulation results.

Here, I have two possibilities :
* recover the .msh file from one of the ANSYS softwares
* convert directly the .cas file in OpenFOAM mesh.
I tried both of them without success, even after a long web search about peolple who have met similar problems.

As it is the relevant location of the thread, I will talk here about the second possibility.
I'm converting directly the .cas file in OpenFOAM mesh with "fluent3DMeshToFoam". Because I red that it is possible to convert directly a .cas file (instead of a .msh one)
The .cas file is written in ASCII (I tried both ASCII and binary), and I get this error :

----------------------------------------------------------------------------
Create time

Dimension of grid: 3
Number of cells: 10454687
Number of faces: 22499392
Number of points: 2260909
CellGroup: 54 start: 0 end: 9559828 type: 1
CellGroup: 3 start: 9559829 end: 10454686 type: 32
FaceGroup: 55 start: 0 end: 19676980. Reading uniform faces...done.
FaceGroup: 56 start: 19676981 end: 19717405. Reading uniform faces...done.
FaceGroup: 57 start: 19717406 end: 19757954. Reading uniform faces...done.
FaceGroup: 58 start: 19757955 end: 19809500. Reading uniform faces...done.
FaceGroup: 59 start: 19809501 end: 19811801. Reading uniform faces...done.
FaceGroup: 60 start: 19811802 end: 19812018. Reading uniform faces...done.

***

FaceGroup: 28 start: 20430232 end: 20436680. Reading uniform faces...done.
FaceGroup: 4 start: 20436681 end: 22499391. Reading uniform faces...done.
PointGroup: 1 start: 0 end: 2260908. Reading points...done.
Zone: 54 name: fluid type: fluid. Reading zone data...done.
Zone: 2 name: pump_inlets:002 type: mass-flow-inlet. Reading zone data...done.
Zone: 55 name: int_fluid type: interior. Reading zone data...done.

***

Zone: 77 name: tubes type: wall. Reading zone data...done.

FINISHED LEXING



--> FOAM FATAL ERROR:
3 not found in table. Valid entries:
25
(
2
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
)


From function HashTable<T, Key, Hash>::operator[](const Key&)
in file /root/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude/HashTableI.H at line 117.

FOAM exiting
----------------------------------------------------------------------------

I suppose it is due to the modifications of the mesh in FLUENT.
Maybe you can help me ?

I'm asking for the first possibility (recover the .msh file from one of the ANSYS software) in the corresponding part of the forum : http://www.cfd-online.com/Forums/ans...r-msh-cas.html

Best,

Mat

-mAx- August 28, 2012 06:51

you cannot get your .msh file back from .cas, since you have hanging nodes, as you described here:
http://www.cfd-online.com/Forums/ans...r-msh-cas.html
I assume there were a tpoly conversion (>> maybe that could explained what you mentioned: "the .msh file doesn't match with the simulation results.")
If you still have the .msh file, try to convert the msh file with tpoly utility (fluent)

Else I am not familiar with .cas import into OF, but more with .msh.
Did you try the command fluentMeshToFoam instead of fluent3DMeshToFoam?

Mat_fr August 29, 2012 04:04

Hello Max,

Thank you for your answer !
Yes I still have the initial mesh, but I cannot use it (with or without convertion). Indeed, as the mesh was modified afterwards inside Fluent, it is no more the grid corresponding to my .cas and .dat files.

I also tried fluentMeshToFoam instead of fluent3DMeshToFoam with the .cas file, and then I get another error :


--------------------------------------------------------------------------------------------------------
***
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:)
Found unknown block in zone:(
Found end of section in unknown:)



FINISHED LEXING


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


--> FOAM FATAL ERROR:
Cannot find match for face 2.
Model: tet model face: 3(0 1 3) Mesh faces:
4
(
3(2 1 0)
3(1 42034 0)
3(1 221021 221023)
3(221021 2 152462)
)
Matched points: 4(42034 2 1 0)

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 280.

FOAM aborting
--------------------------------------------------------------------------------------------------------

Thanks for your help !

Mat

-mAx- August 29, 2012 04:24

ah ok if there were mesh refinment and/or mesh adaptation, then you cannot get your mesh back.
did you see this thread? http://www.cfd-online.com/Forums/ope...-openfoam.html

Mat_fr August 29, 2012 05:24

Yep I saw it, and indeed we have the same error message.
However, this foamer solved his problem by modifying the .msh file that I don't have. I was looking for a line in the .cas file which may correspond to :
(45 (10 wall from-mask-1-to-zmax-wall 1) ())
but I didn't find anything.

-mAx- August 29, 2012 06:09

ok
why do you want to restart from fluent data?

Mat_fr August 29, 2012 07:26

I have converged results in Fluent of a steady flow simulation in a complex geometry, and I want to transport lagrangian particles in OF on the flow field calculated with Fluent. (I know that Fluent also proposes discrete phase modelling, but I would like to use the OF tools)

-mAx- August 29, 2012 07:55

Maybe you will be faster if you restart from OF?

Mat_fr August 29, 2012 08:10

At the end, It's what I think also :o


All times are GMT -4. The time now is 06:35.