jennierubyjane

25 Reputation

3 Badges

2 years, 356 days

MaplePrimes Activity


These are replies submitted by jennierubyjane

@tomleslie Okay thank you very much! Appreciate it alot!

@tomleslie Waaa. Yes this is clearly what I want. Thank you so much! 

NULL

with(plots)

DE1 := diff(f(eta), `$`(eta, 3))+f(eta)*(diff(f(eta), `$`(eta, 2)))-(diff(f(eta), eta))^2 = 0

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(1)

DE2 := diff(theta(eta), `$`(eta, 2))+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(2)

DE3 := diff(phi(eta), `$`(eta, 2))+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), `$`(eta, 2)))/Nb

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb

(3)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(4)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(5)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(6)

NULL

  getRes:= proc(a, x);
                local sol;
                if   type(x, numeric)
                then sol:= dsolve
                           ( eval
                             ( {BC1, BC2, BC3, DE1, DE2, DE3},
                               [Nt = a, Nb = a, Pr = 2, Le = 5, Bi = x]
                             ),
                             numeric,
                             output = listprocedure,
                             abserr = 0.0001,
                             maxmesh = 1024,
                             initmesh = 512
                           );
                else return 'procname(a,x)';
                fi;
                return -eval(diff(theta(eta), eta), sol)(0)
           end proc:

  cl:=[red, green, blue, yellow, black]:
  L:=[0.2, 0.4, 0.6,0.8,1.0]:
  display
  ( [ seq
      ( plot
        ( getRes( L[k], x),
          x=0..5,color = colorList[k], legend = ["Nb=Nt" = L[k]], legendstyle = [location = top],
          color=cl[k]
        ),
        k=1..5
      )
    ]
  )
               

 

 

 

Download odeProb2.mw

@tomleslie I just want to display the effects of Nb=Nt on -diff(theta(eta) against Bi. In the code, I don't know how to relate these three.

 -diff(theta(eta)  as y-axis and Bi as x=axis

 

@tomleslie  Nb must be equal to Nt but in my code it varied independently bcs i thought i need to find -diff(theta(eta) for that first. Then proceed with Bi as independent variable x. I dont know how to start so thats why

So your code is only set for Nb=Nt=0.2 right? How to get a graph to show all for Nb=Nt=0.1,0.2,0.3,0.4,0.5

@Preben Alsholm Ah I see. Thank you so much again sir. You really really help me a lot in this. Even on Christmas Day :') Merry Christmas to you! May Santa won't skip you this year and beyond. Thank you and god bless

@Preben Alsholm Oh so I can just say that it uses bvp procedures am I right? 

@Preben Alsholm okay thank you so much again. One last question, this problem is solved using what method? Cuz I believe that my first post is using RK45 (but code cannot running). So can I know what method you used? Or isit still RK45? Sorry I really dont know

@Preben Alsholm Wow thank you so so much again <3. You help me a lot in this. But I wonder why the values in table isn't same as below. As we can see the table only want

-diff(theta(eta),eta)

@Preben Alsholm Thank you so much again. The output for plot works nicely.

But how to code so that the line graph colors differently so that it would be easier for me to interpret the graph later.

Also, refer below

I want to get these values but seems like something is off wirh the codes

restart

with(plots):

 

DE1 := diff(f(eta), eta$3)+f(eta)*(diff(f(eta), eta$2))-(diff(f(eta), eta))^2 = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(1)

DE2 := diff(theta(eta), eta$2)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*diff(theta(eta), eta)^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(2)

DE3 := diff(phi(eta), eta$2)+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta$2))/Nb

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb

(3)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(4)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(5)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(6)

L := [0.1,0.2,0.3,0.4,0.5];
for k from 1 to numelems(L) do
   res[k]:=dsolve(
                  eval({BC1, BC2, BC3, DE1, DE2, DE3}, [Nt = L[k], Nb=0.1, Pr=10, Le=10, Bi=0.1]),
                  numeric,output=listprocedure
                 );
   
end do:

             

[.1, .2, .3, .4, .5]

(7)

L := [.1, .2, .3, .4, .5]; for k to numelems(L) do PH[k], TH[k] := op(subs(res[k], [phi(eta), -(diff(theta(eta), eta))])) end do; interface(rtablesize = 11); ET := Vector([seq(.1*i, i = 0 .. 5)]); Matrix([ET, `~`[PH[5]](ET), `~`[TH[5]](ET)])

L := [.1, .2, .3, .4, .5]

 

[10, 10]

 

Vector(6, {(1) = 0., (2) = .1, (3) = .2, (4) = .3, (5) = .4, (6) = .5})

 

Matrix(%id = 18446745933559076734)

(8)

``

``

Download tablediffNtNb.mw

@mmcdara Thank you for this well-explained reply. I appreciate it so much. Thank you <3

@Carl Love Okay, i'll try that thank you <3

@Preben Alsholm Thank you so much, yes this what I wanted, phi(eta) and theta(eta).

So, i don't need those fixedparameters cz it will be put in the loop anyway right? 

Isit possible to have numerical values shown too? I want the plot and numerical values

Also, where can I edit so that the x-axis (eta) to be stopped at 2.5 only instead of 10 in the graph? Bcs 10 is too big and i cannot see the patterns for the graph

PR.mw

@Carl Love 

Where exactly should i put my fixedparameters? Only 7BCs given so i wanna stick with that. Values for Nb, Nt, Bi and Le are given.

restart

NULL

with(plots)

 

fixedparameter := [Nb = 0, Nt = 0, Bi = 1000, Le = 10]

[Nb = 0, Nt = 0, Bi = 1000, Le = 10]

(1)

DE1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2 = 0

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(2)

NULL

DE2 := diff(theta(eta), eta, eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(3)

DE3 := diff(phi(eta), eta, eta)+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb = 0

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb = 0

(4)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(5)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(6)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(7)

NULL

L := [0.7e-1, .2, .7, 2, 7, 20, 70]; for k to 7 do R := dsolve(eval({BC1, BC2, BC3, DE1, DE2, DE3}, Pr = L[k]), [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure); Y || k := rhs(R[5]); YP || k := -rhs(R[6]) end do

Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 11, got 7

 

plot([Y || (1 .. 10)], 0 .. 6, labels = [eta, theta(eta)])

Error, (in plot) procedure expected, as range contains no plotting variable

 

``

Download ODEprobz.mw

@Carl Love 

but i put values ady for Bi, Nb, Le, and Nt on the 3rd line. So where i should put these fixedparameters actually? Plus, yes i hv 7 BCs only but it kept stating that too few BCs so i added on my own zz. Please i really need help in this. Here's what i hv fixed but still :((

 

 

 

restart

NULL

with(plots)

 

fixedparameter := [Nb = 0, Nt = 0, Bi = 1000, Le = 10]

[Nb = 0, Nt = 0, Bi = 1000, Le = 10]

(1)

DE1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2 = 0

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(2)

NULL

DE2 := diff(theta(eta), eta, eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(3)

DE3 := diff(phi(eta), eta, eta)+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb = 0

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb = 0

(4)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(5)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(6)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(7)

NULL

L := [0.7e-1, .2, .7, 2, 7, 20, 70]; for k to 7 do R := dsolve(eval({BC1, BC2, BC3, DE1, DE2, DE3}, Pr = L[k]), [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure); Y || k := rhs(R[5]); YP || k := -rhs(R[6]) end do

Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 11, got 7

 

plot([Y || (1 .. 10)], 0 .. 6, labels = [eta, theta(eta)])

Error, (in plot) procedure expected, as range contains no plotting variable

 

``

 

 

Download ODEprobz.mw

@Carl Love Thank youuu <3

1 2 Page 1 of 2