New Newton PEEL integration

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: New Newton PEEL integration

Postby Pierre » Thu Jun 25, 2015 8:44 am

and like I said you do not see difference because Newton now set the iterative solver as the default solver

Yeah I know, but I tried with "0" anyway (the direct solver) and even in that case I don't really see a difference: both with or without your change, it explodes. So I don't really see the point of the change in practice, even though I see why it would make a difference in theory.

BTW is there a doc somewhere? (I was looking for one to make sure I did the correct thing when enabling the direct solver).

Anyway there's a new test now, creating bridge-like structures directly in their rest position. See the screenshot, that's the initial frame (paused) before the simulation even starts. It does look like it generally behaves better than the other scene, and I hope you will like that new test, but to be perfectly honest with you I am not able to reproduce obviously bad behaviors in the old scene either.
Attachments
catenary.png
catenary.png (85.09 KiB) Viewed 4753 times
Pierre
 
Posts: 21
Joined: Tue Jun 16, 2015 4:40 am

Re: New Newton PEEL integration

Postby Julio Jerez » Thu Jun 25, 2015 10:13 am

BTW is there a doc somewhere? (I was looking for one to make sure I did the correct thing when enabling the direct solver).

if you did that then you did the correct thing, after that you will have to play with joint stiffness to prevent explosion: there are two cases:
1-The deflection is large enough the there there is no way the system matrix become singular, so you can just let it go.

2-foer small deflection it is lithe complex because what have to do is to calculate the Mass Matrix and inverted and calculate the product of the two norms, that's called condition number
http://teal.gmu.edu/ececourses/ece699/notes/note4.html
The square root of the number tells you how much the process of pivoting will degenerate on each step. with float that value is around two and a half decimal digits, approximately 200. This also correlate to the ratio to the higher mass divided by the smalls mass (including the inertia)

so basically it comes to an iterative process
1- calcute condition for some joint stiffness
2-if condition number is larger that 100 or 200, reduce stiffed and repeated 1 until k is lower that 200
the for that point you know that the system will always be stable.

another method is by calculating the singular value decomposition of the system matrix, which is eassy for a PSD matrix and repeat the first process unit the ratio of the largest to lowest eigen value is smaller than some value.
Newton 1.xx has that system in, but because it was very slow I took out after I wrote the iterative solver. I may bring it back

Then is also a third method eassy to undernad, and guaranty no explosion.
calculate the main diagonal of the main matrix, and the sum of the absolute value of all the off diagonal values of the road.
then while the diagonal is lower than some larger than 1 factor, say 2.0, time the sum of all the off diagonal then apply some regularization to the off diagonal matrix.
A regularize of a Matrix is a smoothing the process of adding a positive diagonal matrix to the main diagonal for the propose of reducing its condition number.
I experimented with that on the beginning of newton 2.00 but that is also two slow. so I decided to focus on the iterative solver.

At this time I do not vouch for the direct solver. It may be broken because I have been moving things around a little since few verins and I have no tested. Usually when I do that I place ASSERT (0) on the function that are left to revisit.
I am now working on functionality for 3.14 that I will provable unveil thee weekend, I se if I cane get the direct solver working again by them.

In general I focus my attention on the thing that people demand. and with the exception of few users and Goggle sketch up, the direct solver does no have too much demand.

and yes adding the little curvature to the demo, not only newton behaves better everyone else will. Basically the solver has to operates on the area when the only thing that keep the joint together is the penalty that all iterative solvers added the joints to make up for lack of convergence.

The doc? well that is a are where there I have nothing.
I have tried asking people to donate time to make a doc, but not takers.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Newton PEEL integration

Postby Pierre » Fri Jun 26, 2015 4:57 am

the direct solver does no have too much demand

Yes, fair enough. I was interested in it for PEEL because it would give me a correct "reference solution", that could be used to evaluate the accuracy of other engines.
Pierre
 
Posts: 21
Joined: Tue Jun 16, 2015 4:40 am

Re: New Newton PEEL integration

Postby Julio Jerez » Fri Jun 26, 2015 8:39 am

I will enable it over the weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Newton PEEL integration

Postby AntonSynytsia » Fri Jun 26, 2015 12:42 pm

Julio Jerez wrote:The doc? well that is a are where there I have nothing.
I have tried asking people to donate time to make a doc, but not takers.

I could help make it. Though I need initial instructions, like what kind of docs (doxygen?) and where to write/upload them.
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: New Newton PEEL integration

Postby Julio Jerez » Fri Jun 26, 2015 1:03 pm

doxigen should be fine, the one thing that would be good would be some sort of "programmer guide"
yes I provides instructions.
I think the same archive is the best place to share the info
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Newton PEEL integration

Postby AntonSynytsia » Sat Jun 27, 2015 4:23 am

Julio Jerez wrote:doxigen should be fine, the one thing that would be good would be some sort of "programmer guide"
yes I provides instructions.
I think the same archive is the best place to share the info

Alright! I think our primary objective should be to document all functions in Newton.cpp. Then, after that we could add the programmers guide. What are your thoughts on that?
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: New Newton PEEL integration

Postby zak » Sat Jun 27, 2015 5:30 am

I love direct solver, but sometimes it not works when a new version of Newton is out, so i'm afraid to upgrade to new version every time it is out.
Please, keep updated direct solver as iterative, so i can update fairless and enjoy Newton last version.
zak
 
Posts: 87
Joined: Mon Dec 06, 2004 9:30 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest