Parallelising/speeding up flexcomp/finite element simulations of large tetrahedral meshes? #2601
Unanswered
kurtenkera
asked this question in
Asking for Help
Replies: 1 comment
-
Hi, it's likely that they will be added at some point for MJWarp but not MJX, although MJWarp will be integrated into MJX so you will be able to use the MJX API to run parallelized flexcomp via the MJWarp backend. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Intro
Hi,
I use MuJoCo for finite-element simulations of soft bodies via its
flexcomp
capability.My setup
I am using the Python bindings, and MuJoCo version 3.3.0.
My question
I am interested in simulating this mesh seen below as a
flexcomp
object in MuJoCo. Obviously, to speed up simulation times I am interested in reducing the number of elements in my mesh; however, due to the intricate topology/shape of the mesh, the best I can currently do is represent this mesh as a 37,815 element/12,817 node tetrahedral mesh. I have found that reducing the number of elements any lower can result in a mesh whose topology is too dissimilar from the target topology seen below.I have performed some basic tests/simulations of tet-meshes with: 91 elements (51 nodes), 595 elements (225 nodes), 3770 elements (927 nodes) and 37815 elements (12,817 nodes) (my target mesh above). Each simulation time ran for 3 seconds, and involved simply dropping a soft body, and a timestep of 0.00001 was used for each. These were my results:
91 elements: wall-time = 12.1s; avg
mj_step
time: 0.00003s595 elements: wall-time = 54.1s; avg
mj_step
time: 0.0002s3770 elements: wall-time = 220.1s; avg
mj_step
time: 0.0007sWhen I tried simulating the 37815 element tet-mesh, I had to decrease my timestep to 0.000001 in order to not diverge. As expected, I couldn't even simulate this mesh for 3 seconds within a wall-time of 30 minutes (I gave up after 30 minutes).
Here is my question: Is MuJoCo planning on parallelising or speeding up finite-element simulations of large tetrahedral meshes/
flexcomp
objects in the near future? As far as I'm aware, MuJoCo-WARP currently does not offer GPU-optimised simulations forflexcomp
objects, and the same is true for MJX. Will finite-element simulations of deformable tet-meshes remain single-threaded in MuJoCo for the near future?NOTE: I should emphasise that I cannot use the fast
trilinear
option as this doesn't produce the desired deformation for my purposes.Minimal model and/or code that explain my question
I've included my 4 tet-meshes in the following zip folder, as well as a relevant XML file for anyone interested: test_large_meshes.zip
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions