[Gmsh] combine elements from different physicals
Ruth Vazquez Sabariego
ruth.sabariego at kuleuven.be
Mon Feb 13 10:27:40 CET 2017
Hi Nigel,
You can just create a new physical with the 3 of them together. The original individual ones:
> Physical Surface("wake") = {ps1};
> Physical Surface("fluid") = {ps2};
> Physical Surface("pmlxy") = {ps3};
and the one containing the three of them:
> Physical Surface(“wake+fluid+pmlxy") = {ps1,ps2,ps3};
HTH,
Ruth
—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa, EnergyVille
http://www.esat.kuleuven.be/electa
http://www.energyville.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info
> On 12 Feb 2017, at 16:42, Nigel Nunn <nnnunnn at gmail.com> wrote:
>
> 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!
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
More information about the gmsh
mailing list