[Gmsh] combine elements from different physicals

Nigel Nunn nnnunnn at gmail.com
Sun Feb 12 16:42:13 CET 2017


Hi - a solver I'm testing requires all that elements in a gmsh .msh belong
to a single elementary/physical region, e.g. "fluid".  For another solver,
we use different regions to help adjust mesh density ("wake", "fluid",
"pml"}. For example, if we specify Physicals like this:

Physical Surface("wake") = {ps1};
Physical Surface("fluid") = {ps2};
Physical Surface("pmlxy") = {ps3};

then in the mesh file, we get a PhysicalNames section like this:

$PhysicalNames
7
1 1 "Wall"
1 2 "Slip"
1 3 "Inflow"
1 4 "Outflow"
2 5 "wake"
2 6 "fluid"
2 7 "pmlxy"
$EndPhysicalNames

In the $Elements section, Physicals {5,6,7} get tags like this:

2 2 5 530
2 2 6 531
2 2 7 532

What we want is to merge all three of these 2d ("Plane Surface") regions
into a single "fluid" physical, like this:

$PhysicalNames
5
1 1 "Wall"
1 2 "Slip"
1 3 "Inflow"
1 4 "Outflow"
2 5 "fluid"
$EndPhysicalNames

We can do this manually by replacing tags for physicals 6 and 7 with tags
for physical 5; just wondering if gmsh has a command or plugin to do this?

- thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170213/183e58c7/attachment.html>


More information about the gmsh mailing list