When I build the intersection of two tubes and set one tube’s scale to 0.999 following your tutorial video, there are unexpected leaks. I think the reason may be that below facet is not closed.
You’re doing things correctly. One minor thing, that your probably know, just didn’t include in the video, is to delete the end cap of the vertical pipe that is inside of the tube.
It is very difficult to write a generic intersection algorithm that works on polygonized surfaces - I attach the code to demonstrate. It was my best effort, but indeed there are cases when it doesn’t give a good solution (hence the need toscale down to 0.999, for example).
Depending on the final bits of the pipe, these tiny holes can indeed appear. I ask for your understanding and to manually patch up the triangle holes (select three vertices, then ALT+v):
I tested and the simulation runs without leaks.
Back in the days, I loooked if this problem is alrady solved, or even better, implemented with some intersecting library, but I could only find 2D clipping solutions, so I wrote my own.
Hello Marton,
Thank you for your excellent work; Molflow+ is a wonderful software. I fully understand that writing a intersection algorithm is challenging, and the current implementation is already very perfect.
Following your suggestion, the leaks have disappeared. There is one small detail to note: the default normal direction of the facet generated by ALT+V might not always point towards the fluid domain. It’s important to check and swap the normal direction if it’s incorrect.
MolFlow treats geometries without any knowledge of the volume - that’s why facets are 1-sided by default, asking the user to decide where the pressure is expected from.
When you press ALT+v, Molflow executes a Graham scan, choosing the smallest convex shape that incorporates all vertices. In the example above, it would be vertices 73, 181 and 286, in this order. Then the facet is created, and the normal is determined by the left-hand rule: if your fingers follow the rotation, then your thumb is the normal direction.
Long story short, the facet orientation will simply depend on the ID of the vertices, and indeed, you have to check and swap if necessary. With the volume view enabled, it’s easy to spot misoriented facets, they have a different color (for example the top facet is facing outwards):
Thanks for the report and wishing a happy end of year to you as well,
Marton