Home › Forum › SOFA › Using SOFA › [SOLVED] Mapping issue between 2 meshes
Tagged: 64_bits, cavity, mapping, Mesh, Plugin_SoftRobots, pneunet, SOFA_1906, Windows_10
- This topic has 6 replies, 3 voices, and was last updated 4 years ago by twxu.
-
AuthorPosts
-
25 September 2020 at 01:42 #17209twxuBlocked
Hi,
I’m working on a simulation with a pneunet, which has a cavity that is pressurized.
I am experiencing some issues due to mapping. Specifically, it seems that the nodes of the “cavity” mesh are being mapped to incorrect nodes in the surrounding pneunet mesh (so pressure is being applied to the wrong pneunet nodes as the cavity pressurizes).
I’ve found an example scene from the SoftRobots plugin which has the same setup, but does not have this mapping issue (see images below).
Image order:
1. Poor mapping in my scene
2. Good mapping in example scene
3. Scene setup with cavity mesh (green) and surrounding pneunet mesh (blue), from SoftRobots example
(link to images in case they don’t appear: https://imgur.com/a/4M0SMIr)Do the mesh nodes of the cavity and the surrounding pneunet have to align perfectly to stop the mapping from spreading to outside/nearby nodes? If so, is there a good way to create the meshes so that their nodes/elements align?
Any guidance is appreciated!
5 October 2020 at 22:29 #17282HugoKeymasterDear @twxu
Thank you for your message.
The nodes of the cavity do not have to be aligned with the surrounding pneunet. The fact is that a correspondance will be sought for each node of the cavity with regards to the surrounding element (here, sought in the surrounding tetrahedron in the pneunet mesh).If your configuration 1. not working properly?
If not, could you elaborate on the issue?Thanks, best,
Hugo
6 October 2020 at 18:52 #17317twxuBlockedHi @Hugo,
Thanks so much for replying.
Basically I am experiencing 2 issues with my scene:First, the cavity is able to inflate and cause the pneunet to bend, but the pneunet does not bend straight downward. It “twists” slightly (i.e. bends in the Z-direction into the screen) which is unexpected. I suspect that this is because the cavity mapping is applying pressure to pneunet nodes that are not touching the cavity mesh.
Second, I am probing forces on nodes on the underside of the pneunet (using Monitor), but the forces do not behave as expected.
(Forces are probed as the cavity pressurizes. The pneunet bends, then stops as max pressure is reached.)When the probed pneunet nodes are being mapped to by cavity nodes, the forces increase then settle to nonzero values (unexpected).
Graph: https://imgur.com/Z5pdT0CWhen the probed nodes are not being mapped to by cavity nodes, the forces increase then settle to zero (as expected).
Graph: https://imgur.com/hGxg7C3(The pneunet nodes that I’m interested in are all being mapped to by cavity nodes.)
To summarize:
1. The pneunet does not bend straight downward; it “twists” and bends out of the plane.
2. Probed forces on pneunet nodes of interest do not eventually settle to zero as expected.It seems that both of these issues are caused when cavity nodes get mapped to pneunet nodes that are not directly touching the cavity mesh. Is there a way to constrain the cavity mapping somehow so that this does not occur?
10 October 2020 at 00:03 #17341HugoKeymasterDear @twxu
Interesting, I do not know in detail the SoftRobot tutorial. But I think I can already guide you a bit.
1. since you are using a mesh for the cavity which not fitting the mechanical mesh anymore (no exact correspondence between mesh vertices), the mapping will compute the associated points in the finger mesh around each point of the cavity mesh (and their barycentric coordinates). If the finger mesh is oriented (by this, I mean tetrahedra are all oriented in the same direction) then you can have a slight twisting effect due to the pressure constraint mapped into these oriented tets. To decrease this effect, you should use a finer mesh or a non-oriented mesh (for the finger).
2. This, I guess, could be due to the dissipative integration scheme. Especially the Rayleigh damping added. Could you try setting them to zero ?
Best
Hugo
21 October 2020 at 22:57 #17437twxuBlockedHi @Hugo,
Apologies for the delayed response.
1. I’ve now implemented a mesh where the nodes of the two objects (pneunet body, cavity) align, which has largely solved this twisting issue
2. I’ve tested with and without nonzero Rayleigh damping, and in both cases the forces stabilize to zero over time (which is good).
By the way, my understanding was that dissipative integration schemes can cause signals to go to zero (when the signal normally should not go to zero). In this case I believe it’s the opposite: I would expect the forces to go to zero as the pneunet reaches maximum pressure and remains motionless. Are there cases when dissipative integration schemes cause signals to not go to zero, when they should normally go to zero?
In any case I will mark this topic as resolved; thanks for your help Hugo!
9 November 2020 at 14:32 #17618BenjaminBlockedHi @twxu,
I also have the same problem as you. Can I ask if it is possible to tell me how to align the mesh from two different object?
Regards,
Ben9 November 2020 at 15:57 #17619twxuBlockedHi @Benjamin,
I used Gmsh. It worked fairly well for when one object was completely enclosed by the other object; I’m not sure how well it’d work if the objects are only partly in contact.
I opened the STL file of the outer object in Gmsh, partitioned it into different surfaces, then deleted the outer surface (leaving just the enclosed inner surface). So that inner surface was exported as a cavity mesh that aligned with the outer mesh.
Hope that helps!
-
AuthorPosts
- You must be logged in to reply to this topic.