jrleeman / rsfmodel

Rate and state frictional solver
MIT License
31 stars 12 forks source link

Slider Displacement Exceeds Loadpoint Displacement #24

Closed jrleeman closed 9 years ago

jrleeman commented 9 years ago

This is also an issue with Marone's code, so I'm not sure if it is numerical or something more fundamental with the modeling. My gut says that we are compounding error for coarse steps, but I have not investigate it.

dopplershift commented 9 years ago

Could try to really tighten tolerances and shrink time step and see if the problems lessen or disappear.

jrleeman commented 9 years ago

Ok. Looks like the spring displacement is what causes this phenomena, but my solution and Chris' both exhibit some time dependance. Small time steps often leads to over estimation, large ones to under. Instantaneous velocities should be correct, but we multiply them by time to get displacement in the end. Not sure if that should be handled as a warning or if we can cleverly fix it. Example: https://gist.github.com/jrleeman/64ca917e1876c4bc3801

dopplershift commented 9 years ago

Looks like you're integrating yourself using cumsum. At a minimum, IMO you should use the trapezoidal method. You can get a cumulative integral version from scipy.integrate.cumtrapz. That might help with some integration error. If that's not enough, you could look at some of the "better" integration methods in there.