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

[Commercial meshers] Problems converting a Fluent case file

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Lieven
  • 1 Post By McFly

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2013, 04:37
Default Problems converting a Fluent case file
  #1
New Member
 
Martin Goddard
Join Date: Mar 2013
Location: Melbourne, AU
Posts: 22
Rep Power: 13
McFly is on a distinguished road
Hello,

I have been trying to convert a Fluent .cas file (saved in ASCII) for use in OpenFOAM 2.1.1. The mesh has been adapted in Fluent and has hanging nodes, so there is no mesh file. I'm not sure if this is the problem.

The first error message when converting the case file is usually something like:
Code:
--> FOAM FATAL ERROR:
Do not understand characters: |
    on line 4337

    From function fluentMeshToFoam::lexer
    in file fluent3DMeshToFoam.L at line 748.

FOAM exiting
So the file was edited with a text editor (EditPadLite7, as the ASCII file is 1GB size) to remove the offending characters (the “|” symbol). This could be done as these were not part of the mesh data. The conversion process then gets a bit further until this error:
Code:
--> FOAM FATAL ERROR:
15 not found in table.  Valid entries:
13
(
1
2
3
4
5
6
7
8
9
10
11
12
14
)
Looking at the case file there are 14 zones specified. I can add at 15th, such as is done in this thread. This means finding the area in the .cas file:
Code:
(39 (14 interior default-interior 1)(
 (is-not-a-rans-les-interface . #t)
))
And adding another zone:
Code:
(39 (14 interior default-interior 1)(
 (is-not-a-rans-les-interface . #t)
))
(39 (15 interior bananas 1)(
 (is-not-a-rans-les-interface . #t)
))
With this modification fluent3DMeshToFoam runs, and completes without further errors. However, running checkMesh on this case fails with a bunch of errors that look like this:
Code:
Checking topology...
    Boundary definition OK.
--> FOAM Serious Error : 
    From function bool zone::checkDefinition(const label maxSize, const bool report) const
    in file meshes/polyMesh/zones/zone/zone.C at line 211
    Zone bananas contains invalid index label 1009794

... <SNIP> ...

--> FOAM FATAL ERROR:
Too many errors
If, instead of adding zones in the .cas file, one merely changes the last zone to 15:
Code:
(39 (15 interior default-interior 1)(
 (is-not-a-rans-les-interface . #t)
))
then errors such as this occur:
Code:
Zipping mesh to remove hanging nodes
--> FOAM Warning : 
    From function void polyMeshZipUpCells(polyMesh& mesh)
    in file polyMeshZipUpCells/polyMeshZipUpCells.C at line 697
    Duplicate point found in the new face. 
Point: 39132 face: 8(31989 31543 31542 34169 31542 51478 39132 51483)
Does anyone have any thoughts as to why this cannot be converted? Is it just the hanging node issue?
McFly is offline   Reply With Quote

Old   May 19, 2013, 11:11
Default A work-around
  #2
New Member
 
Martin Goddard
Join Date: Mar 2013
Location: Melbourne, AU
Posts: 22
Rep Power: 13
McFly is on a distinguished road
Hello again,

I'm still not sure why the error occurs however this work-around appears to have fixed it.

Going with the extra zone (bananas) from above:
Code:
(39 (15 interior bananas 1)(
 (is-not-a-rans-les-interface . #t)
))
fluent3DMeshToFoam produces corresponding zone:
Code:
Creating cellZone 0 name: fluid type: fluid
Creating cellZone 1 name: bananas type: interior
This extra cellZone causes a bunch of problems. However, it can be found within the <case>/control/polyMesh/cellZones file. The top of the file looks like this:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

2            //There are two zones in this file (my comment)
(
fluid
{
    type cellZone;
cellLabels      List<label> 
4496302
(
0
1
2
...
Indicating two zones. Change the 2 to a 1.

Then, further down the file, I find my new zone:

Code:
bananas
{
    type cellZone;
cellLabels      List<label> 
615228
(
4496302
4496303
4496304
...
5111529
5111530
)
;
}
... and all the data for this zone is deleted.

Now checkMesh gives an "OK" result - which is a sight for sore eyes after spending many, many hours trying to get around this issue.

This mesh has been run in a simulation with icoFoam without issues, so I think it's okay. The next test will be trying the same work-around out on the larger mesh with double adaption and seeing if the same process works.

I'm still curious why fluent3DMeshToFoam needs an extra zone to run. If I get time I will have a look through the source code to try and understand what I'm doing wrong.

Any thoughts on this would be appreciated.
McFly is offline   Reply With Quote

Old   May 19, 2013, 14:43
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Martin,

I only managed to give a quick read to your posts. I think you can find part of the answer here: http://www.cfd-online.com/Forums/ope...tml#post412947 - post #4

I think the missing part of the answer is due to Fluent's format: it uses fixed codes for each field and mesh type. This would explain why it required you to add the 15th code.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 30, 2013, 09:10
Default
  #4
New Member
 
Nisha
Join Date: Sep 2009
Location: Massachusetts
Posts: 18
Rep Power: 17
nisha is on a distinguished road
Could you please tell how to save Fluent .cas files in ASCII format ?
nisha is offline   Reply With Quote

Old   May 30, 2013, 22:29
Default
  #5
New Member
 
Martin Goddard
Join Date: Mar 2013
Location: Melbourne, AU
Posts: 22
Rep Power: 13
McFly is on a distinguished road
It probably depends on the version of fluent.

In v14.5 it's simple:

File menu > Write > Case ... then in the Select File dialogue box uncheck the box labelled Write Binary Files.

The file saved will be in ASCII format and about twice the size of the binary file.

When you open a binary file something like this will appear in the log:

Code:
248908 hexahedral cells, zone  1, binary.
When it's an ASCII file the 'binary' tag will disappear.

For other versions of Fluent and for queries off the topic of this thread (converting case files) you'd be better served searching the forums or starting a new thread.
McFly is offline   Reply With Quote

Old   May 31, 2013, 02:33
Default
  #6
New Member
 
Nisha
Join Date: Sep 2009
Location: Massachusetts
Posts: 18
Rep Power: 17
nisha is on a distinguished road
McFly,

Thanks, it worked. I'm using Fluent v13. As you pointed out, the file size is much higher in ASCII format.
nisha is offline   Reply With Quote

Old   July 31, 2013, 10:28
Default
  #7
New Member
 
Martin Goddard
Join Date: Mar 2013
Location: Melbourne, AU
Posts: 22
Rep Power: 13
McFly is on a distinguished road
Just to follow up on my above post.

Firstly, thank you Bruno for your response - I haven't had time to look into it further yet, but maybe someone else will when they have the same problem.

Secondly, two weeks ago I tried the same work-around with a mesh of almost 7M cells and it seems to have worked without issues (the mesh was then decomposed and ran on 256 processors fine) so this is a viable solution for now.

Thanks,


McFly
McFly is offline   Reply With Quote

Old   July 31, 2013, 10:59
Default
  #8
Member
 
Join Date: Jul 2013
Posts: 98
Rep Power: 13
HHOS is on a distinguished road
Hello!

Just one question that might be stupid, but I am completely new with OpenFOAM... When you transform the mesh using a .cas file instead of a .msh file, you get the whole case set up into OpenFoam? or just the mesh, as if it was a simple .msh file?

I ask this, because what I now do is to import the .msh file and then set up the case with HelyxOS, so I don't need to go through so many code files.

Thank you
HHOS is offline   Reply With Quote

Old   July 31, 2013, 11:23
Default
  #9
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
OpenFoam is not capable of interpreting fluent case setups. So if you manage to load the .cas-file, I guess you will only have the mesh (but I have to admit, I wouldn't know how you would convert the .cas-file in openfoam).

Cheers,

L
HHOS likes this.
Lieven is offline   Reply With Quote

Old   July 31, 2013, 11:38
Default
  #10
Member
 
Join Date: Jul 2013
Posts: 98
Rep Power: 13
HHOS is on a distinguished road
OK, then... So the good way to do things is to transform just the .msh file...

I get no problems with that...
HHOS is offline   Reply With Quote

Old   August 1, 2013, 22:41
Default
  #11
New Member
 
Martin Goddard
Join Date: Mar 2013
Location: Melbourne, AU
Posts: 22
Rep Power: 13
McFly is on a distinguished road
Hello,

As Lieven said, you are only converting the mesh information.

The software can extract a mesh from a case file. This is useful in certain circumstances, such as my case given above.

Regards,


McFly
HHOS likes this.
McFly is offline   Reply With Quote

Old   July 21, 2019, 16:58
Default Problem with exporting .msh file in to OpenFOAM
  #12
New Member
 
Pratyush Kumar
Join Date: Jun 2019
Location: Mumbai
Posts: 19
Rep Power: 7
PRATBHARAT is on a distinguished road
Create time

Dimension of grid: 3
Number of points: 7900
Number of faces: 71723
Number of cells: 33649
--> FOAM Warning : Found unknown block of type: "3010"
on line 14


--> FOAM FATAL ERROR:
Do not understand characters: [
on line 15

From function fluentMeshToFoam::lexer
in file fluent3DMeshToFoam.L at line 754.

FOAM exiting


Can anyone look in to my problem? I am facing while meshing .msh file in to OpenFOAM. The error shows as the above.
PRATBHARAT is offline   Reply With Quote

Old   July 21, 2019, 22:02
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Use an online search engine to look for the following line:
Code:
site:www.cfd-online.com fluent mesh block 3010
I found several threads on this topic, but don't have time to look for a specific answer that might fit your problem exactly. All signs point to an invalid cell type that the converter is unable to handle, so remeshing or some other Fluent related mesh converter in ANSYS is needed to act as an intermediate mesh translator.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
case, convert, error, fluent


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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42


All times are GMT -4. The time now is 23:40.