[Gmsh] Defining dummy geometry for mesh refinement

Nathan RICKS Nathan.James.Ricks at vub.be
Tue Aug 14 17:37:48 CEST 2018


Hello,


I have quite a simple problem, however I can't find in the tutorials/elsewhere how to achieve what I want. I want to define some dummy geometry in order to control the mesh size. I've constructed a very simple example to show what I mean:


//

// Gmsh project created on Tue Aug 14 17:02:15 2018

// Define domain - square

L1 = 5;

domain_lc = 1;

Point(1) = {-L1, L1, 0, domain_lc};

Point(2) = {-L1, -L1, 0, domain_lc};

Point(3) = {L1, -L1, 0, domain_lc};

Point(4) = {L1, L1, 0, domain_lc};

Line(1) = {1:4,1};

Line Loop(1) = {1};

// Define object in flow - circle

L2 = 0.5;

boundary_lc = 0.05;

Point(5) = {0, 0, 0, boundary_lc};

Point(6) = {L2, 0, 0, boundary_lc};

Point(7) = {-L2, 0, 0, boundary_lc};

Circle(2) = {7,5,6};

Circle(3) = {6,5,7};

Line Loop(2) = {2, 3};

Plane Surface(1) = {1, 2};

// Define dummy geometry for refined area - trapezium

refine1_lc = 0.1;

Point(8) = {-1, 0.7, 0, refine1_lc};

Point(9) = {2.5, 1.5, 0, refine1_lc};

Point(10) = {2.5, -1.5, 0, refine1_lc};

Point(11) = {-1, -0.7, 0, refine1_lc};

Line(4) = {8:11,8};

Line Loop(3) = {4};

//

I simply want to enforce the "refined" element size to the trapezium geometry that encloses the circle. So the result would be elements of boundary_lc size on the circle wall, and increase in the normal (linear) way to the refine1_lc size at the dummy geometry, then continue to the outer domain element size.

How do I include the dummy geometry in the mesh definition? I'm aware of the box field for example, however I'd like more complex shaped refinement, and the more gradual change in element size.

Any help would be greatly appreciated.
Kind Regards,

Nathan Ricks
Vrije Universiteit Brussel



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180814/f4c7e581/attachment.html>


More information about the gmsh mailing list