<

olivertwist

15 Reputation

2 Badges

6 years, 145 days

MaplePrimes Activity


These are replies submitted by olivertwist

@tomleslie ;  Preben Alsholm 9290

Thanks a lot.

@Preben Alsholm 

I already run your suggested codes but I got error. Could you please check it. 
I really appreciate it if you could answer my previous question about shooting method. I solved the problem                  using desolve without converting the system into first order one (RKF45). I just want to solve it using shooting      method as well. Tq.


restart; Shootlib := "C:/Shoot9"; libname := Shootlib, libname; with(Shoot);
with(plots);
N1 := 1.0; N2 := 1.0; N3 := .5; Bt := 6; Re_m := N1*Bt; gamma1 := 1;
FNS := {f(eta), fp(eta), fpp(eta), g(eta), gp(eta), m(eta), mp(eta), n(eta), np(eta), fppp(eta)};
ODE := {diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(g(eta), eta) = gp(eta), diff(gp(eta), eta) = N1*(2.*g(eta)+(eta-2.*f(eta)).gp(eta)+2.*g(eta)*fp(eta)+2.*N2.N3.(m(eta).np(eta)-n(eta).mp(eta))), diff(m(eta), eta) = mp(eta), diff(mp(eta), eta) = Re_m.(m(eta)+(eta-2.*f(eta)).mp(eta)+2.*m(eta)*fp(eta)), diff(n(eta), eta) = np(eta), diff(np(eta), eta) = Re_m.(2.*n(eta)+(eta-2.*f(eta)).np(eta)+2.*N2/N3.m(eta).gp(eta)), diff(fppp(eta), eta) = N1*(3.*fpp(eta)+(eta-2.*f(eta)).fppp(eta)-2.*N2.N2.m(eta).(diff(mp(eta), eta)))};
blt := 1.0; IC := {f(0) = 0, fp(0) = 0, fpp(0) = alpha1, g(0) = 1, gp(0) = beta1, m(0) = 0, mp(0) = beta2, n(0) = 0, np(0) = beta3, fppp(0) = alpha2};
BC := {f(blt) = .5, fp(blt) = 0, g(blt) = 0, m(blt) = 1, n(blt) = 1};
ODE1 := eval(ODE, `.` = `*`); dfs := indets(ODE1, specfunc(diff)); ODE2 := solve(ODE1, dfs);
peqs := {diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(g(eta), eta) = gp(eta), diff(m(eta), eta) = mp(eta), diff(n(eta), eta) = np(eta)}; sys1 := `minus`(ODE2, peqs); sbs := evalindets(peqs, `=`, proc (x) options operator, arrow; rhs(x) = lhs(x) end proc); sys := eval[recurse](sys1, sbs); BCS := {f(0) = 0, f(blt) = .5, g(0) = 1, m(0) = 0, m(blt) = 1, n(0) = 0, n(blt) = 1, (D(f))(0) = 0, (D(f))(blt) = 0, (D(g))(blt) = 0}; res := dsolve(`union`(sys, BCS), numeric);

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system
plots:-odeplot(res, [seq([eta, diff(f(eta), [`$`(eta, i)])], i = 0 .. 3)], 0 .. blt);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 



@tomleslie 

Dear tomleslie,

Thanks for your comment. As far as I understood you solved the problem using RKF 45 method.
Am I right? Thanks again.

Regards,
Oliver

@Preben Alsholm 

Dear Preben Alsholm,

Thanks to guide me. Your comment was very useful.
Unfortunately, I didn't get your point why do we need to solve ODE1 to get dfs before running the shooting method and what will we get from shooting method? May I ask you to explaine a little more.

Thanks again,

Oliver

@Preben Alsholm 

Dear Preben,

I am really thankful to you and other people to reply my post. As far as I understood from your comment, you 

said my problem does not have a solution unless we consider f'(etainf)=0.07 at least. Am I right?. If so, may I ask 

you to explaine it to me a little bit more. Moreover, I appreciate it if you can tell me the reason for considering the abs in 

Eq1. (I think you meant it is complex and you considered integer part. If so, why?).

Regards,

Oliver

Page 1 of 1