Fill up gap between two quad surface meshes

I have two meshes with face groups that are shells, so one inside the other. i want to conect one to another using a unstructured mesh, such as using netgen 3D. for this i have created a merged mesh of the two groups and tried to use netgen 3D on it by → edit → 3D → netgen 3D → compute.
but i am getting a ‘- “NETGEN_3D_4” failed. Error: Invalid input mesh. Some edges multiple times in surface mesh’
which i dont understand as if i check the compound mesh created it does not have double face elements and it does not have edge elements at all.
any input on this would be really helpfull.
here is a link for the file: FileSender as the weight was too large to publish it directly.

I do not understand as I recreate the same setup this time from two external faces of two different bodies, and here it works correctly where in my original problem, they are internal faces of the mesh. Outside of that i dont see any difference at all between the two setups. i even try reorienting the faces giving all possible combinations. or deleting the 1D elements in the second test (to see if it breaks the meshing step) but no, it works correctly.
here is the second setup:
Study2.hdf (390,3 KB)

here is a clipped look with the error sections:

also, the netgen 3D in the two separate shells computes correctly without issue.
if necessary here are the two shells that gives the issue, (it is the resulting two meshes of the first (and problematic) example i gave in the original post, one can import the med files and check them.
elementsSelectedOnlevel0To1Faces.tar.gz (125,5 KB)

I have tested with different refinements (as i first thought that it might be due to not have enought space to add the pyramids on the two sides) it was not the case, even with x2 refinement on the two surface mesh. i also tried with same size of quad for the two shells to have equal size pyramids same issue:


nothing looks to solve the problem.

Anyone that could help with this?

Hi Franco,

there are strange things here.

  1. I thought Netgen 3D without geometry could only mesh one shell domain. But the 2 shells from Study2.hdf are meshed, there is no hole in the domain.

  2. I sometimes manage to get a 3D mesh with your med files from the tar.gz, even without reorienting faces. But sometimes, there is the error you describe. I still haven’t found why. Please find below a study of the meshed domain, and a test script which works with or without reorienting the inner mesh faces.


Study_ok.zip (3,5 Mo)
test_netgen_ok.py (3,0 Ko)

To make you understand what you see in your screenshot, there is a pyramid layer done by SMESH from the quadrangles. The complementary triangles skin mesh is then sent to NETGEN to mesh the inside with tetraedra.

In your screenshot, the pyramids are generated in the two sides of the inside shell, some other are missing. I think that’s what makes it difficult for NETGEN to mesh.

Can you try to generate a 3D mesh from my hdf or script to see if it works for you too?

Christophe

1 Like

Hello Christophe,
I will check ASAP, but I don’t have my pc right now. Yes I realized that it generates the pyrs and then the tetra mesh, nevertheless it is strange as it is “failung” to generate te pyrs in some places. Outside of generating in the two sides of it, it is also leaving some holes… Which is strange.
With the approach in the script is it creating the mesh reliable? Or is it sometimes working and sometimes no?
I am asking as (as you can imagine) I am recreating somewhat of a snappyHexMesh on Salome, approach, but to rely on it i need to be able to connect different mesh refinements.

Hi Franco,

I still don’t know why it fails some times and succeeds other times. It will require further investigations.

Christophe

1 Like

Hello christophe,

i just tested the test_netgen_ok.py and there is something i do not understand.

form looking at the python script, it test a way, then re orient it one of the shells <if the first mesh computed correctly?> and then re orient it again and do it again? what i do not understand is that all the 3 meshes computed correctly from your test when i run the script, so, what i dont understand is: sometimes some of them will fail sometimes no? have you done something differently and now any possible combination works correctly? i dont see anything outside of that in your script (reason of this post and question).

Hello Franco,

in the script, I compute three meshes with different faces orientations. It gives slightly different cells. But it succeeds in all cases.

By changing the order of meshes in Concatenate, the mesh fails, as in the screenshot you posted, even when changing orientation.

test_netgen_pb.py (3,9 Ko)

Christophe

Oh, so the issue is the order of the concaténation?

If I concatenate internal +external It works but the other way around no? Interesting. Did not understood that with your previous posts.

Thanks for the clarification.

The issue is in pyramids generation. It is sensitive to meshes order in Concatenate.

For the record, I attach in QuadToTriaAdaptor.tgz (3,5 Mo) the pyramid meshes generated by QuadToTriaAdaptor in SALOME’s NETGENPLUGIN just before sending them to NETGEN 3D. With suffix _ok.med, the pyramids are well generated with the order of meshes in test_netgen_ok.py. With suffix _pb.med, the pyramids are generated also inside the hole and some are missing with the order of meshes in test_netgen_pb.py.

1 Like