snow
snow copied to clipboard
Need some basic math explanation about the code
Hi, Your code is easy to understand in engineering point of view, it's well coded. And I almost went over all part of the 2d version, but there is one place I can not understand due to lack of some mathematics background (I think so):
Particle::energyDerivative() below
const Matrix2f Particle::energyDerivative(){
//Adjust lame parameters to account for hardening
float harden = exp(HARDENING*(1-def_plastic.determinant())),
Je = svd_e.product();
//This is the co-rotational term
Matrix2f temp = 2*mu*(def_elastic - svd_w*svd_v.transpose())*def_elastic.transpose();
//Add in the primary contour term
temp.diag_sum(lambda*Je*(Je-1));
//Add hardening and volume
return volume * harden * temp;
}
I can not find anything about this derivative on the original paper, but I think this does what the equation (6) suppose to do in the original paper.
And I reviewed a lot of time between the paper and this method, but still can not understand why you calculate equation (6) in this way, can you give me some hints on why you did in this way?
Thank you very much for taking time for this issue.
P.S. Of course I skipped all implicit solver parts which are a lot more harder to understand by now :P [*] Note: This is the first time I encounter to calculate partial derivative in computer language, it's so interesting to figure out how to.
I've added all the miscellaneous technical reports/papers I used for the implementation under "papers". Take a look at those to help with the math. The derivations are not always included in the main paper, and I had to email the author's to get some additional info for some things.
@Azmisov Thank you for the help. ❤️