Weird mesh behaviour

Hi everybody!
I noticed a problem regarding the generation of the mesh inside the borders of my geometry system. i have to define a series of “chained hexagons” in order to simulate a sextant of a nuclear reactor core.

Of coure, in order to create the mesh i can not superimpose the borders of the different hexagons, so i had to define different “semi-hexagon” (some of them misses the lower borders and others only the lateral one and so on…).

At this point i tried to generate the mesh, with the aim to get a result as represented in the immagine of the singular meshed hexagon, and to increase the mesh density by usign the comand “trunc”.

As concern the singular hexagon it was sufficient to use the command “buildmesh(cc(nn))”, where cc is the overall border name, and nn is the number of element per border setted equal to 1; by doing so i obtain an meshed heaxagon with 6 triangles inside, and by usign the comand “trunc” same but with 24 triangles inside.

Unfortunally when i use the same procedure for the whole sextant, the meshes does not behave as i thought. As you can see from the linked immagines, some hexagon has the right mesh distribution, while other don’t. I have also noticed that, this behaviour could disappear or even get worse by changing the whole size of the sextant. In fact for the smaller one, the mesh is perfect, while for the bigger one it presents the “inadeguates” hexagones.
Screenshot_20221117_172646

Can you suggest me somthing in order to fix this problem without changing the whole code? maybe some functions that could impone at the mesher to beahaves in the same way for all the hexagones?

Thank you!
Christian, PoliTO

Dear Christian,

To guarantee that the cells vertices are located in the exact location you are looking for, the ideal choice is to bypass the use of the buildmesh command and substitute it with the command “triangulate”.
This command is generating a mesh by means of a Delauny algorithm using the points you are providing as cell verices.
The way in which you pass those vertices is by means of a simple text file in which the first column represents the x-coordinate and the second one the y-coordinate.

In your case using an external script (matlab/python/fortran or whatever you want :wink: ), you should be able to reconstruct the location of the various hexagons vertices to insert them into a suitable file. Just be careful not to duplicate the same point within the file… I have never tried to do that, but it seems not to be a great idea :smiley: !

I hope this could help you!

ciao

Marco

1 Like