Transform 3D unstructured mesh into partially structured 3D mesh from .msh file
Hi all,
I am investigating a backward facing step periodic in the z direction. I have a 3D fully unstructured mesh (only .msh) and I would like to suppress all the surfaces except one of the periodic face to extrude it in the z direction and obtain a mesh that is 2D unstructured (XY plane) and 1D structured (in the z direction).
I do not manage to do this starting from a 3D mesh, here is my code `2D_backstep_extruded.geo`:
Merge "3D_backstep.msh";
// Remove all the surface except those corresponding to the XY plane at Z=0
Recursive Delete {
Surface{18}; Surface{21}; Surface{27}; Surface{17}; Surface{25}; Surface{9}; Surface{8}; Surface{15}; Surface{20}; Surface{23}; Surface{16}; Surface{12}; Surface{24}; Surface{13}; Surface{26}; Surface{22}; Surface{19}; Surface{14}; Surface{11}; Surface{10};
}
CreateTopology;
Extrude {0, 0, 1} {
Surface{2}; Surface{1}; Surface{6}; Surface{7}; Surface{4}; Layers {5}; Recombine;
}
When I run the `2D_backstep_extruded.geo`, GMSH is stuck at the reading mesh step. If I remove the recursive delete, the reading is OK but the extrusion leads to errors of the type:
Error : Could not find extruded node (,,) in surface X
Notice that if I start from a random 2D mesh it works well:
Merge "random_2D_backstep.msh";n
// Nothing to remove since the mesh is already 2D
CreateTopology;
Extrude {0, 0, 1} {
Surface{2}; Surface{1}; Surface{6}; Surface{7}; Surface{4}; Layers {5}; Recombine;
}
Can you help me to solve my issue? One possibility could be to suppress the unwanted surfaces of the 3D mesh and save the obtained 2D mesh (I tried but GMSH keep all the cells from the 3D mesh and I did not manage to obtain the 2D_backstep.msh from the 3D_backstep.msh).
Thank you very much!