Meshing a thin membrane?

Hello,

I am trying to mesh a very thin membrane and either get negative Jacobians (for thicker bodies) or the volume does not get meshed at all (this case). It is worth noting that the membrane has two circles on its top (loading regions), and those circles have quite different size, too.

The code below generates the basic geometry (1/4 of the domain because of symmetry). A few lines are added on the edges of the membrane to decompose the geometry.

brick x 0.5 y 0.5 z 0.002
move Volume 1  location 0.25 0.25 0.001 include_merged 
create vertex 0 0.0007 0.002 color
create vertex 0.0007 0 0.002 color
create surface circle center vertex 4 10 9
imprint body all
delete body 2
delete vertex 9

create vertex 0 0.0007 0 color 
create vertex 0.0007 0 0 color 

create surface vertex 7 16 11 4 
create surface vertex 15 7 4 12 

imprint body all 

delete body 4
delete body 3

create vertex 0 0.4 0.002 color
create vertex 0.4 0 0.002 color
create surface circle center vertex 4 26 25
imprint body all
delete body 5
delete vertex 25

create vertex 0 0.4 0 color 
create vertex 0.4 0 0 color 

create surface vertex 7 34 27 4 
create surface vertex 7 33 28 4

imprint body all 

delete body 6
delete body 7

I need to find a way to mesh this domain with quadrangles in both efficient and robust way since the code is going to be parametrized.

Some help would be much appreciated.

Without setting a mesh scheme or sizing, Trelis seems to be meshing the surfaces in an order that is giving a bad mesh.

After running your script, try meshing the three surfaces on the top first in this order:

mesh surf 19
mesh surf 20
mesh surf 9
mesh vol all
quality volume all scaled jacobian global draw mesh

The scaled Jacobian values are between 0.721 and 1.00

Thank you, it worked. It also works with setting sizing.