Mesh scale

Asked by Bruno Martins

Hi,

I have one question concerning the meshing process. Currently using escript 3.3 running on Ubuntu 10.04. Gmsh version 2.4.2

I generate a (0.1x0.1)um square using the sequence below:

width=0.1*Micro*m
depth=0.1*Micro*m
p0=Point(0.0,0.0,0.0)
p1=Point(0.0,depth,0.0)
p2=Point(width,depth,0.0)
p3=Point(width,0.0,0.0)
l0=Line(p0,p1)
l1=Line(p1,p2)
l2=Line(p2,p3)
l3=Line(p3,p0)
c1=CurveLoop(l0,l1,l2,l3)
rec1=PlaneSurface(c1)
ps1=PropertySet("region1",rec1)
model=Design(dim=2,element_size=0.1*depth,keep_files=True)
model.addItems(rec1)
model.addItems(ps1)
model.setMeshFileName("domain.msh")
domain=MakeDomain(model)

Gmsh gives me only 4 vertices 8 elements:

Info : Running 'gmsh -format msh -2 -order 1 -v 3 -o domain.msh /tmp/tmpeUjjY0.geo'
Info : Meshing 1D...
Info : Meshing curve 5 (Line)
Info : Meshing curve 6 (Line)
Info : Meshing curve 7 (Line)
Info : Meshing curve 8 (Line)
Info : Mesh 1D complete (0 s)
Info : Meshing 2D...
Info : Meshing surface 10 (Plane, MeshAdapt)
Info : Mesh 2D complete (0 s)
Info : 4 vertices 8 elements

If I change the parameters to:

width=1.
depth=1.
element_size=0.1

I keep the same relation between geometry and mesh size, but this time I get 117 vertices 236 elements, which is what I would expect for this element size. It looks like that the mesh generator is not scaling down with the element_size variable. This leads me to the question: How can I scale down the mesh in the first case in order to get the same number of vertices and elements that I get in the second case?

Thank you,

Bruno.

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Lutz Gross
Solved:
Last query:
Last reply:
Revision history for this message
Best Lutz Gross (l-gross) said :
#1

Is is your case Micro*m = 1? In any case there is a problem in pycad when it comes to domains on the scale of 10^-6 or so as the script creator uses %f for point coordinates. I hope this is fixed now.

I can also confirm that gmsh meshing is not necessarily reproducible in the sense that - as you did - changing the scale of the entire domain will give you the same connectivity. I am not sure why this is the case. It is a question the gmsh guys need to answer.

Revision history for this message
Bruno Martins (bvc-martins) said :
#2

Thanks Lutz Gross, that solved my question.

Revision history for this message
Bruno Martins (bvc-martins) said :
#3

I will rescale the geometry in order to have 1 micron=1 so I avoid problems with gmsh.