jrleeman / rsfmodel

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

Slider integration #34

Closed jrleeman closed 9 years ago

jrleeman commented 9 years ago

Addresses #24 about slider displacement calculation. We still need a "discrete" displacement calculation for the load point since we prescribe that, but a "continuous" method is more appropriate for the slider displacement since we calculate it at fixed times, but it is continuously changing value in between. I also took the opportunity to shorten some long lines.

jrleeman commented 9 years ago

There is still some dependence on what times you request the solution at though, this is just because we calculate it all post-integration of the main problem. Maybe this should be moved into that? Seems like it could get ugly. Example: https://gist.github.com/jrleeman/8e3a5e66a22a97a1437a

jrleeman commented 9 years ago

Added a warning if the predicted and final displacements do not match up well. I set the tolerance to 1%. Maybe that should be exposed to the user? Another attribute of the model class might be the best solution. We can always consider changing the computation scheme to make this unnecessary, but a warning is better than nothing.

dopplershift commented 9 years ago

Definitely best not to fail silently. I wonder if you just add displacement (v being the derivative you should return) as just another variable being integrated by odeint, if that would work? Of course there might be more work needed to get displacement as a function of time.

jrleeman commented 9 years ago

Yeah. I started to tackle that, but it gets ugly. We need (I think) derivatives for everything again. Maybe merge this for not fail silently for now and start that as a separate ticket?

dopplershift commented 9 years ago

I agree.