Gabriel samaila

20 Reputation

4 Badges

1 years, 187 days

MaplePrimes Activity


These are questions asked by Gabriel samaila

Hi guys,

I'm trying to apply boundary condition on the seris i generated using Adomian decomposition. Could some one please check it for me?
 

NULL

u[0] := a1+a2*y:

NULL

NULL

w[0] := a3+a4*y:

theta[0] := a6*y+a5

phi[0] := a8*y+a7

NULL

NULL

``

``

``

``

``

A[1] := R*(diff(u[0], y))+A-Gr*(B*phi[0]+theta[0])/Ree+Ha^2*(alpha*u[0]+beta*w[0])/(alpha^2+beta^2)

R*a2+A-Gr*(a5+a6*y+B*(a7+a8*y))/Ree+Ha^2*(alpha*(a1+a2*y)+beta*(a3+a4*y))/(alpha^2+beta^2)

(1)

u[1] := int(A[1], y = 0 .. y)

(1/2)*(-Gr*(a6+B*a8)/Ree+Ha^2*(alpha*a2+beta*a4)/(alpha^2+beta^2))*y^2+R*a2*y+A*y-Gr*(a5+B*a7)*y/Ree+Ha^2*(alpha*a1+beta*a3)*y/(alpha^2+beta^2)

(2)

u[11] := int(u[1], y = 0 .. y)

(1/3)*(-(1/2)*Gr*(a6+B*a8)/Ree+(1/2)*Ha^2*(alpha*a2+beta*a4)/(alpha^2+beta^2))*y^3+(1/2)*(R*a2+A-Gr*(a5+B*a7)/Ree+Ha^2*(alpha*a1+beta*a3)/(alpha^2+beta^2))*y^2

(3)

u = u[0]+u[11]

u = a1+a2*y+(1/3)*(-(1/2)*Gr*(a6+B*a8)/Ree+(1/2)*Ha^2*(alpha*a2+beta*a4)/(alpha^2+beta^2))*y^3+(1/2)*(R*a2+A-Gr*(a5+B*a7)/Ree+Ha^2*(alpha*a1+beta*a3)/(alpha^2+beta^2))*y^2

(4)

A[2] := R*(diff(w[0], y))-Ha^2*(beta*u[0]-alpha*w[0])/(alpha^2+beta^2)

R*a4-Ha^2*(beta*(a1+a2*y)-alpha*(a3+a4*y))/(alpha^2+beta^2)

(5)

w[1] := int(A[2], y = 0 .. y)

-(1/2)*Ha^2*(beta*a2-alpha*a4)*y^2/(alpha^2+beta^2)+R*a4*y-Ha^2*(beta*a1-alpha*a3)*y/(alpha^2+beta^2)

(6)

w[11] := int(w[1], y = 0 .. y)

-(1/6)*Ha^2*(beta*a2-alpha*a4)*y^3/(alpha^2+beta^2)+(1/2)*(R*a4-Ha^2*(beta*a1-alpha*a3)/(alpha^2+beta^2))*y^2

(7)

``

w = w[0]+w[11]

w = a3+a4*y-(1/6)*Ha^2*(beta*a2-alpha*a4)*y^3/(alpha^2+beta^2)+(1/2)*(R*a4-Ha^2*(beta*a1-alpha*a3)/(alpha^2+beta^2))*y^2

(8)

A[3] := R*Pr*(diff(theta[0], y))-2*Br*((diff(u[0], y))^2+(diff(w[0], y))^2+M^2*C*(u[0]^2+w[0]^2))-gamma*R*Pr*theta[0]

R*Pr*a6-2*Br*(a2^2+a4^2+M^2*C*((a1+a2*y)^2+(a3+a4*y)^2))-gamma*R*Pr*(a5+a6*y)

(9)

theta[1] := int(A[3], y = 0 .. y)

-(2/3)*Br*M^2*C*(a2^2+a4^2)*y^3+(1/2)*(-2*Br*M^2*C*(2*a1*a2+2*a3*a4)-gamma*R*Pr*a6)*y^2+R*Pr*a6*y-2*Br*(a2^2+a4^2+M^2*C*(a1^2+a3^2))*y-gamma*R*Pr*a5*y

(10)

theta[11] := int(theta[1], y = 0 .. y)

-(1/6)*Br*M^2*C*(a2^2+a4^2)*y^4+(1/3)*(-Br*M^2*C*(2*a1*a2+2*a3*a4)-(1/2)*gamma*R*Pr*a6)*y^3+(1/2)*(R*Pr*a6-2*Br*(a2^2+a4^2+M^2*C*(a1^2+a3^2))-gamma*R*Pr*a5)*y^2

(11)

theta = theta[0]+theta[11]

theta = a5+a6*y-(1/6)*Br*M^2*C*(a2^2+a4^2)*y^4+(1/3)*(-Br*M^2*C*(2*a1*a2+2*a3*a4)-(1/2)*gamma*R*Pr*a6)*y^3+(1/2)*(R*Pr*a6-2*Br*(a2^2+a4^2+M^2*C*(a1^2+a3^2))-gamma*R*Pr*a5)*y^2

(12)

``

 

NULL

A[4] := R*Sc*(diff(phi[0], y))-K*Sc*phi[0]

R*Sc*a8-K*Sc*(a7+a8*y)

(13)

phi[1] := int(A[4], y = 0 .. y)

-(1/2)*K*Sc*a8*y^2+R*Sc*a8*y-K*Sc*a7*y

(14)

phi[11] := int(phi[1], y = 0 .. y)

-(1/6)*K*Sc*a8*y^3+(1/2)*(R*Sc*a8-K*Sc*a7)*y^2

(15)

phi = phi[0]+phi[11]

phi = a7+a8*y-(1/6)*K*Sc*a8*y^3+(1/2)*(R*Sc*a8-K*Sc*a7)*y^2

(16)

``


 

Download second_problem.mw

 Hi guys,
I am trying write a code for homotopy perturbation, i have already generated the polynomial as you can see, i have also  solve for concentration equation since is not couple. But i have a lot of error massages for temperature, velocity and induced magnetic field. can some one please go through the code?
 

NULL

restart

PDEtools[declare](f(x),theta(x),u(x),w(x), prime=x):

f(x)*`will now be displayed as`*f

 

theta(x)*`will now be displayed as`*theta

 

u(x)*`will now be displayed as`*u

 

w(x)*`will now be displayed as`*w

 

`derivatives with respect to`*x*`of functions of one variable will now be displayed with '`

(1)

N := 4:

NULL

NULL

f(x):=sum((p^(i))*f[i](x),i=0..N);

f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)

(2)

theta(x) := sum(p^i*theta[i](x), i = 0 .. N);

theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x)

(3)

``

u(x) := sum(p^i*u[i](x), i = 0 .. N);

u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x)

(4)

``

w(x) := sum(p^i*w[i](x), i = 0 .. N);

w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x)

(5)

HPMEq := (1-p)*(diff(f(x), `$`(x, 2)))+p*(diff(f(x), `$`(x, 2))-k1*(diff(f(x), x))-k2*f(x));

(1-p)*(diff(diff(f[0](x), x), x)+p*(diff(diff(f[1](x), x), x))+p^2*(diff(diff(f[2](x), x), x))+p^3*(diff(diff(f[3](x), x), x))+p^4*(diff(diff(f[4](x), x), x)))+p*(diff(diff(f[0](x), x), x)+p*(diff(diff(f[1](x), x), x))+p^2*(diff(diff(f[2](x), x), x))+p^3*(diff(diff(f[3](x), x), x))+p^4*(diff(diff(f[4](x), x), x))-k1*(diff(f[0](x), x)+p*(diff(f[1](x), x))+p^2*(diff(f[2](x), x))+p^3*(diff(f[3](x), x))+p^4*(diff(f[4](x), x)))-k2*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)))

(6)

HPMEr := (1-p)*(diff(theta(x), `$`(x, 2)))+p*(diff(theta(x), `$`(x, 2))-k11*(diff(theta(x), x))+k12*(diff(u(x), x))^2+k13*(diff(w(x), x))^2+k14*theta(x));

(1-p)*(diff(diff(theta[0](x), x), x)+p*(diff(diff(theta[1](x), x), x))+p^2*(diff(diff(theta[2](x), x), x))+p^3*(diff(diff(theta[3](x), x), x))+p^4*(diff(diff(theta[4](x), x), x)))+p*(diff(diff(theta[0](x), x), x)+p*(diff(diff(theta[1](x), x), x))+p^2*(diff(diff(theta[2](x), x), x))+p^3*(diff(diff(theta[3](x), x), x))+p^4*(diff(diff(theta[4](x), x), x))-k11*(diff(theta[0](x), x)+p*(diff(theta[1](x), x))+p^2*(diff(theta[2](x), x))+p^3*(diff(theta[3](x), x))+p^4*(diff(theta[4](x), x)))+k12*(diff(u[0](x), x)+p*(diff(u[1](x), x))+p^2*(diff(u[2](x), x))+p^3*(diff(u[3](x), x))+p^4*(diff(u[4](x), x)))^2+k13*(diff(w[0](x), x)+p*(diff(w[1](x), x))+p^2*(diff(w[2](x), x))+p^3*(diff(w[3](x), x))+p^4*(diff(w[4](x), x)))^2+k14*(theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x)))

(7)

HPMEs := (1-p)*(diff(u(x), `$`(x, 2)))+p*(diff(u(x), `$`(x, 2))-R*(diff(u(x), x))-A-k8*w(x)-k7*u(x)+k5*theta(x)+k6*f(x));

(1-p)*(diff(diff(u[0](x), x), x)+p*(diff(diff(u[1](x), x), x))+p^2*(diff(diff(u[2](x), x), x))+p^3*(diff(diff(u[3](x), x), x))+p^4*(diff(diff(u[4](x), x), x)))+p*(diff(diff(u[0](x), x), x)+p*(diff(diff(u[1](x), x), x))+p^2*(diff(diff(u[2](x), x), x))+p^3*(diff(diff(u[3](x), x), x))+p^4*(diff(diff(u[4](x), x), x))-R*(diff(u[0](x), x)+p*(diff(u[1](x), x))+p^2*(diff(u[2](x), x))+p^3*(diff(u[3](x), x))+p^4*(diff(u[4](x), x)))-A-k8*(w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x))-k7*(u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x))+k5*(theta[0](x)+p*theta[1](x)+p^2*theta[2](x)+p^3*theta[3](x)+p^4*theta[4](x))+k6*(f[0](x)+p*f[1](x)+p^2*f[2](x)+p^3*f[3](x)+p^4*f[4](x)))

(8)

HPMEt := (1-p)*(diff(w(x), `$`(x, 2)))+p*(diff(w(x), `$`(x, 2))-R*(diff(w(x), x))+k9*u(x)-k10*w(x))

(1-p)*(diff(diff(w[0](x), x), x)+p*(diff(diff(w[1](x), x), x))+p^2*(diff(diff(w[2](x), x), x))+p^3*(diff(diff(w[3](x), x), x))+p^4*(diff(diff(w[4](x), x), x)))+p*(diff(diff(w[0](x), x), x)+p*(diff(diff(w[1](x), x), x))+p^2*(diff(diff(w[2](x), x), x))+p^3*(diff(diff(w[3](x), x), x))+p^4*(diff(diff(w[4](x), x), x))-R*(diff(w[0](x), x)+p*(diff(w[1](x), x))+p^2*(diff(w[2](x), x))+p^3*(diff(w[3](x), x))+p^4*(diff(w[4](x), x)))+k9*(u[0](x)+p*u[1](x)+p^2*u[2](x)+p^3*u[3](x)+p^4*u[4](x))-k10*(w[0](x)+p*w[1](x)+p^2*w[2](x)+p^3*w[3](x)+p^4*w[4](x)))

(9)

for i from 0 to N do equ[1][i] := coeff(HPMEq, p, i) = 0 end do;

diff(diff(f[0](x), x), x) = 0

 

diff(diff(f[1](x), x), x)-k1*(diff(f[0](x), x))-k2*f[0](x) = 0

 

diff(diff(f[2](x), x), x)-k2*f[1](x)-k1*(diff(f[1](x), x)) = 0

 

diff(diff(f[3](x), x), x)-k2*f[2](x)-k1*(diff(f[2](x), x)) = 0

 

diff(diff(f[4](x), x), x)-k1*(diff(f[3](x), x))-k2*f[3](x) = 0

(10)

for i from 0 to N do equa[1][i] := coeff(HPMEr, p, i) = 0 end do;

diff(diff(theta[0](x), x), x) = 0

 

diff(diff(theta[1](x), x), x)-k11*(diff(theta[0](x), x))+k12*(diff(u[0](x), x))^2+k13*(diff(w[0](x), x))^2+k14*theta[0](x) = 0

 

diff(diff(theta[2](x), x), x)+2*k13*(diff(w[0](x), x))*(diff(w[1](x), x))-k11*(diff(theta[1](x), x))+2*k12*(diff(u[0](x), x))*(diff(u[1](x), x))+k14*theta[1](x) = 0

 

diff(diff(theta[3](x), x), x)+k12*(2*(diff(u[0](x), x))*(diff(u[2](x), x))+(diff(u[1](x), x))^2)+k14*theta[2](x)+k13*(2*(diff(w[0](x), x))*(diff(w[2](x), x))+(diff(w[1](x), x))^2)-k11*(diff(theta[2](x), x)) = 0

 

diff(diff(theta[4](x), x), x)+k12*(2*(diff(u[0](x), x))*(diff(u[3](x), x))+2*(diff(u[1](x), x))*(diff(u[2](x), x)))-k11*(diff(theta[3](x), x))+k14*theta[3](x)+k13*(2*(diff(w[0](x), x))*(diff(w[3](x), x))+2*(diff(w[1](x), x))*(diff(w[2](x), x))) = 0

(11)

for i from 0 to N do equat[1][i] := coeff(HPMEs, p, i) = 0 end do;

diff(diff(u[0](x), x), x) = 0

 

diff(diff(u[1](x), x), x)-R*(diff(u[0](x), x))-A-k7*u[0](x)+k5*theta[0](x)+k6*f[0](x)-k8*w[0](x) = 0

 

diff(diff(u[2](x), x), x)-R*(diff(u[1](x), x))-k7*u[1](x)+k6*f[1](x)-k8*w[1](x)+k5*theta[1](x) = 0

 

diff(diff(u[3](x), x), x)-R*(diff(u[2](x), x))+k6*f[2](x)-k7*u[2](x)+k5*theta[2](x)-k8*w[2](x) = 0

 

diff(diff(u[4](x), x), x)-R*(diff(u[3](x), x))+k5*theta[3](x)+k6*f[3](x)-k7*u[3](x)-k8*w[3](x) = 0

(12)

``

for i from 0 to N do equati[1][i] := coeff(HPMEt, p, i) = 0 end do;

diff(diff(w[0](x), x), x) = 0

 

diff(diff(w[1](x), x), x)-R*(diff(w[0](x), x))-k10*w[0](x)+k9*u[0](x) = 0

 

diff(diff(w[2](x), x), x)-k10*w[1](x)+k9*u[1](x)-R*(diff(w[1](x), x)) = 0

 

diff(diff(w[3](x), x), x)-k10*w[2](x)+k9*u[2](x)-R*(diff(w[2](x), x)) = 0

 

diff(diff(w[4](x), x), x)+k9*u[3](x)-R*(diff(w[3](x), x))-k10*w[3](x) = 0

(13)

con[1][0] := f[0](-1) = 1, f[0](1) = 1:

-.5000000000*k2+0.3435019841e-1*k2^4+.5000000000*k2*x^2-.2500000000*k2^2*x^2+.2083333333*k2^2+0.4166666667e-1*k2^2*x^4-0.2083333333e-1*k2^3*x^4+.1041666667*k2^3*x^2+0.4166666667e-1*k1^2*k2+0.5952380952e-3*k2^3*k1*x^7-0.8472222222e-1*k2^3+0.2480158730e-4*k2^4*x^8+0.4166666667e-2*x^6*k1^2*k2^2+0.8333333333e-2*k2*x^5*k1^3-0.9722222222e-2*k1*k2^3*x^5-0.3472222222e-1*k1^2*k2^2*x^4-0.2777777778e-1*k2*x^3*k1^3+0.5046296296e-1*k1*k2^3*x^3+0.6805555556e-1*k2^2*k1^2*x^2-0.4133597884e-1*k1*k2^3*x+0.1944444444e-1*k2*k1^3*x+1.+0.1388888889e-2*k2^3*x^6+0.1666666667e-1*k1*k2^2*x^5+0.4166666667e-1*k2*x^4*k1^2-.1111111111*k2^2*k1*x^3+0.9444444444e-1*k1*k2^2*x-0.8333333333e-1*k2*k1^2*x^2+.1666666667*k2*k1*x^3-0.3750000000e-1*k1^2*k2^2-0.6944444444e-3*k2^4*x^6+0.8680555556e-2*k2^4*x^4-0.4236111111e-1*k2^4*x^2-.1666666667*k1*k2*x

 

1-(1/2)*k2+(277/8064)*k2^4+(1/2)*k2*x^2-(1/4)*k2^2*x^2+(5/24)*k2^2+(1/24)*k2^2*x^4-(1/48)*k2^3*x^4+(5/48)*k2^3*x^2+(1/24)*k1^2*k2+(1/1680)*k2^3*k1*x^7-(61/720)*k2^3+(1/40320)*k2^4*x^8+(1/240)*x^6*k1^2*k2^2+(1/120)*k2*x^5*k1^3-(7/720)*k1*k2^3*x^5-(5/144)*k1^2*k2^2*x^4-(1/36)*k2*x^3*k1^3+(109/2160)*k1*k2^3*x^3+(49/720)*k2^2*k1^2*x^2-(125/3024)*k1*k2^3*x+(7/360)*k2*k1^3*x+(1/720)*k2^3*x^6+(1/60)*k1*k2^2*x^5+(1/24)*k2*x^4*k1^2-(1/9)*k2^2*k1*x^3+(17/180)*k1*k2^2*x-(1/12)*k2*k1^2*x^2+(1/6)*k2*k1*x^3-(3/80)*k1^2*k2^2-(1/1440)*k2^4*x^6+(5/576)*k2^4*x^4-(61/1440)*k2^4*x^2-(1/6)*k1*k2*x

 

2.400000000*k2+0.3589208394e-1*k2^4+1.104000000*k2^2+2.713333334*k1*k2+1.904000000*k1^2*k2+0.115520003e-1*k2^3+.939244445*k1*k2^2+.3973226666*k1^2*k2^2+0.1412642116e-1*k1*k2^3+.9218444444*k1^3*k2

(14)

NULL

"cond[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0:  for j from 1 to N do:  cond[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equa[1][i],cond[1][i]},theta[i](x));  theta[i](x):=rhs(`%`):    end do:    theta(x):=evalf(simplify(sum(theta[n](x),n=0..N)));  convert(theta(x),'rational'); "

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {u[0](-1) = 0, u[0](1) = 0, w[0](-1) = 0, w[0](1) = 0}

 

theta[0](x)+theta[1](x)+theta[2](x)+theta[3](x)+theta[4](x)

 

theta[0](x)+theta[1](x)+theta[2](x)+theta[3](x)+theta[4](x)

(15)

``

"condi[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0,f[0](-1)=1, f[0](1)=1:  for j from 1 to N do:  condi[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0, f[j](-1)=0, f[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equat[1][i],condi[1][i]},u[i](x));  u[i](x):=rhs(`%`):    end do:    u(x):=evalf(simplify(sum(u[n](x),n=0..N)))"

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {f[0](-1) = 1, f[0](1) = 1, w[0](-1) = 0, w[0](1) = 0, theta[0](-1) = 1/10, theta[0](1) = 1}

 

u[0](x)+u[1](x)+u[2](x)+u[3](x)+u[4](x)

(16)

``

"condit[1][0]:=theta[0](-1)=0.1, theta[0](1)=1,w[0](-1)=0, w[0](1)=0,u[0](-1)=0, u[0](1)=0,f[0](-1)=1, f[0](1)=1:  for j from 1 to N do:  condit[1][j]:=theta[j](-1)=0, theta[j](1)=0,w[j](-1)=0, w[j](1)=0,u[j](-1)=0, u[j](1)=0, f[j](-1)=0, f[j](1)=0:  end do:    for i from 0 to N do:  dsolve({equati[1][i],condit[1][i]},w[i](x));  w[i](x):=rhs(`%`):    end do:    w(x):=evalf(simplify(sum(w[n](x),n=0..N)))"

Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {f[0](-1) = 1, f[0](1) = 1, u[0](-1) = 0, u[0](1) = 0, theta[0](-1) = 1/10, theta[0](1) = 1}

 

w[0](x)+w[1](x)+w[2](x)+w[3](x)+w[4](x)

(17)

NULL

``

``


 

Download completecode.mw

Hi guys,

This is the first time of solving partial differential equation, can some please help me point out some errows in my code. 
 

restart

ODEs := `<,>`(diff(v(y), y, y)+(diff(v(y), y))/y-(Ha^2/(1-eta)^2+1/y^2)*v(y)-Re*v(y)*(diff(v(y), y)) = 0, diff(theta(y), y, y)+Ec*Pr*(diff(v(y), y)-v(y)/y)^2-Pr*Re*v(y)*(diff(theta(y), y))+Nb*(diff(theta(y), y))*(diff(phi(y), y))+Nt*(diff(theta(y), y))^2 = 0, diff(phi(y), y, y)-Re*Sc*v(y)*(diff(phi(y), y))+Nt*(diff(theta(y), y, y)+(diff(theta(y), y))/y)/Nb = 0)

ODEs := Matrix(3, 1, {(1, 1) = diff(diff(v(y), y), y)+(diff(v(y), y))/y-(Ha^2/(1-eta)^2+1/y^2)*v(y)-Re*v(y)*(diff(v(y), y)) = 0, (2, 1) = diff(diff(theta(y), y), y)+Ec*Pr*(diff(v(y), y)-v(y)/y)^2-Pr*Re*v(y)*(diff(theta(y), y))+Nb*(diff(theta(y), y))*(diff(phi(y), y))+Nt*(diff(theta(y), y))^2 = 0, (3, 1) = diff(diff(phi(y), y), y)-Re*Sc*v(y)*(diff(phi(y), y))+Nt*(diff(diff(theta(y), y), y)+(diff(theta(y), y))/y)/Nb = 0})

(1)

BCs := `<,>`(phi(eta) = 1, v(eta) = 1, theta(eta) = 1, phi(1) = 0, theta(1) = 0, v(1) = 0)

BCs := Matrix(6, 1, {(1, 1) = phi(eta) = 1, (2, 1) = v(eta) = 1, (3, 1) = theta(eta) = 1, (4, 1) = phi(1) = 0, (5, 1) = theta(1) = 0, (6, 1) = v(1) = 0})

(2)

param_names := [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr];

[eta, Ha, Ec, Nt, Nb, Re, Sc, Pr]

(3)

pdSolve := subs(_P = param_names, proc ({ eta::realcons := .5, Ha::realcons := 1, Sc::realcons := .8, Nt::realcons := .1, Nb::realcons := .1, Re::realcons := 2, Ec::realcons := 0.1e-1, Pr::realcons := 10 }) userinfo(1, Solve, `~`[`=`](param_names, _P)); dsolve(eval(`union`(convert(ODEs, set), convert(BCs, set)), `~`[`=`](param_names, _P)), numeric) end proc);

proc ({ Ec::realcons := 0.1e-1, Ha::realcons := 1, Nb::realcons := .1, Nt::realcons := .1, Pr::realcons := 10, Re::realcons := 2, Sc::realcons := .8, eta::realcons := .5 }) userinfo(1, Solve, `~`[`=`](param_names, [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr])); dsolve(eval(`union`(convert(ODEs, set), convert(BCs, set)), `~`[`=`](param_names, [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr])), numeric) end proc

(4)

infolevel[Solve] := 1:

Fig. 3 (changing values of Ha):

P:= Ha:
vals:= [1, 5, 10, 20]:
sols:= [seq(Solve(P= v), v= vals)]:
colors:= [red, green, blue]:
for F in [v,theta,phi](y) do
   print(plots:-display(
      [seq(
         plots:-odeplot(sols[k], [y,F], color= colors[k], legend= [P= vals[k]]),
         k= 1..nops(vals)
      )],
      labeldirections= [horizontal,vertical]
   ))
od:

Error, pdeplot is not a command in the plots package

 

``


 

Download chapter5.mw

 

Hi guys;

can one please show me how to plot graphs in on layout. i want like soundalgekar2004-deka.pdf using this code

variable.mw
 

restart

with*plots; -1; ode1 := diff(f(eta), eta, eta, eta)-(diff(theta(eta), eta))*(diff(f(eta), eta, eta))/(theta(eta)-R)-(theta(eta)-R)*f(eta)*(diff(f(eta), eta, eta))/(2*R) = 0

diff(diff(diff(f(eta), eta), eta), eta)-(diff(theta(eta), eta))*(diff(diff(f(eta), eta), eta))/(theta(eta)-R)-(1/2)*(theta(eta)-R)*f(eta)*(diff(diff(f(eta), eta), eta))/R = 0

(1)

ode2 := diff(theta(eta), eta, eta)-N*pr*(diff(f(eta), eta))*theta(eta)+(1/2)*pr*f(eta)*(diff(theta(eta), eta)) = 0

diff(diff(theta(eta), eta), eta)-N*pr*(diff(f(eta), eta))*theta(eta)+(1/2)*pr*f(eta)*(diff(theta(eta), eta)) = 0

(2)

bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(38) = 0;

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

(3)

fixedparameter := [pr = 0.2e-1, N = 1];

[pr = 0.2e-1, N = 1]

(4)

ode3 := eval(ode1, fixedparameter);

diff(diff(diff(f(eta), eta), eta), eta)-(diff(theta(eta), eta))*(diff(diff(f(eta), eta), eta))/(theta(eta)-R)-(1/2)*(theta(eta)-R)*f(eta)*(diff(diff(f(eta), eta), eta))/R = 0

(5)

bcs2 := theta(38) = 0, theta(0) = 1;

theta(38) = 0, theta(0) = 1

(6)

ode4 := eval(ode2, fixedparameter);

diff(diff(theta(eta), eta), eta)-0.2e-1*(diff(f(eta), eta))*theta(eta)+0.1000000000e-1*f(eta)*(diff(theta(eta), eta)) = 0

(7)

L := [2, 10, 15];

[2, 10, 15]

(8)

``

for k to 3 do sol_All := dsolve(eval({bcs1, bcs2, ode3, ode4}, R = L[k]), [f(eta), theta(eta)], numeric, output = listprocedure); Y_sol || k := rhs(sol_All[5]); YP_sol || k := -rhs(sol_All[6]); ftheta || k := rhs(sol_All[3]); pftheta || k := -rhs(sol_All[4]) end do:

for k to 3 do L[k], [(Y_sol || k)(0), (YP_sol || k)(0)] end do;

2, [HFloat(1.0000000000000002), HFloat(0.07429586344532203)]

 

10, [HFloat(1.0000000000000007), HFloat(0.06509471738660902)]

 

15, [HFloat(0.9999999999999997), HFloat(0.06453272061469233)]

(9)

NULL

NULL

  plot( [ seq((Y_sol||j)(eta), j = 1..3)],
         eta = 0 .. 6,
         labels = [eta, theta(eta)],
         axes = boxed
      );
plot( [ seq((YP_sol||j)(eta), j = 1..3)],
         eta = 0 .. 6,
         labels = [eta, thetaprime(eta)],
         axes = boxed
      );

 plot( [ seq((ftheta||j)(eta), j = 1..3)],
         eta = 0 .. 6,
         labels = [eta, f(eta)],
         axes = boxed
      );
  plot( [ seq((pftheta||j)(eta), j = 1..3)],
         eta = 0 .. 6,
         labels = [eta, fprime(eta)],
         axes = boxed
      );

 

 

 

 

NULL

``


 

Download variable.mw

 

 Hi guys,

I dont know much about maple, please looking for someone to help me check this maple code as to why it is not running sign.mw . The ode is copied from singh2000-thermometer.pdf.

Thank you for your help

1 2 Page 1 of 2