How to build a structured mesh?

Hi everyone!
Can you suggest to me a way for having a structured mesh for my geometry?
The system’s geometry is a honeycomb-like shape.
Initilly i tried with just one hexagon: I have made a first mesh with the command “buildmesh” with just one element for border and I have obtained a good structured mesh (as you can see, there are 6 triangles inside one singular hexagon) then, in order the increase the number of elements while still hold this kind of structure, I have used the comand “trunc”.
Unfortunally, if I try to use the same procedure for a more-complex geometry, the first mesh generation (the one that should have only 6 triangles elements inside a singular hexagon) have this weird behaviour (see linked immagine). Some hexagones have a wrong element distribution, with a bigger center triangle.

Can you help me, please?
Thank you in advance!

I recognize that this doesn’t answer your question, but why is it that you want a structured mesh?

In an effort to provide a more constructive answer, might I suggest you try using the adaptmesh function to control the tolerated aspect ratios / vertex angles…

In few words, i should reproduce a result generated by another softwar that use this kind of structured mesh.

Thank you for your answer! I arleady have tried to modify “manually” the mesh parameters, unfortunally this is the best result reached.

Even if hmin is fixed, some elements has smaller lenght sides, same problem even when “thetamax” is defined!

But shouldn’t your results be mesh-independent?

I generally use GMSH to generate meshes and import them into FreeFEM. GMSH may offer more precise control of angles/aspect ratios

Yes it should be grid-idependet, that’s why once the coarse mesh is created correctly, I would increase the elements number by usign “trunc” comand!

Thank you for your Answer! I will try GMSH!

1 Like