phil76600

30 Reputation

4 Badges

11 years, 169 days

MaplePrimes Activity


These are replies submitted by phil76600

@Preben Alsholm 

It's great ! But i 've to work it to understand.

I've to work the simplest command first. But this makes me improve.

 

@Rouben Rostamian  

Very nice. Thanks. but in fact it fails with my maple 12

with message Error, (in dsolve/numeric/an_args/SC) keyword was 'stepsize', optional keyword must be one of 'abserr', 'differential', 'evalhf''event_maxiter', 'event_pre', 'events', 'implicit', 'initstep', 'interpolate', 'maxfun', 'optimize''output', 'projection', 'range', 'relerr', 'startinit', 'steppast'
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

How do you do the movement witht the house ?

could you also explain me two things :

1) maxfun=0

2) stepsize

 

@Preben Alsholm 

always this problem

There's a serie for that

1) Xr = U*t-x.m don't move

2) When Xr is such that k.Xr>mu1*m*g. Then m*diff(x(t),t,t)=k*Xr-mu2*m*g (m2 because kinetic friction coefficient)

3) When (friction) diff(x(t),t)=0 then movement is stopped and x=cte. There's no more equation of motion until ....

4) It moves again when k.Xr>mu1*m*g and so on

The problem is to plot x(t) vs t for all the movement and have something like

Is there a ladder procedure in maple. Event is not sufficient because, function of movement is not the same during all this time.

Something who would do 1) x=0 until .... then 2) ode ... then ...

Do you see ?

@Preben Alsholm 

Hi,

thank you for your help. You learn me some new fonction with maple as events. i try to understand event.

The model has to be corrected because, solution can't be that. When Xr is such that friction  = tension of spring, the solid must stop for a long time (if mu is big).

solution is not acceptable physically.

I try to solve with what you learn me (trigger, events)

Thanks

@Preben Alsholm 

i put two codes, the only difference is mu value

 first : > restart; k := 10; m := 1; g := 10; mu := .2; Xr := U*t-x(t); ode1 := m*(diff(x(t), t, t)) = k*Xr-piecewise(mu*m*g < k*Xr, mu*m*g, 0); U := 1; res := dsolve({ode1, x(0) = 0, (D(x))(0) = 0}, numeric); plots:-odeplot(res, [t, x(t)], 0 .. 15); plots:-odeplot(res, [t, diff(x(t), t)], 0 .. 15);

second, note, i change only mu : 

> restart; k := 10; m := 1; g := 10; mu :=1000 .2; Xr := U*t-x(t); ode1 := m*(diff(x(t), t, t)) = k*Xr-piecewise(mu*m*g < k*Xr, mu*m*g, 0); U := 1; res := dsolve({ode1, x(0) = 0, (D(x))(0) = 0}, numeric); plots:-odeplot(res, [t, x(t)], 0 .. 15); plots:-odeplot(res, [t, diff(x(t), t)], 0 .. 15);

exactly same. No ?

Moreover, x has to be constant in second case. I don't understand. You say two different curves. Not for me. It gives me exactly the same curves. I tried to stop maple and reboot it ... idem !

???

@Preben Alsholm 

in fact we have to find a code such that

ode1 := m*diff(x(t), t, t) = k*Xr-mu*m*g if mu*m*g<k*Xr else diff(x(t),t) = V(t) = 0

something yet difficult for me perhaps say m = 100000000000 with piecewise . I try

@Preben Alsholm In fact there is a strange problem, curves are identical for

restart;
k := 10; m := 1; g := 10; mu := .2;
Xr := U*t-x(t);
ode1 := m*diff(x(t), t, t) = k*Xr-piecewise(mu*m*g<k*Xr,mu*m*g,0);
U:=1:
res:=dsolve({ode1,x(0)=0,D(x)(0)=0},numeric);
plots:-odeplot(res,[t,x(t)],0..15);
plots:-odeplot(res,[t,diff(x(t),t)],0..15);

restart;
k := 10; m := 1; g := 10; mu :=1000;
Xr := U*t-x(t);
ode1 := m*diff(x(t), t, t) = k*Xr-piecewise(mu*m*g<k*Xr,mu*m*g,0);
U:=1:
res:=dsolve({ode1,x(0)=0,D(x)(0)=0},numeric);
plots:-odeplot(res,[t,x(t)],0..15);
plots:-odeplot(res,[t,diff(x(t),t)],0..15);

This solution seems not reasonnable. With mu=1000, we should have x = cte for a long time ...no ?

the error is piecewise(mu*m*g<k*Xr,mu*m*g,0);

it's V wich is 0 but how to integrate that in ode ?

 

@Preben Alsholm 

Thanks a lot for that solution easy to understand. It provokes improvement for me.

I will try now to complexify the pb with this one (an other post)

with the ode m*diff(v(t),t)=-mu*m*g*sign(v(t))+m*ω^2*A*cos(ω*t), only if mu*m*g>m*ω^2*A

an other, problem.

Thanks !!

@Rouben Rostamian

Thanks for your participation. 

In fact, my biggest pb is maple. Despite some errors, as the sign for inertial force.

It's my goal : find the maple code to have a solution for that kind of ODE.

So pb still opened.

@Preben Alsholm 

You are right for the square wich has not his place there.

You are right also to emphasize the pb with V = 0.

But in a first sight, we can imagine that there is always a relative motion. Theory shows that it's the case if A.omega²/μ.g > 1,82. Coefficient dynamic and static supposed equal.

I've tried this > restart; with(plots); with(DEtools); x0 := 1.2;
> ode1 := diff(x(t), t) = v(t);
> odeE := diff(v(t), t) = -(.2*9.8)*sign(v(t))-4*cos(2*t);
> res := dsolve({ode1, odeE, v(0) = 0, x(0) = 1}, numeric);
> plots:-odeplot(res, [t, v(t)], 0 .. 5000, thickness = 3);
 but it diverges

I should obtain something like that

very far from result obtained with that code. Something is not clear.

In fact the term with abs(v(t)) is just there to give a sign. It's a friction force, opposed to speed. So the value of v(t) doesn't matter. Perhaps with just the option sign. But i don't know how to do it.

The physical pb is that :

so V can't diverge.

>restart;

>with(plots); with(DEtools);

>Ep:=x->(1-exp(-(x-2)))^2;E:=0.5;eq:=diff(phi(x),x,x)=phi(x)*(Ep(x)-E);

>sol:=dsolve({eq,phi(0)=0,D(phi)(0)=0},type=numeric,range=0..10);

>odeplot(sol);

 

nothing better

 

My code :

@Carl Love 

Thank you for all these comments. I 've understood them.

I did'nt know the @ function nor that f was a special character. It's ok now.

I'm using maple 12 version.

@Carl Love 

Thank you for all these comments. I 've understood them.

I did'nt know the @ function nor that f was a special character. It's ok now.

I'm using maple 12 version.

I'm a beginner in maple and some lines are not clear for me.

`f'`:= (-D[2]/D[1])(F) @ (V__b-> (f(V__b),V__b)):

Why is 'f' necessary. That's the kind of subtility that is difficult for me.

And what is that @ in this line ?

Your solution give a result but is quite long in tilme and some holes in the curve. Why ?

again for

Thanks for answer

Phil

1 2 Page 1 of 2