View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003815 | OpenFOAM | Feature | public | 2022-03-08 13:34 | 2022-03-09 11:14 |
Reporter | kasperbilde | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 20.04 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003815: fluent3DMeshToFoam not able to read mesh from R2021 | ||||
Description | Hi, I've previously used fluent3DMeshToFoam to convert Fluent meshes to Foam and I recently upgraded to Fluent R2021 R2. I created a mesh and got the following error due to square brackets in the .msh ASCII file. /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : dev-69858a80ec41 Exec : fluent3DMeshToFoam fluent3DmeshToFoam_bug.msh Date : Mar 08 2022 Time : 14:31:14 Host : "DKAALT0912" PID : 7777 I/O : uncollated Case : /mnt/c/Users/dkaakbea/OpenFOAM/flocculatorDesign/basecase nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Reading header: "ANSYS(R) TGLib(TM) 3D, revision 18.1.0" Reading header: "ANSYS(R) TGLib(TM) 3D, revision 18.1.0" Dimension of grid: 3 Number of points: 8263 Number of faces: 12816 Number of cells: 2617 PointGroup: 64 start: 1274 end: 8262. Reading points...done. PointGroup: 136 start: 0 end: 1273. Reading points...done. FaceGroup: 62 start: 763 end: 12815. Reading mixed faces...done. FaceGroup: 13 start: 0 end: 179. Reading mixed faces...done. FaceGroup: 14 start: 180 end: 359. Reading mixed faces...done. FaceGroup: 12 start: 360 end: 762. Reading mixed faces...done. CellGroup: 60 start: 0 end: 2616 type: 1 Zone: 60 name: solid type: fluid. Reading zone data...done. Zone: 12 name: walls type: wall. Reading zone data...done. Zone: 14 name: outlet type: pressure-outlet. Reading zone data...done. Zone: 13 name: inlet type: velocity-inlet. Reading zone data...done. Zone: 62 name: interior--solid type: interior. Reading zone data...done. --> FOAM FATAL ERROR: Do not understand characters: [ on line 21154 From function virtual int yyFlexLexer::yylex() in file fluent3DMeshToFoam.L at line 749. FOAM exiting Not sure whether this was introduced in an earlier version of Fluent, but I can confirm it was working well with Fluent 2019 R3. When removing the square brackets from the ASCII file, fluent3DMeshToFoam functions again. sed -e 's/\|\[0-9\]//g' -i fluent3DmeshToFoam_bug.msh fluent3DMeshToFoam -scale 0.001 fluent3DmeshToFoam_bug.msh | ||||
Steps To Reproduce | Reproduce error: 1. Insert fluent3DmeshToFoam_bug.msh in a case. 2. fluent3DMeshToFoam fluent3DmeshToFoam_bug.msh Fix by removing square brackets from ASCII .msh file. 1. sed -e 's/\|\[0-9\]//g' -i fluent3DmeshToFoam_bug.msh 2. fluent3DMeshToFoam fluent3DmeshToFoam_bug.msh | ||||
Tags | No tags attached. | ||||
|
fluent3DmeshToFoam_bug.msh (911,619 bytes) |
|
We have no access to Fluent and so no way to maintain the converter. Can you supply a patch which ensures the converter works with the current AND previous Fluent releases? I tested the .msh file you attached but it converted fine and does not contain any square brackets. |
|
I'll look into it. It might take a while, as I haven't got so much time at the moment. I don't know if you can put it "on hold" or something. If anyone else encounters this from Google search, they can simply remove the brackets from the .msh-file until a patch is made. |
|
I couldn't find any square brackets in the .msh file you sent and it converts fine. |
|
Here is the log I get when I convert the file attached here: Create time Reading header: "ANSYS(R) TGLib(TM) 3D, revision 18.1.0" Reading header: "ANSYS(R) TGLib(TM) 3D, revision 18.1.0" Dimension of grid: 3 Number of points: 8263 Number of faces: 12816 Number of cells: 2617 PointGroup: 64 start: 1274 end: 8262. Reading points...done. PointGroup: 136 start: 0 end: 1273. Reading points...done. FaceGroup: 62 start: 763 end: 12815. Reading mixed faces...done. FaceGroup: 13 start: 0 end: 179. Reading mixed faces...done. FaceGroup: 14 start: 180 end: 359. Reading mixed faces...done. FaceGroup: 12 start: 360 end: 762. Reading mixed faces...done. CellGroup: 60 start: 0 end: 2616 type: 1 Zone: 60 name: solid type: fluid. Reading zone data...done. Zone: 12 name: walls type: wall. Reading zone data...done. Zone: 14 name: outlet type: pressure-outlet. Reading zone data...done. Zone: 13 name: inlet type: velocity-inlet. Reading zone data...done. Zone: 62 name: interior--solid type: interior. Reading zone data...done. --> FOAM Warning : Found unknown block of type: "73" on line 22257 FINISHED LEXING Creating patch 0 for zone: 13 name: inlet type: velocity-inlet Creating patch 1 for zone: 14 name: outlet type: pressure-outlet Creating patch 2 for zone: 12 name: walls type: wall Creating cellZone 0 name: solid type: fluid Creating faceZone 0 name: interior--solid type: interior faceZone from Fluent indices: 763 to: 12815 type: interior patch 0 from Fluent indices: 0 to: 179 type: velocity-inlet patch 1 from Fluent indices: 180 to: 359 type: pressure-outlet patch 2 from Fluent indices: 360 to: 762 type: wall Writing mesh to "constant/region0" |
|
I accidentally attached the file where the brackets had already been removed. This is the right one. fluent3DmeshToFoam_bug-2.msh (911,624 bytes) |
|
I have played around with the text parsing and the attached version parses your case but I don't have many .msh files to test it on to make sure it is backward compatible. Could you test it before I commit it to OpenFOAM-dev? fluent3DMeshToFoam.L (43,055 bytes) |
|
Ah, that was quick! I have tested the updated mesh converter on .msh files generated by Fluent 2019 R3, Fluent 2020 R1 and Fluent 2021 R2. I, unfortunately, don't have licenses for previous versions. The updated converter works for all meshes tested. |
|
Resolved by commit 318f78b660ba2aa8dc5f4ed1e7643997f47546e6 |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-03-08 13:34 | kasperbilde | New Issue | |
2022-03-08 13:34 | kasperbilde | File Added: fluent3DmeshToFoam_bug.msh | |
2022-03-08 13:49 | henry | Note Added: 0012520 | |
2022-03-08 13:59 | henry | Note Edited: 0012520 | View Revisions |
2022-03-08 14:24 | kasperbilde | Note Added: 0012521 | |
2022-03-08 14:38 | henry | Note Added: 0012522 | |
2022-03-08 14:47 | henry | Note Added: 0012523 | |
2022-03-08 18:32 | kasperbilde | File Added: fluent3DmeshToFoam_bug-2.msh | |
2022-03-08 18:32 | kasperbilde | Note Added: 0012524 | |
2022-03-08 21:32 | henry | File Added: fluent3DMeshToFoam.L | |
2022-03-08 21:32 | henry | Note Added: 0012525 | |
2022-03-09 09:45 | kasperbilde | Note Added: 0012526 | |
2022-03-09 11:14 | henry | Category | Bug => Feature |
2022-03-09 11:14 | henry | Assigned To | => henry |
2022-03-09 11:14 | henry | Status | new => resolved |
2022-03-09 11:14 | henry | Resolution | open => fixed |
2022-03-09 11:14 | henry | Fixed in Version | => dev |
2022-03-09 11:14 | henry | Note Added: 0012527 |