Codim-IPC
Codim-IPC copied to clipboard
Export physical parameters like contact forces
Thank you for this amazing piece of software and for open sourcing it.
I'm planning to use your software in an engineering research context. After playing around with it for a bit I was wondering if there is any way to get contact forces and other values like torques, internal foces, positions and velocities resulting from the simulation with the python bindings. I guess latter two can be calculated from the resulting obj files.
Thanks for your interest in our work! Unfortunately we didn't expose these to the python binding. But all these information should be able to be obtained via certain C++ functions. For example, the contact forces can be obtained by first computing the barrier gradient using
Compute_IncPotential_Gradient()
in
https://github.com/ipc-sim/Codim-IPC/blob/main/Library/FEM/Energy/IPC_ENERGY.h
and then divide it by -dt^2
.