90 Reputation

9 years, 197 days

@tomleslie , @ Preben Als...

Good day have a look at this codes still i am getting error.

still_error.mw

@tomleslie  Dear please see this e...

Dear sir  please see the  original equations:  Two coupled equations equations are there with bcs. where Nt, Nb are parameters it will take some constant values.these equaions i want to solve .

```Eq1 := diff(theta(r,z),r,r))+(((1/r)*(diff(theta(r,z),r))+Nb*((diff(theta(r,z),r))*diff(sigma(r,z),r))+Nt*(diff(theta(r,z),r)^2)));
Eq2 := (diff(sigma(r,z),r,r))+(((1/r)*(diff(sigma(r,z),r))+(Nb/Nt)*((diff(theta(r,z),r,r))+(1/r)*diff(theta(r,z),r))));
Cd1 := theta(r,z)(h(z),0) = 0, (D(theta(r,z))) = 0;
Cd2 := sigma(r,z)(h(z),0) = 0, (D(sigma(r,z))) = 0;

```

@tomleslie  Thanks sir for nice exp...

@tomleslie  Thanks sir for nice explanation. In this way we have to write the boundary conditions sir

```con[1][0]:=f[0](h)=0,(D(f[0]))(0)=0:
con[2][0]:=g[0](h)=0,(D(g[0]))(0)=0:
for j from 1 to L do:
con[1][j]:=f[j](h)=0,(D(f[j]))(0)=0:
con[2][j]:=g[j](h)=0,(D(g[j]))(0)=0:
```

Directely i am getting an error. Please see the  codes

```with(DETools):
with(plots):
with(IntegrationTools):
Nb:=1:Nt:=1:h(x):=exp(x):
Eq1 := (diff(f(x),x,x))+(((1/x)*(diff(f(x),x))+Nb*((diff(f(x),x))*diff(g(x),x))+Nt(diff(f(x),x)^2))):
Eq2 := (diff(g(x),x,x))+(((1/x)*(diff(g(x),x))+(Nb/Nt)*((diff(f(x),x,x))+(1/x)*diff(f(x),x)))):

# Boundary condition f(x)=0, g(x)=0 at x=h(x)" where h(x) is some function of x",

#f '(x)=0, g'(x)=0 at x=0

Cd1 := f(h(x)) = 0, (D(f))(0) = 0 :
dsys := {Cd1, Eq1}:
dsol := dsolve(dsys, numeric, output = operator):
plots[odeplot](dsol, [x, diff(f(x), x\$1)], 0 .. 5, color = green):
Cd2 := g(h(x)) = 0, (D(g))(0) = 0:
dsys := {Cd1, Cd2, Eq1, Eq2}:
dsol := dsolve(dsys, numeric, output = operator):
plots[odeplot](dsol, [x, f(x)], 0 .. 5, color = red);
plots[odeplot](dsol, [x,g(x)], 0 .. 5, color = black);```

Thanks

@tomleslie Thanks for clear and pat...

Thanks for clear and patience  explanation.

My main intention is to solve coupled differentiation equations solve directly and the same equations i want to solve by using Homotropy perturbation method and compare the two results. By one method of HPM i can produce the graph with more error.

By another method of  HPM codes i can produce the graph of f(x) with less error but g(x) i can't produce the graphs. As i have seen the article by D.D Ganji " Application of He's homotropy perturbation method to boundary layer flow and convection heat transfer over a flat plate" 2007. where he has solve  and compare the results.

Hope you  can solve my query.

Test3.mw

@tomleslie  Sir same equations wit...

Sir same equations with differerent do else why we can not calculate G(x) . In one loop we can figure out and in other we cant.  I want to write this codes

.........................................................

ibvc0 := {f(0),(D(f))(0),(D(f))(5)-1,g(0)-1,g(5)}:

for k from 0 to n do

if k = 0 then
ibvc := expand( eval[recurse]( ibvc0, {f=F,g=G,p=0} ) ):
else
ibvc := { b[k](0), D(b[k])(0), (D@@2)(b[k])(0), c[k](0), D(c[k])(0) }:
end if:

sys := simplify( map( coeff, de, p, k ) ) union ibvc:
soln := dsolve( sys ):

b[k] := unapply( eval( b[k](x), soln ), x ):
c[k] := unapply( eval( c[k](x), soln ), x ):

end do:
..........................

ibvc := f(0), (D(f))(0), (D(f))(5)-1, g(0)-1, g(5)

for k from 0 to 1 do IBVC2 := select(has, CT, c[k]); slv1 := dsolve({coeff(DE2, p, k), op(IBVC2)}); c[k] := unapply(rhs(slv1), x) end do;
G(x) = G(x)+O(p^(n+1));
I above codes working fine and produces the graph.

Test_2.mw

@tomleslie Dear sir,I want to apply...

Dear sir,

I want to apply like this conditions

ibvc0 := {f(0),(D(f))(0),(D(f))(5)-1,g(0)-1,g(5)}:

for k from 0 to n do

if k = 0 then
ibvc := expand( eval[recurse]( ibvc0, {f=F,g=G,p=0} ) ):
else
ibvc := { b[k](0), D(b[k])(0), (D@@2)(b[k])(0), c[k](0), D(c[k])(0) }:
end if:

sys := simplify( map( coeff, de, p, k ) ) union ibvc:
soln := dsolve( sys ):

b[k] := unapply( eval( b[k](x), soln ), x ):
c[k] := unapply( eval( c[k](x), soln ), x ):

end do:

@tomleslie  Dear sir please see the...

@tomleslie  Dear sir please see the files I have same equations  with one method i am getting a solution where as with different method i am unable to plot, i.e I can able to plot for F (x), G(x)  with one method and not able to  produce G(x) with other.

Test_1.mw

@tomleslie If we use this code for ...

@tomleslie If we use this code for equaion F(x) it is running

for k from 0 to n do IBVC1 := select(has, CO, b[k]); slv := dsolve({coeff(DE1, p, k), op(IBVC1)}); b[k] := unapply(rhs(slv), x) end do;
F(x) = F(x)+O(p^(n+1));
plot(eval(F(x), p = 1), x = 0 .. 5);
plot(eval(diff(F(x), x), p = 1), x = 0 .. 5);

Excellent

@Kitonum  Sir in the file attached...

Sir in the file attached how we have to put line +symbol in plot

@Carl Love  Thanks a lot , excelle...

Thanks a lot , excellent sir for quick response

@Carl Love  Thanks for quick respo...

Thanks for quick response but still error.

Sir still i am getting an error, may be some problem in  my codes. Please see the codes

restart:
with(plots):
n:=0.75:Eh:=100:mn:=1:t0:=0.2:
a1:=(mn/t0)^((n-1)/(n))*(tb)^(1/n):a3:=Eh/tb:a4:=(Eh)^2:
U1:=(a1/Eh)*(-1+(a3*r/Eh))^(1/n)*(n*a4/(1+n))*(1/a3-(r/Eh))-a1*(-1+(1/tb))^(1/n)*(n/(n+1)*(tb-1)):
plot([seq(seq(eval(U1,tb=j),j in[0.8,0.9,1.0]))],r=0..1,legend = [tb =0.8, tb=0.9,tb =1.0],  labels = ["z ", "U"], labeldirections = ["horizontal", "vertical"],  linestyle = [solid,dash,dot],color = [black, red,green]);

Thanks a lot

@tomleslie  thanks a lot...

thanks a lot

 1 2 3 4 5 6 7 Last Page 1 of 9
﻿