[Gmsh] Controlling Mesh Size in GUI

Geordie McBain gdmcbain at freeshell.org
Tue Dec 13 04:33:50 CET 2011


2011/12/13 Rudin, Andrew <Andrew.Rudin at austintexas.gov>:
> I'm new to Gmsh and I'm trying to learn the basics from the GUI interface.
> I'm trying to play with building a 2-D mesh on a simple box and then inspect
> the output as I change mesh parameters.  I'm trying to manipulate the
> average size of each triangle in the mesh, but the output is not changing.
> Here's some of the things I've tried.
>
> -Open 2.5 GUI
> -Add 4 points at [0,0], [100,0], [100,100], and [0, 100]
> -Draw lines between the points to create a square
> -Create planar surface from lines.
> -Create 2D mesh by going to Mesh->2D
>     -a basic mesh is created, average triange area appears to be about 1
> square units of a 10,000 square unit box
>
> Here's the problem.  Now I want to control the size and dicate
> every triangles area should be about 100 square units.
>
> -Set mesh 'element size factor' to 100 by going to
> Tools->Options->Mesh->Change element size factor to 100, then on the main
> Gmsh GUI go to Mesh->2D to rebuild
>
> After this the mesh does not seem to resize to have bigger triangles

Hello.  I'm sure there is a way to do this in the GUI, but I only
really use the script input myself; here's how to do it that way.

Running the attached size.geo produces 28 elements, then editing the
first line to reduce lc to 10 and then 1 produces instead 286 and
26900 elements.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: size.geo
Type: application/octet-stream
Size: 247 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20111213/32dd3cc3/attachment.geo>