Skip to content

Comfusion about implementation of XPBD FEM constraint #137

Answered by janbender
blacksino asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, the names of the variables are not self-explaining due to copy & paste. I have to fix that. The explanation is that we use the potential energy:

U = 0.5 C^T alpha^-1 C (Eq. 5 in XPBD paper)

In our original paper we used C= U in the PBD framework. To adapt this to XPBD we now use:

C = sqrt(2 U')

with U = alpha^-1 U' and alpha = 1/youngsModulus.
This yields:

grad C = 1/C grad U'

This is where the additional C's come from. In the code grad U' has the name "gradC" which is quite misleading which comes from lazy copy & pasting stuff.

I hope that clarifies this a bit.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@blacksino
Comment options

Answer selected by blacksino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants