How to extract model strain energy and kinetic energy #2702
-
|
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Hi, regarding accessing the matrices: it is now possible to export the global system matrix (https://github.com/sofa-framework/sofa/blob/master/applications/plugins/SofaMatrix/examples/GlobalSystemMatrixExporter.scn). Both mass and stiffness matrices are merged into a single matrix. If you really need to access both matrices distinctly, you'll have to wait. This is in the roadmap and planned for next release. Regarding accessing the energy: masses have the function |
Beta Was this translation helpful? Give feedback.
-
|
HI @alxbilger, sorry to revive an old thread. Googling brought me here so I thought others with my question would end up here as well. Do you know if there is any way to access kinetic and potential energy from a SofaPython scene ? If none is available, I guess one will have to go the route described in this other thread : #2601 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.

Hi,
regarding accessing the matrices: it is now possible to export the global system matrix (https://github.com/sofa-framework/sofa/blob/master/applications/plugins/SofaMatrix/examples/GlobalSystemMatrixExporter.scn). Both mass and stiffness matrices are merged into a single matrix. If you really need to access both matrices distinctly, you'll have to wait. This is in the roadmap and planned for next release.
Regarding accessing the energy: masses have the function
getKineticEnergyand force fields have the functiongetPotentialEnergy. I don't guarantee that all force fields and masses implement correctly those two functions. You can display a graph of the evolution of each energy in a Node: