[Gmsh] Apply "refine by splitting" to a single transfinite surface

Aaron Matthew Baier-Reinio ambaierreinio at edu.uwaterloo.ca
Thu Mar 7 04:35:49 CET 2019


Hello Max,


Thanks for the suggestions. Merging the meshes seems like it could work, although for a mesh with more complex geometry and many surfaces I imagine doing things that way would become very messy and complicated.

Essentially what I would like to do is refine the mesh in areas where I expect the flow will have a smaller length scale. Something like this:

[cid:43dd0a14-6dcd-42a1-9c30-7bfc9b1be26a]

The caveat is that I would like for the mesh to be structured. I've looked into size fields but my understanding is that they only work for unstructured meshes.

Likewise, I don't see any way I can accomplish this by increasing transfinite resolutions. If I increase the transfinite resolution of a given curve, then my understanding is that this will increase the number of elements on both sides of the curve - but I would only like to increase the number of elements on only one side of the curve.

In any case, I'll look into the mesh partitions and see what I can get anywhere with those.

Thanks,
Aaron



________________________________
From: Max Orok <morok at mevex.com>
Sent: March 6, 2019 11:20:52 AM
To: Aaron Matthew Baier-Reinio
Cc: gmsh at onelab.info
Subject: Re: [Gmsh] Apply "refine by splitting" to a single transfinite surface

Hello Aaron,

This is kind of a dumb way, but taking your question literally, I made two separate mesh files, refining just one and then merged them with these geo commands:

Merge "mesh1.msh";
Merge "mesh2.msh";

This method however discards the geometry. The weird part is at the boundary between the two; what should happen there for flow simulations, etc?

[image.png]

Personally, for a real problem I would either increase the transfinite resolution on the lines I wanted to be more refined or add a size field (area with a different mesh refinement). The documentation has more information on these options. Perhaps using mesh partitions could work as well? I'm not really sure what those are to be honest but it sounds like similar idea.

Sincerely,
Max



On Tue, Mar 5, 2019 at 4:06 PM Aaron Matthew Baier-Reinio <ambaierreinio at edu.uwaterloo.ca<mailto:ambaierreinio at edu.uwaterloo.ca>> wrote:
Hello,

In the following toy example I have two adjacent squares, which are meshed using the transfinite algorithm:

Point(1) = {0, 0, 0, 1.0};
Point(2) = {1, -0, 0, 1.0};
Point(3) = {1, 1, 0, 1.0};
Point(4) = {0, 2, 0, 1.0};
Point(5) = {0, 1, 0, 1.0};
Point(6) = {1, 2, 0, 1.0};

Line(1) = {4, 5};
Line(2) = {5, 1};
Line(3) = {1, 2};
Line(4) = {3, 2};
Line(5) = {3, 6};
Line(6) = {6, 4};
Line(7) = {5, 3};

Curve Loop(1) = {1, 7, 5, 6};
Plane Surface(1) = {1};
Curve Loop(2) = {7, 4, -3, -2};
Plane Surface(2) = {2};

Transfinite Curve {6, 5, 7, 1, 4, 3, 2} = 10 Using Progression 1;
Transfinite Surface {1};
Transfinite Surface {2};

When I press "refine by splitting", the number of elements in each square is doubled. I was wondering if there is a way to apply "refine by splitting" to the top square only, so that the number of elements in the top square is doubled, while the number of elements in the bottom square doesn't change. How might I go about doing this?


Thanks for the help,
Aaron


_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto:gmsh at onelab.info>
http://onelab.info/mailman/listinfo/gmsh


--
Max Orok
Contractor
www.mevex.com<http://www.mevex.com>

[https://docs.google.com/uc?export=download&id=1fHTIiW4OMUjQr1iOkspQ7wiEsxunoOs0&revid=0B6x5w-5zVaEjSkpwbm5oY29jbG1XMzJoYldXTmJpNGFtb3dVPQ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190307/efc94230/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18316 bytes
Desc: image.png
URL: <http://onelab.info/pipermail/gmsh/attachments/20190307/efc94230/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesh.jpg
Type: image/jpeg
Size: 40591 bytes
Desc: mesh.jpg
URL: <http://onelab.info/pipermail/gmsh/attachments/20190307/efc94230/attachment-0001.jpg>


More information about the gmsh mailing list