6 ms·
Really cool problem! And great animations. I was disappointed to find that the associated notebook (http://math.bard.edu/belk/code/BilliardsHertz.nb http://mat
by taliesinb 13y ago
Really cool problem! And great animations.
I was disappointed to find that the associated notebook (http://math.bard.edu/belk/code/BilliardsHertz.nb http://math.bard.edu/belk/code/BilliardsHertz.nb) doesn't work correctly in either Mathematica 9 or 10 -- I think the author used 8.
It seems like NDSolve falls down:
NDSolve::smpf: Failure to project onto the discontinuity surface when computing Filippov continuation at time 0.`. >>
and the solution shows the cue bool passing through all the others..
- sillysaurus2 13y agoThere's a Mathematica 10 now, already? Interesting. I'm still a happy 8 user, myself. Is there much reason to upgrade? It'd probably be good for them to pay more attention to backwards compatibility...
- ballstothewalls 13y agoI think he is confused. Wolfram's site only has Mathematica 9 listed
- prakashk 13y ago> I think he is confused. You don't mean that the GP (taliesinb) is confused, do you?. He works for Wolfram Research, developing Mathematica.
- ballstothewalls 13y agoThat is what I meant, but I guess I look like the fool now. I still don't see that Mathematica 10 has been released, but I guess it is close.
- nswanberg 13y agoIt hasn't been released, but you can effectively get it on a Raspberry Pi: http://wolfram.com/raspi http://wolfram.com/raspi
- Steuard 13y agoI'm going to go out on a limb and guess that v. 10 has not yet been released but is in common use internally at Wolfram.
- taliesinb 13y ago10 has Association expressions [1], which are a huge language addition (and long overdue). Seems there is some synchrony with Erlang on that front! The features I'm most excited about in 10 (disclosure: my team is working on some of these): [2] String, XML, file templating [3] Hands-free machine learning [4] Entity and EntityValue: semantic "hooks" to represent real world entities [5] Dataset, a general data modelling and query framework. Also, DateObject, TimeObject, interaction with external processes, multiple undo, a large number of updated data sources, the ExternalService "meta-api", device connections, time series stuff, GeoGraphics, and a long list of no less worthy features. [1] http://reference.wolfram.com/language/guide/Associations.html http://reference.wolfram.com/language/guide/Associations.htm... [2] http://reference.wolfram.com/language/guide/WorkingWithTemplates.html http://reference.wolfram.com/language/guide/WorkingWithTempl... [3] http://reference.wolfram.com/language/guide/MachineLearning.html http://reference.wolfram.com/language/guide/MachineLearning.... [4] http://reference.wolfram.com/language/ref/Entity.html http://reference.wolfram.com/language/ref/Entity.html [5] http://reference.wolfram.com/language/ref/Dataset.html http://reference.wolfram.com/language/ref/Dataset.html
- matthewi 13y agoThat is odd. Mathematica is usually good about backwards compatibility. That sounds like a change in the under lying numerical solver.
- Someone 13y agoWell, if it was a lying numerical solver... Seriously: I think they will make breaking changes if the existing code turns out to be mathematically incorrect. That may or may not have been the case here.
- jimbelk 13y agoSorry about that. I really ought to upgrade to 9. Apparently Mathematica added some new features in version 9 that are intended to better handle differential equations with discontinuities (see http://reference.wolfram.com/mathematica/tutorial/NDSolveWhenEvents.html http://reference.wolfram.com/mathematica/tutorial/NDSolveWhe...). Apparently this is getting tripped up at the boundary between the two behaviors. One simple thing that might work is to change the force law to either force[disp1_, disp2_, dir_] := -k Abs[(disp1 - disp2).dir ]^(3/2) dir* If[(disp1 - disp2).dir > 0, 1, 0] or force[disp1_, disp2_, dir_] := -k Abs[(disp1 - disp2).dir ]^(3/2) dir* Piecewise[{{1, (disp1 - disp2).dir > 0}}, 0] If these don't fix it, then you would need to play around with the options for NDSolve.
- taliesinb 13y agoThanks for the help. Piecewise has the same problem, whereas the If is taking forever. How long should I wait before I kill it?