Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

@acer Ok Retrieve works unless it seems, if there is a plot in the document, Retrieve runs into issues. 

I'm using Windows 7 64 bit Maple 2018 document mode.  I've uploaded my test file.test1.mw

Using Insert->Reference, as suggested by Tomleslie will insert label (1) - the only option from the file but it is shown like this

otherwise using the Retrieve command fails

**edit added**
actually using worksheet mode I can see L1 actually turns out to be L36 !

But my point is plot is causing the mixups.

I downloaded an mw file off of mapleprimes.  Saved it in the file location as one can see in the original post.

FileTools:-IsReadable("c:/test/testing.mw")
                                                                   True

DocumentTools:-Retrieve("c:/test/testing.mw","L1")

The error pops up again.

 

@Preben Alsholm ok yes so what we need to do is add code that says when it's at a certain level it follows a ball constrained to a curve, until it hits some point where it gets launched into the air at which point it will have to follow the original code again.  I don't know how easy it can be done.

@Preben Alsholm if you change your # of hits to 1000 the ball still stops in the exact location as 100hits and you get the error

Warning, cannot evaluate the solution further right of 5.1979218, maxfun limit exceeded (see ?dsolve,maxfun for details)

 

@Jaqr I believe some time ago there was an issue using ? in a web address name.  I think the solution for that was to double up on the question marks?  I think that issue was resolved, but give it a try.

**edit added**  Actually the double ?? was for older versions of Maple using HTTP[Get] so I don't think it applies in your situation. Wouldn't hurt to give it a try though.

I think the final satisfactory solution lies in the events part of the code

Can't think straight, I was trying to apply Acer's piecewise approach by changing the events to something like

events := [[y(t) = eval(surf, x = x(t)), [diff(y(t), t) = piecewise(abs(diff(y(t), t)) < 0.1e-1, abs(diff(y(t), t)), [temp = diff(x(t), t), diff(x(t), t) = V_reflect[1], diff(y(t), t) = subs(diff(x(t), t) = temp, V_reflect[2])])]]]

In Roubens solution, when the bounces get too small the code stops, that is maxfun limit is exceeded.  How do we hold the ball at small bounces so we can continue the code until motion in the y direction becomes small as well?

@Rouben Rostamian  Nice work Rouben!

edit added** however it seems the solution still can't proceed beyond certain points. 

Setting these parameters (just for example) CR:=.55,  and initial conditions x(0):=2 y(0):=4.5 and the other ic conditions set to 0.  The animation ends as the ball rolls down the hill. 

I expect it has something to do with infintesimally small bounces?  Eventually hope the animation can end with the ball ending up in one of the troughs.

If I change g to

g := y -> piecewise(y>=eval(surf,x=(x(t))), 1, 0);

we get rid of the error but the ball still tunnels through the ground

@acer that sounds good, but just by modifying g to something like

g := y -> piecewise(y>=surf, 1, 0);

and changing deqs to

deqs := diff(y(t), t, t) = -g(y(t)), diff(x(t), t, t) = 0

However since surf is a function of x, the above won't work but probably something simple that needs adjustment because the error thrown after sol is

@acer ..

Hi Acer,using your events approach how do we use that to modify the BouncingBall application in the help applications so when we set CR:=0.7 we don't run into the same problem of the ball tunnelling through the ground?

the application initially has

events = [[y(t) = eval(surf, x = x(t)), [temp = diff(x(t), t), diff(x(t), t) = V_reflect[1], diff(y(t), t) = subs(diff(x(t), t) = temp, V_reflect[2])]]]

 

 

The Python examples are working.  It is perhaps that Maple is functioning ok with the `failed to install` installed 2015 redistributable.  That is to say, enough of the 2015 redistributable package has been installed for Maple to function normally. 

There may be some back corner of Maple that I will never use that doesn't work, which I may never find out.

If the 2015 c++ redistributable were uninstalled, the Python examples may not work, I will try that when I make the time.

or complexplot(f(x),x=0.2..0.4)

@acer at work, I will have to check tomorrow.

I was hoping Maplesoft would provide some insight.  Or maybe no one really knows?

@Rouben Rostamian  interesting solution.  I didn't realize as the oscillations got smaller they become a problem - it could be used to solve the ball bouncing application https://www.mapleprimes.com/questions/203742-Bouncing-Ball-Application-Problem- on hilly terrain in which the model fails when, as I now know, the oscillations of the ball become too small. 

I think setting the piecewise g=0 at y<0 becomes more difficult when y becomes a function of x.

First 29 30 31 32 33 34 35 Last Page 31 of 155