## 13776 Reputation

14 years, 62 days

## Doesn't make...

muh of a difference - see the attached

 > restart;   int(sin(m*Pi*y/a), y = 0 .. a);
 (1)
 >

## This is not...

a code writing service. You are expected to do most of the work!

See the attached two files which produce very similar results using Maple's buil-in numeric solvers, and the HPM method

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 > OdeSys:= diff(U(Y), Y, Y)/(a1*a2) + Theta(Y) + N*Theta(Y)*Theta(Y) - a3*M*M*U(Y)/a2 - kp*kp*U(Y)/(a1*a2),            a5*diff(Theta(Y), Y, Y)/a4 + Pr*Ec*(diff(U(Y), Y)^2 + U(Y)^2*kp*kp)/(a1*a2);   MVals:= [0.5, 1.0, 1.5];   Cond := U(0) = lambda*D(U)(0), Theta(0) = A + g*D(Theta)(0),           U(1) = 0, Theta(1) = B;   for j to numelems(MVals) do       Ans[j]:= dsolve( eval([OdeSys, Cond], M = MVals[j]),                        numeric,                        output = listprocedure                     );       Theta_b[j]:= evalf( Int(eval(U(Y), Ans[j])(Y)*eval(Theta(Y), Ans[j])(Y), Y = 0 .. 1)                           /                           Int(eval(U(Y), Ans[j])(Y), Y = 0 .. 1)                         );   end do;
 (1)
 > with(plots):   cols := [red, blue, black, green, cyan];   display( [ seq( odeplot( Ans[j],                            [Y, diff(U(Y), Y)],                            Y = 0 .. 1,                            color = cols[j]                          ),                   j = 1 .. numelems(MVals)                 )            ],            title = typeset(diff(U(Y), Y), "vs ", Y),            legend = [typeset(M = 0, 5), typeset(M = 1), typeset(M = 1.5)]          );   display( [ seq( odeplot( Ans[j],                            [Y, Theta(Y)],                            Y = 0 .. 1,                            color = cols[j]                          ),                   j = 1 .. numelems(MVals)                 )            ],            title = typeset(Theta(y), "vs ", Y),            legend = [typeset(M = 0, 5), typeset(M = 1), typeset(M = 1.5)]          );
 > interface(rtablesize = 100):   interface(displayprecision = 5):   Matrix( [ [0, M = 0.5, M = 0.5, M = 1, M = 1, M = 1.5, M = 1.5],             [Y, Cf, Nu, Cf, Nu, Cf, Nu],             seq( [ j,                    seq( [ eval(diff(U(Y), Y)/a1, Ans[k])(j),                           eval(-diff(Theta(Y), Y)/(Theta_b[k]*a5), Ans[k])(j)                         ][],                         k = 1 .. numelems(MVals)                       )                  ],                  j = 0 .. 1, 0.1                )           ]         );   interface(rtablesize = 10):   interface(displayprecision = -1):
 (2)
 >

 > restart:
 >
 >
 (1)
 >
 (2)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 > Z := 4:
 > U(Y):=  add((p^(i))*u[i](Y), i = 0 .. Z):
 > Theta(Y):=  add((p^(i))*theta[i](Y), i = 0 .. Z):

 > odeSys:= { (1-p)*(diff(U(Y),Y,Y))/(a1*a2)               +               p*((diff(U(Y),Y,Y))/(a1*a2)+Theta(Y)+N*(Theta(Y)*Theta(Y))-a3*(M*M)*U(Y)/a2-(kp*kp)*U(Y)/(a1*a2)),               (1-p)*a5*(diff(Theta(Y),Y,Y))/a4               +               p*(a5*(diff(Theta(Y),Y,Y))/a4+Pr*Ec*((diff(U(Y),Y))*(diff(U(Y),Y))+(U(Y)*U(Y))*(kp*kp))/(a1*a2))             }:    MVals:=[0.5,1.0,1.5]:    for j from 1 by 1 to numelems(MVals) do        cond:= u[0](0) = lambda*(D(u[0]))(0), theta[0](0) = A+g*(D(theta[0]))(0),               u[0](1) = 0, theta[0](1) = B:        ans[j]:= {}:        for k from 0 by 1 to Z do            ans[j]:= evalf( `union`                            ( ans[j],                              dsolve                              ( { eval                                  ( coeff~(eval(odeSys, M=MVals[j]), p, k),                                    ans[j]                                  )[],                                  cond                                }                              )                            )                         ):            cond:= u[k+1](0) =lambda*(D(u[k+1]))(0), theta[k+1](0) = 0, u[k+1](1) = 0, theta[k+1](1) = 0:        od:        Theta_b[j]:= int( eval(U(Y), [ans[j][], p=1])*eval(Theta(Y), [ans[j][], p=1]), Y=0..1)                     /                     int( eval(U(Y), [ans[j][], p=1]), Y=0..1):    od:
 > with(plots):   cols := [red, blue, black, green, cyan]:   display   ( [ seq       ( plot         ( diff(eval( U(Y), [ans[j][], p=1]),Y),           Y=0..1,           color=cols[j]         ),         j=1..numelems(MVals)       )     ],     title = "diff(U(Y), Y) vs Y)",     legend = [typeset(M = 0.5), typeset(M = 1), typeset(M = 1.5)]   );   display   ( [ seq       ( plot         ( eval( Theta(Y), [ans[j][], p=1]),           Y=0..1,           color=cols[j]         ),         j=1..numelems(MVals)       )     ],     title = "Theta(Y) vs Y)",     legend = [typeset(M = 0.5), typeset(M = 1), typeset(M = 1.5)]   );
 > interface(rtablesize=100):   interface(displayprecision=5):   Matrix( [ [ Y, Cf,  Nu, Cf,  Nu, Cf,  Nu],               seq               ( [ j,                   seq( [eval(diff(U(Y),Y)/a1,[ans[k][], Y=j,p=1]),                         eval(-1/(Theta_b[k])*diff(Theta(Y),Y)/a5,[ans[k][],Y=j,p=1])                        ][],                        k=1..numelems(MVals)                      )                                  ],                 j=0..1, 0.1               )           ]       );   interface(rtablesize=100):   interface(displayprecision=-1)
 (3)
 >

## Ids there no end...

to what yoiu want?

There are two attached files: one solve the problem using  Maple's built-in hunerical solvers, and one using the "HPM method". They produce the following two tables (where I have restricted the display precision (but not the precision used in actual calculation), just to make comparisons easier.

Maple's numeric solvers

HPM method

OK, these are different, but generally they are within about 3%. Since I have absolutely no idea how accurate I would expect a 4-term HPM method to be, such a discrepancy doesn't bother me much

more2.mw

bhpm2.mw

## Worksheet...

with requested graphs and table is attached.

At no time did I enter as input either U(Y)(Y) or Theta(Y)(Y).

In Maple output, this is an artefact of using the option output=listprocedure in the dsolve() command. Maple will give the relevant procedures the names U(Y) and Theta(Y), but these are just literal procedureNames. Applying these literal procedure names to a variable 'Y' is what results in U(Y)(Y) and Theta(Y)(Y)

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >

## That depends a lot...

on whether you can define "stream line", "Nussel number" and "skin friction" in terms of the quantities produced in the worksheet.

I can't.

If you can't - then you are stuffed!

## Well...

Theta_b := 0.418387093869607
Q := 0.0869578833401966

The attached file where I have corrected all the syntax errors (too many to list), fixed the logical errors (too many to list), deeleted all the code which you don't need (about half of it) produces

Theta_b := 0.4131557662
Q := 0.08652473337

Whilst these don't match exactly, the HPM method is an "approximation", so I would say that the agreement is "pretty good". Maybe with more terms in the power series expansion, the agreement would becoome even better, but I haven't got the time/patience to explore this.

 > restart:
 >
 >
 (1)
 >
 (2)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 > Z := 4;
 (3)
 > U(Y):=  add((p^(i))*u[i](Y), i = 0 .. Z) ;
 (4)
 > Theta(Y):=  add((p^(i))*theta[i](Y), i = 0 .. Z) ;
 (5)

 > odeSys:= {(1-p)*(diff(U(Y), Y, Y))/(a1*a2)+p*((diff(U(Y), Y, Y))/(a1*a2)+Theta(Y)+N*(Theta(Y)*Theta(Y))-a3*(M*M)*U(Y)/a2-(kp*kp)*U(Y)/(a1*a2)), (1-p)*a5*(diff(Theta(Y), Y, Y))/a4+p*(a5*(diff(Theta(Y), Y, Y))/a4+Pr*Ec*((diff(U(Y), Y))*(diff(U(Y), Y))+(U(Y)*U(Y))*(kp*kp))/(a1*a2))}:   cond:= u[0](0) = lambda*(D(u[0]))(0), theta[0](0) = A+g*(D(theta[0]))(0), u[0](1) = 0, theta[0](1) = B:   ans:={}:   for k from 0 by 1 to Z do       ans:= evalf(`union`             ( ans,               dsolve               ( { eval                   ( coeff~(odeSys, p, k),                     ans                   )[],                   cond                 }               )            )):        cond:= u[k+1](0) =lambda*(D(u[k+1]))(0), theta[k+1](0) = 0, u[k+1](1) = 0, theta[k+1](1) = 0:   od:
 > Theta_b:=int( eval(U(Y), [ans[], p=1])*eval(Theta(Y), [ans[], p=1]), Y=0..1)          /          int( eval(U(Y), [ans[], p=1]), Y=0..1);   Q:=int( eval(U(Y), [ans[], p=1]), Y=0..1);
 (6)

 > interface(rtablesize=100):   Matrix( [ [ M, Cf,  Nu],               seq               ( [ j,                   eval(diff(U(Y),Y)/a1,[ans[], Y=j,p=1]),                   eval(-1/(Theta_b)*diff(Theta(Y),Y)/a5,[ans[],Y=j,p=1])              ],                 j=0..2, 0.5               )           ]       );   interface(rtablesize=100):
 (7)
 >

you have Pr=7.2, M=1. In your original question (and my original response), you have Pr=0.3, M := .5. Would you expect to get the same answers when you use different parameters?

I have no idea which set of parameters to use.

## It is simple...

I repeat the same two questiions - what are the answers?

How are these "Streamlines, Isotherms and Microrotations". defined in terms of the variables and parameters of the ODE system listed above?

According to the graphic you supply, the "Streamlines, Isotherms and Microrotations" are parameterised by Re , Pr,  Gr and Ha. However Re, Gr, and Ha occur nowhere in the definition of the ODE system. What are these parameters?

## A useful...

first step would be to post a MAple worksheet illustrating the problem, rather than some jumble of images and code

Use the big green up-arrow in the Mapleprimes toolbar

## You define an ODE system...

with the independent variable eta, the dependent variables  f(eta), g(eta), phi(eta), and theta(eta), togeether with the parameters M, N, Pr, S, Sc, d, sigma, C[T], N[b], N[t], Re[r],beta^%H, and d^%H.

You seem to want plots of "Streamlines, Isotherms and Microrotations".

How are these "Streamlines, Isotherms and Microrotations". defined in terms of the variables and parameters of the ODE system listed above?

According to the graphic you supply, the "Streamlines, Isotherms and Microrotations" are parameterised by Re , Pr,  Gr and Ha. However Re, Gr, and Ha occur nowhere in the definition of the ODE system. What are these parameters?

## Since everyting...

in your worksheet appears to execute exactly as expected (see the attachecd), you are going to have to do a much better job of explaining your what your problem is

 > restart; d1 := 0.05; d2 := 0.3; AA := 0.2; BB := 0.1; PDE1 := diff(u(x, t), t) = d1*diff(u(x, t), x, x) + w(x, t)*exp(AA*u(x, t) - BB*v(x, t)); PDE2 := diff(v(x, t), t) = d2*diff(v(x, t), x, x) - w(x, t)*exp(AA*u(x, t) - BB*v(x, t)); PDE3 := 0.0001*diff(w(x, t), t) = diff(w(x, t), x) - 0.8*x + 3.3; IBC1 := u(0, t) = 1, u(1, t) = 0, u(x, 0) = piecewise(x < 0.35, -(4*x)*x + 1, 0.35 < x and x < 0.65, 1.32958 - 1.29167*x, 0.65 < x, 4*(x - 1)^2); IBC2 := v(0, t) = 0, v(1, t) = 1, v(x, 0) = piecewise(x < 0.35, (4*x)*x + 1, 0.35 < x and x < 0.65, 1.32958 - 1.29167*x, 0.65 < x, -4*(x - 1)^2); IBC3 := w(0, t) = 0.5, w(x, 0) = 1 - (0.3*x)*x; pds := pdsolve([PDE1, PDE2, PDE3], [IBC1, IBC2, IBC3], numeric, time = t, range = 0 .. 1); p1 := pds:-plot(t = 0, numpoints = 50); p2 := pds:-plot(t = 1/8, numpoints = 50, color = blue); p3 := pds:-plot(t = 1/4, numpoints = 50, color = green);
 >

## So...

something like the attached - maybe?

 > L:= [ ["O",  3.85090000,  0.45160000,  0.00120000],         ["O", -2.59990000,  1.40410000, -0.00180000],         ["N", -1.57050000, -0.71710000,  0.00010000],         ["C", -0.20660000, -0.42310000, -0.00020000],         ["C",  0.22050000,  0.90470000,  0.00040000],         ["C",  0.72980000, -1.45700000, -0.00070000],         ["C",  1.58410000,  1.19860000,  0.00020000],         ["C",  2.09330000, -1.16290000, -0.00070000],         ["C",  2.52040000,  0.16480000, -0.00030000],         ["C", -2.64850000,  0.17820000,  0.00090000],         ["C", -3.97350000, -0.54200000,  0.00100000],         ["H", -0.44360000,  1.75770000,  0.00120000],         ["H",  0.41130000, -2.49630000, -0.00100000],         ["H", -1.80100000, -1.70860000,  0.00010000],         ["H",  1.90530000,  2.23700000,  0.00090000],         ["H",  2.81800000, -1.97260000, -0.00080000],         ["H", -4.06550000, -1.14630000, -0.90580000],         ["H", -4.79040000,  0.18440000,  0.02880000],         ["H", -4.04450000, -1.18860000,  0.88020000],         ["H",  3.96500000,  1.41760000,  0.00170000]       ]:   a1:={seq( `if`( evalb(L[j,1]="H"), j, NULL), j=1..numelems(L))};   S:={ {1,9}, {1,20},  {2,10},   {3,4},  {3,10},   {3,14}, {4,5},        {4,6}, {5, 7},  {5,12},   {6,8},  {6,13},   {7,9} ,{7,15},        {8,9}, {8,16}, {10,11}, {11,17}, {11,18}, {11,19}      }:   a2:={seq(`if`(`intersect`(j, a1)={}, j, NULL), j in S)};
 (1)
 >

## Change...

the drawGraph command to

`DrawGraph(G, style=spring, showweights=true);`

This works for me, although you may have to start playing with font sizes in order to make things legible

My reading of the relevant section of the help page reproduced (below)

showweights=truefalse
The display of edge weights can be forced or suppressed with the option showweights=true and showweights=false, respectively. By default, the edge weights are displayed when G is a weighted graph with fewer than 46 edges.

is that if the graph has more than 46 edges the display of weights will be suppressed, although interestingly your graph *only* has 39 edges

 3 4 5 6 7 8 9 Last Page 5 of 207
﻿