cloth sim with implicit integration unstble problem

Please don't post Bullet support questions here, use the above forums instead.
physimrookie
Posts: 2
Joined: Sun Dec 12, 2010 12:03 pm

cloth sim with implicit integration unstble problem

Post by physimrookie »

:( Hi all,
Im implementing a gpu based cloth simulation using mass-spring model with a backward euler integration.
The large sparse matrix is calculated without any constraints. The linear system is solved by using the conjugate gradient solver. Everything is done in GPU.
I think as an implicit integration it should be stable like many paper pointed out, but it is unstable just like
the emplicit method. Most of time, when the time step size reaches a certain value (depending on the stiffness), the CG refuses to converge and goes into a infinite loop.

Although I've checked the code over and over again and read many papers, I still couldn't find out the reason.
The cloth moves correctly and the animation is much more convincible than the one using explicit integration, so i guess
the forces are computed correctly. Is there anything I missed to cause the instability?

The piece of cloth in my demo has some fixed points (like curtain), but I just used the normal CG solver to solve the system. (For those 2 fixed particles, I didnt update the pos and velocity)

Is it because of this, my demo becomes unstable like an explicit version when the timestep is increased to a certain size (usually 10ms for stiff value 1000)?
Do I have to use filtered CG method? If so, how about the constrains caused by collision? I guess it would be so difficult when collision constrains are considered if filtered CG is necessary.
I guess I must be wrong in some places. :)

Any one can help?

thanks alot in advance!
Last edited by physimrookie on Mon Dec 13, 2010 11:55 am, edited 2 times in total.
physimrookie
Posts: 2
Joined: Sun Dec 12, 2010 12:03 pm

Re: cloth sim with implicit integration unstble problem

Post by physimrookie »

I have found the problem, a coding mistake......