Code: Select all
Physical Surface (1) = {1};
Physical Surface (2) = {2};
Physical Surface (3) = {3};
....
Physical Surface (165) = {165};
Physical Surface (166) = {166};
Physical Surface (167) = {167};
Physical Volume (1) = {1};
Physical Volume (2) = {2};
Physical Volume (3) = {3};
....
Physical Volume (26) = {26};
Physical Volume (27) = {27};
Physical Volume (28) = {28};
However, for Salome, there does not seem to be possible to have the separate indices for faces and bodies -- there can only be groups. In the Salome meshing script, I'm basically finding all solids and all faces, and then declaring each one as a group:
Code: Select all
demo_brep_1 = geompy.Import("<my file path>", "BREP")
geompy.addToStudy( demo_brep_1, "demo.brep_1" )
solids = geompy.SubShapeAll(demo_brep_1, geompy.ShapeType["SOLID"])
faces = geompy.SubShapeAll(demo_brep_1, geompy.ShapeType["FACE"])
#.... create study, do meshing ....
for idx in range(len(solids)):
sld = solids[idx]
sld_g = Mesh_1.Group(sld)
for idx in range(len(faces)) :
face = faces[idx]
face_g = Mesh_1.Group(face)
Code: Select all
Reading group 1 with 35404 entities: sld_0
Reading group 2 with 13001 entities: sld_1
Reading group 3 with 11 entities: sld_2
...
Reading group 26 with 270 entities: sld_25
Reading group 27 with 530 entities: sld_26
Reading group 28 with 3584 entities: sld_27
Reading group 29 with 62 entities: face_0
Reading group 30 with 62 entities: face_1
Reading group 31 with 90 entities: face_2
...
Reading group 193 with 52 entities: face_164
Reading group 194 with 90 entities: face_165
Reading group 195 with 213 entities: face_166
Code: Select all
Boundary Condition 1
Target Boundaries(1) = 1 <----
Name = "Airbox Boundary 1"
Temperature = 25
End
Code: Select all
Boundary Condition 1
Target Boundaries(1) = 29 <----
Name = "Airbox Boundary 1"
Temperature = 25
End
Is there a way to have the physical faces numbered starting from 1? Alternatively, are there any additional parameters that should be passed to ElmerGrid to achieve this?
As I've mentioned, the differences between the results with Gmsh and Salome are quite large for similar sized meshes, about 25% -- and this indexing of faces seems to be the only difference between the two simulations.
Thanks