CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Commercial meshers] Fluent mesh to OF conversion (https://www.cfd-online.com/Forums/openfoam-meshing/136274-fluent-mesh-conversion.html)

theHumbleOne May 26, 2014 04:50

Fluent mesh to OF conversion
 
Hi,
I am new OpenFoam user and I am trying to convert mesh created in Fluent to OpenFOAM.
Till this time I converted only simple ANSYS meshes and experienced no problems but now I get errors and can't deal with them.

fluent3DMeshToFoam gave errors at the very start, saying something about "not knowing characters".
I switched to fluentMeshToFoam and got veeeery long response in terminal. Finishing with the error I don't understand.

Code:

Create time

"ANSYS(RFound unknown block:(4
Embedded blocks in comment or unknown: (
Found end of section in unknown:)
Found end of section in unknown:)
Dimension of grid: 3
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 points: 14800918

number of faces: 42655130
Number of cells: 13848179
Reading points
Reading points
Reading mixed faces
Reading mixed faces
Reading uniform faces
Reading uniform faces
Reading mixed faces
Reading mixed faces
Reading uniform faces

(...)

Reading mixed faces
Other readCellGroupData: 3 1 4f53 1 0
Reading mixed cells
Other readCellGroupData: 4 4f54 1aaba 1 0
Reading mixed cells
Other readCellGroupData: 12 1aabb 28cbbb 1 0
Reading mixed cells
Other readCellGroupData: 7b 28cbbc 758179 1 0
Reading mixed cells
Other readCellGroupData: e3 75817a a82890 1 0
Reading mixed cells
Other readCellGroupData: e9 a82891 d1bd60 1 0
Reading mixed cells
Other readCellGroupData: ee d1bd61 d34e73 1 0
Reading mixed cells
Read zone2:238 name:wlot_6 patchTypeID:fluid
Reading zone data

Read zone2:233 name:wlot_5 patchTypeID:fluid
Reading zone data

Read zone2:227 name:wlot_4 patchTypeID:fluid
Reading zone data

(...)

Read zone2:2 name:interior-wlot_1-1_wlot_out patchTypeID:interior
Reading zone data

Read zone2:1 name:interior-wlot_1-1_wlot_in patchTypeID:interior
Reading zone data

Found unknown block:(38
Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown:(
Embedded blocks in comment or unknown:
(
Found end of section in unknown:)

(...)

Found end of section in unknown:)
Found end of section in unknown:)
Found end of section in unknown:)


FINISHED LEXING


#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
#4  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
Segmentation fault (core dumped)

I put "(...)" to shorten the text, it was almost 430 000 characters long.

For clarity, I post the last part again separately:
Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
#4  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
Segmentation fault (core dumped)

I don't even know what to focus on.
I didn't create that mesh - all I know about it is:
- it works fine in Fluent,
- it was exported from Fluent as .msh file in ASCII format,
- it was composed from several (~9) meshes created in ANSYS mesher, put altogether in Fluent.

Can anyone help me with that?

theHumbleOne May 27, 2014 17:52

Please, any tips? I cannot find anything similar to this case on the forum.

Tobias Adam May 28, 2014 10:14

Hello Michal,

my tip is to use fluent3DMeshToFoam.
If you get a message similar to this:

"--> FOAM FATAL ERROR:
Do not understand characters: | on line 5894448,"

you should just remove this character. To do so, this file has to be in ascii format.
Actually msh files can be really big, so donīt open it in order to delete the characters manually.
use this command in your terminal if you want to delete this character "|":
sed 's/|//g' mesh1.msh > mesh2.msh

You can delete any character with this command. e.G. & ---> sed 's/&///g'
If you want to delete "/", donīt type sed '////' but sed /\///. ( \ in front of / )

I hope this helps!

Best regards Tobi

Tobias Adam May 28, 2014 10:17

Hello Michal,

my tip is to use fluent3DMeshToFoam.
If you get a message similar to this:

"--> FOAM FATAL ERROR:
Do not understand characters: | on line 5894448,"

you should just remove this character. To do so, this file has to be in ascii format.
Actually msh files can be really big, so donīt open it in order to delete the characters manually.
use this command in your terminal if you want to delete this character "|":
sed 's/|//g' mesh1.msh > mesh2.msh

You can delete any character with this command. e.G. & ---> sed 's/&///g'
If you want to delete "/", donīt type sed '////' but sed /\///. ( \ in front of / )

I hope this helps!

Best regards Tobi

Tobias Adam May 28, 2014 10:31

Problem with mesh conversion
 
I have a .msh file generated with icem and want to convert it to openfoam with fluent3dtofoam.
I already did this a few times and it worked very well.
This time I got the following error message:
Code:


Create time

Dimension of grid: 3
Number of points: 111619
PointGroup: 14 start: 0 end: 111618.  Reading points...done.
Number of faces: 223234
FaceGroup: 15 start: 0 end: 21355.  Reading uniform faces...done.
FaceGroup: 16 start: 21356 end: 24308.  Reading uniform faces...done.
FaceGroup: 17 start: 24309 end: 26339.  Reading uniform faces...done.
FaceGroup: 18 start: 26340 end: 212537.  Reading uniform faces...done.
FaceGroup: 19 start: 212538 end: 214840.  Reading uniform faces...done.
FaceGroup: 20 start: 214841 end: 223233.  Reading uniform faces...done.
Zone: 15 name: OUTLET type: outlet-vent.  Reading zone data...done.
Zone: 16 name: SHROUD type: wall.  Reading zone data...done.
Zone: 17 name: NABE type: wall.  Reading zone data...done.
Zone: 18 name: BLADE type: wall.  Reading zone data...done.
Zone: 19 name: INLET type: velocity-inlet.  Reading zone data...done.
Zone: 20 name: TRAILING-EDGE type: wall.  Reading zone data...done.

FINISHED LEXING

Creating patch 0 for zone: 15 name: OUTLET type: outlet-vent
Creating patch 1 for zone: 16 name: SHROUD type: wall
Creating patch 2 for zone: 17 name: NABE type: wall
Creating patch 3 for zone: 18 name: BLADE type: wall
Creating patch 4 for zone: 19 name: INLET type: velocity-inlet
Creating patch 5 for zone: 20 name: TRAILING-EDGE type: wall
patch 0 from Fluent indices: 0 to: 21355 type: outlet-vent
patch 1 from Fluent indices: 21356 to: 24308 type: wall
patch 2 from Fluent indices: 24309 to: 26339 type: wall
patch 3 from Fluent indices: 26340 to: 212537 type: wall
patch 4 from Fluent indices: 212538 to: 214840 type: velocity-inlet
patch 5 from Fluent indices: 214841 to: 223233 type: wall

--> FOAM FATAL ERROR:
Illegal cell label -1 in neighbour addressing for face 0

    From function polyMesh::initMesh()
    in file meshes/polyMesh/polyMeshInitMesh.C at line 65.

Does anybody have some experience with this?
I didnīt find this error in google, so I hope here is someone who can help me.
Otherwise I just to do a new mesh with Icem.
Thank you so far.

Best regards
Tobi

theHumbleOne May 28, 2014 14:57

Thank you for help, Tobias.

I am doing as suggested (and indeed i wanted to try fluent3DMeshToFoam and delete these characters but simply couldn't open the file - it was too big) but I keep getting errors concerning other characters. As a result I spent a while removing several capitals, brackets, but when it came to the letter 'r' I stopped. These are regular characters and should be understood.

Why does it happen? I am pretty sure that mesh was saved in ASCII format (I saw the 'write as a binary file' box being unchecked).

theHumbleOne May 30, 2014 09:34

Well, it seems to me that I solved the problem. Errors were occurring because the mesh was multidomain. The solution and proper conversion method is presented clearly in this topic: http://www.cfd-online.com/Forums/ope...n-problem.html

saba* July 30, 2021 08:44

Hi Michal
I have exactly the same error. Do you have a solution?
Thank you very much in advance.
saba


All times are GMT -4. The time now is 19:05.