<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm having difficulty exporting a .msh ASCII file (format version 2) that includes the physical entity tags for elements. I've created a box volume and have assigned the 6 surfaces and volume to separate physical groups. I'd like to export the mesh as a .msh ASCII file (format version 2) as an input for a finite element program. As such, I am using the physical groups to identify regions where boundary conditions apply and where material types are assigned. I'm using gmsh version 4.0.7 Win64 on Windows 10.</div><div><br></div><div>The .geo commands for the box are as follows:</div><div><br></div><div><div>SetFactory("OpenCASCADE");</div><div>Box(1) = {0, 0, 0, 10, 10, 5};</div><div>Physical Surface("DS") = {2};<br></div><div>Physical Surface("US") = {1};<br></div><div>Physical Volume("Solid") = {1};<br></div><div>Physical Surface("Other Surface") = {3, 5, 6, 4};<br></div></div><div><br></div><div>I created 1d, 2d, and 3d meshes using the GUI. When I export this to a .msh file (format version 2), the elements are exported with their elementary tags rather than their physical tags. For example, here is the line from the .msh file for element 500 which falls on elementary surface 6 and physical surface 4: </div><div>500 2 2 0 6 15 247 237<br></div><div><br></div><div>Three-dimensional elements are similarly exported using their elementary surface tags. Here is a 4-node tetrahedron within elementary volume 1 and physical volume 5:</div><div>924 4 2 0 1 169 306 196 293<br></div><div><br></div><div>Based on the documentation, I expected the first tag after the number of tags to be the physical entity tag:</div><div><br></div><div><dt style="line-height:1.35;color:rgb(37,37,37);font-family:helvetica,sans-serif;font-size:15.2px"><code style="line-height:1.35;font-size:11.7325px"><var style="line-height:1.35">number-of-tags</var></code></dt><dd style="line-height:1.35;color:rgb(37,37,37);font-family:helvetica,sans-serif;font-size:15.2px"><p style="line-height:1.35;margin:0.8em 0px">gives the number of integer tags that follow for the <var style="line-height:1.35">n</var>-th element. By default, the first <var style="line-height:1.35">tag</var> is the tag of the physical entity to which the element belongs; the second is the tag of the elementary geometrical entity to which the element belongs;...</p></dd></div><div><br></div><div>However, I'm receiving a zero tag for all elements. Am I misunderstanding the documentation or is this the intended behavior? Is there a way to export a .msh with the physical entity tags or do I need to go about this in a different way?</div><div><br></div><div>Best regards,</div><div>Robert Jaeger</div></div></div></div></div>