Hi everyone!
I am working with a colleague who uses Fluent to solve Navier-Stokes and Hexpress to generate the mesh. And I need to be able to take the mesh and its solution to analyze with FEniCS.
The first problem we are having is that we can open the mesh. The program gives us two formats, .msh and .cgns.
I tried to open the .msh file with meshio.
I have two problems. If I read the original file, I get this error.
ValueError: could not convert string to float: '0.00783466630154))'
This is the last point of the mesh. If I chage this, by moving the two parentheses one space or changing lines, the command never ends.
This is a short mesh, in case it helps…
(1 "HEXPRESS 10.1")
(0 "Dimensionality :")
(2 3)
(0 "Total numbers of cells, faces, nodes :")
(12 (0 1 38 0 0))
(13 (0 1 b4 0 0))
(10 (0 1 4f 0 3))
(0 "Block: cubo")
(0 "Cells :")
(12 (1 1 38 1 4))
(0 "Nodes :")
(10 (2 1 4f 1 3)(
-0.000915954457192 -0.000527569364281 0.00472478482088
-3.59221014159e-12 -0.000562777812788 0.00470707629674
-4.69990659312e-21 -0.000623214592678 0.005
-0.000969460982795 -0.000556063892768 0.00499999999891
-5.79173661059e-12 9.08792715035e-12 0.00467281686198
-0.000970816157777 9.65876772251e-12 0.00470806897482
-0.00107720964193 7.99437222428e-12 0.00499999999824
4.78141938394e-20 8.09223300414e-12 0.005
3.59221016729e-12 -0.000562777812788 0.00529292370326
-0.000915954450918 -0.00052756936575 0.00527521517686
-0.000970816148649 7.70637134061e-12 0.00529193102167
5.79173660904e-12 9.08792716966e-12 0.00532718313802
-6.62787807525e-12 0.0005627778294 0.00470707629465
-0.000915954459771 0.000527569382292 0.00472478481803
-0.00096946098292 0.000556063907936 0.00499999999796
4.30404324329e-20 0.000623214607524 0.005
-0.000915954448595 0.000527569380546 0.00527521517778
6.62787817151e-12 0.0005627778294 0.00529292370535
0.000915954450918 -0.00052756936575 0.00472478482314
0.000969460982795 -0.000556063892768 0.00500000000109
0.000970816148649 7.70637137879e-12 0.00470806897833
0.00107720964193 7.99437227152e-12 0.00500000000176
0.000915954457192 -0.000527569364281 0.00527521517912
0.000970816157777 9.65876776069e-12 0.00529193102518
0.000915954448595 0.000527569380546 0.00472478482222
0.00096946098292 0.000556063907936 0.00500000000204
0.000915954459771 0.000527569382292 0.00527521518197
-0.00193025819715 -0.00109960826452 0.00444028540948
-3.58628800643e-12 -0.00132879861897 0.00432996688856
1.32691848414e-19 -0.0017972388346 0.005
-0.00218656589841 -0.00121908853579 0.00499999999897
-0.00219277730636 2.08018074456e-11 0.0043366776715
-2.89701914321e-11 2.09779912581e-11 0.00400502010201
-0.00294598261519 5.87988592885e-12 0.00499999999777
3.58628796764e-12 -0.00132879861897 0.00567003311144
-0.00193025819152 -0.00109960826616 0.00555971458844
2.89701914386e-11 2.0977991219e-11 0.00599497989799
-0.00219277729836 5.66573410723e-12 0.00566332231651
-2.83238066502e-11 0.00132879863111 0.00432996687764
-0.00193025820169 0.00109960828099 0.00444028539389
-0.00218656589857 0.00121908854648 0.00499999999779
9.80897484485e-20 0.0017972388442 0.005
-0.00193025818891 0.00109960827677 0.00555971458947
2.83238066641e-11 0.00132879863111 0.00567003312236
0.00193025819152 -0.00109960826616 0.00444028541156
0.00218656589841 -0.00121908853579 0.00500000000103
0.00219277729836 5.66573412629e-12 0.00433667768349
0.00294598261519 5.87988602175e-12 0.00500000000223
0.00193025819715 -0.00109960826452 0.00555971459052
0.00219277730636 2.080180756e-11 0.0056633223285
0.00193025818891 0.00109960827677 0.00444028541053
0.00218656589857 0.00121908854648 0.00500000000221
0.00193025820169 0.00109960828099 0.00555971460611
-0.00614874549586 -0.00232313228356 0.0038481820816
0 -0.00538889232211 0.00356770761269
-8.67361737988e-19 -0.00538889232211 0.005
-0.00614874549586 -0.00250730107519 0.005
-0.00614874549586 0 0.00360017698178
0 0 0
-0.00614874549586 0 0.005
0 -0.00538889232211 0.00643229238731
-0.00614874549586 -0.00232313228356 0.0061518179184
0 -8.67361737988e-19 0.01
-0.00614874549586 0 0.00639982301822
8.67361737988e-19 0.00538889232211 0.00356770761269
-0.00614874549586 0.00232313228356 0.0038481820816
-0.00614874549586 0.00250730107519 0.005
8.67361737988e-19 0.00538889232211 0.005
-0.00614874549586 0.00232313228356 0.0061518179184
0 0.00538889232211 0.00643229238731
0.00614874549586 -0.00232313228356 0.0038481820816
0.00614874549586 -0.00250730107519 0.005
0.00614874549586 0 0.00360017698178
0.00614874549586 0 0.005
0.00614874549586 -0.00232313228356 0.0061518179184
0.00614874549586 0 0.00639982301822
0.00614874549586 0.00232313228356 0.0038481820816
0.00614874549586 0.00250730107519 0.005
0.00614874549586 0.00232313228356 0.0061518179184))
(0 "Faces :")
(13 (4 1 9c 2 4)(
1 2 3 4 9 1
5 6 7 8 3 1
2 1 6 5 a 1
4 3 8 7 2 1
3 2 5 8 5 1
1 4 7 6 b 1
4 3 9 a c 2
8 7 b c 4 2
a 9 c b d 2
9 3 8 c 6 2
4 a b 7 e 2
d e f 10 f 3
5 6 e d 10 3
7 8 10 f 4 3
8 5 d 10 7 3
6 7 f e 11 3
10 f 11 12 12 4
b c 12 11 13 4
c 8 10 12 8 4
7 b 11 f 14 4
2 13 14 3 15 5
15 5 8 16 7 5
13 2 5 15 16 5
3 14 16 8 6 5
14 13 15 16 17 5
3 14 17 9 18 6
16 8 c 18 8 6
9 17 18 c 19 6
17 14 16 18 1a 6
19 d 10 1a 1b 7
15 5 d 19 1c 7
8 16 1a 10 8 7
16 15 19 1a 1d 7
1a 10 12 1b 1e 8
c 18 1b 12 1f 8
18 16 1a 1b 20 8
1c 1d 1e 1f 21 9
1c 1d 2 1 9 a
1f 1e 3 4 c 9
1d 1e 3 2 9 15
1c 1f 4 1 b 9
1d 1c 20 21 22 a
20 21 5 6 a 10
1c 20 6 1 a b
1d 21 5 2 16 a
1c 1f 22 20 23 b
20 22 7 6 11 b
1f 22 7 4 b e
1f 1e 23 24 24 c
24 23 9 a d c
1e 23 9 3 c 18
1f 24 a 4 e c
24 23 25 26 25 d
26 25 c b 13 d
23 25 c 9 d 19
24 26 b a e d
1f 24 26 22 26 e
22 26 b 7 14 e
27 28 29 2a 27 f
28 27 d e 10 f
29 2a 10 f f 12
28 29 f e f 11
27 2a 10 d 1b f
21 20 28 27 28 10
20 28 e 6 10 11
21 27 d 5 1c 10
20 22 29 28 29 11
22 29 f 7 11 14
2a 29 2b 2c 2a 12
2b 2c 12 11 12 13
29 2b 11 f 12 14
2a 2c 12 10 1e 12
26 25 2c 2b 2b 13
25 2c 12 c 13 1f
26 2b 11 b 14 13
22 26 2b 29 2c 14
1d 2d 2e 1e 2d 15
1d 2d 13 2 15 16
1e 2e 14 3 18 15
2d 2e 14 13 15 17
2d 1d 21 2f 2e 16
21 2f 15 5 16 1c
2d 2f 15 13 17 16
2e 2d 2f 30 2f 17
2f 30 16 15 17 1d
2e 30 16 14 1a 17
1e 2e 31 23 30 18
23 31 17 9 19 18
2e 31 17 14 18 1a
23 31 32 25 31 19
25 32 18 c 1f 19
31 32 18 17 19 1a
31 2e 30 32 32 1a
30 32 18 16 1a 20
33 27 2a 34 33 1b
27 33 19 d 1c 1b
2a 34 1a 10 1b 1e
33 34 1a 19 1d 1b
2f 21 27 33 34 1c
2f 33 19 15 1d 1c
30 2f 33 34 35 1d
30 34 1a 16 20 1d
34 2a 2c 35 36 1e
2c 35 1b 12 1e 1f
34 35 1b 1a 20 1e
25 32 35 2c 37 1f
32 35 1b 18 1f 20
32 30 34 35 38 20
36 37 1d 1c 21 22
39 38 1e 1f 24 21
37 38 1e 1d 21 2d
36 39 1f 1c 23 21
3a 3b 21 20 22 28
36 3a 20 1c 22 23
37 3b 21 1d 2e 22
3a 3c 22 20 29 23
39 3c 22 1f 23 26
3e 3d 23 24 25 24
38 3d 23 1e 24 30
39 3e 24 1f 26 24
40 3f 25 26 2b 25
3d 3f 25 23 25 31
3e 40 26 24 26 25
3c 40 26 22 2c 26
42 41 27 28 28 27
43 44 2a 29 27 2a
42 43 29 28 27 29
41 44 2a 27 33 27
3a 42 28 20 28 29
3b 41 27 21 34 28
3c 43 29 22 29 2c
45 46 2c 2b 2a 2b
43 45 2b 29 2a 2c
44 46 2c 2a 36 2a
3f 46 2c 25 2b 37
40 45 2b 26 2c 2b
37 47 2d 1d 2d 2e
38 48 2e 1e 30 2d
47 48 2e 2d 2d 2f
3b 49 2f 21 2e 34
47 49 2f 2d 2f 2e
49 4a 30 2f 2f 35
48 4a 30 2e 32 2f
3d 4b 31 23 31 30
48 4b 31 2e 30 32
3f 4c 32 25 37 31
4b 4c 32 31 31 32
4a 4c 32 30 32 38
41 4d 33 27 34 33
44 4e 34 2a 33 36
4d 4e 34 33 35 33
49 4d 33 2f 35 34
4a 4e 34 30 38 35
46 4f 35 2c 36 37
4e 4f 35 34 38 36
4c 4f 35 32 37 38))
(13 (5 9d a0 3 4)(
4a 49 47 48 2f 0
4c 4a 48 4b 32 0
4e 4d 49 4a 35 0
4f 4e 4a 4c 38 0))
(13 (6 a1 a4 3 4)(
44 43 42 41 27 0
46 45 43 44 2a 0
4e 44 41 4d 33 0
4f 46 44 4e 36 0))
(13 (7 a5 a8 3 4)(
3a 3c 39 36 23 0
3c 40 3e 39 26 0
42 43 3c 3a 29 0
43 45 40 3c 2c 0))
(13 (8 a9 ac 3 4)(
39 38 37 36 21 0
3e 3d 38 39 24 0
38 48 47 37 2d 0
3d 4b 48 38 30 0))
(13 (9 ad b0 3 4)(
40 3f 3d 3e 25 0
45 46 3f 40 2b 0
3f 4c 4b 3d 31 0
46 4f 4c 3f 37 0))
(13 (a b1 b4 3 4)(
3b 3a 36 37 22 0
41 42 3a 3b 28 0
49 3b 37 47 2e 0
4d 41 3b 49 34 0))
(0 "Face tree :")
(0 "Other :")
(39 (3 parent parent) ())
(39 (4 interior interior) ())
(39 (5 wall cubo_group_0) ())
(39 (6 wall cubo_group_1) ())
(39 (7 wall cubo_group_2) ())
(39 (8 wall cubo_group_3) ())
(39 (9 wall cubo_group_4) ())
(39 (10 wall cubo_group_5) ())
I have the files, but I cant post here. I can send if anyone need.
These are other formats Hexprees export
Does anyone know how to solve?
Thank you so much!