imparter

155 Reputation

8 Badges

12 years, 199 days

MaplePrimes Activity


These are questions asked by imparter

whats wrong with the codes while running the codes in maple 13 it will take memory and time as 41.80M, 9.29s while the same code is running in maple 18 it will take 1492.38M , 911.79s

Why the same codes take different time and memory. The codes are here

 

 

restart:
Digits:=15:
d1:=0.2:d2:=0.6:L1:=0.2:L2:=0.2:F:=0.3:Br:=0.3:
Gr:=0.2: Nb:=0.1:Nt:=0.3:B:=1:B1:=0.7:m:=1:k:=0.1:
Ro:=1:R1:=1:q:=1:alpha:=Pi/4:
h:=z->piecewise( z<=d1,    1,
                 z<=d1+L1,   1-(gamma1/(2*Ro))*(1 + cos(2*(Pi/L1)*(z - d1 - L1/2))), 
                        z<=B1-L2/2,  1 ,          
                    z<=B1,  1-(gamma2/(2*Ro))*(1 + cos(2*(Pi/L2)*(z - B1))),
                 z<=B1+L2/2,  R1-(gamma2/(2*Ro))*(1 + cos(2*(Pi/L2)*(z - B1))),
                 z<=B,    R1):
A:=(-m^2/4)-(1/4*k):
S1:=(h(z)^2)/4*A-ln(A*h(z)^2+1)*(1+h(z)^2)/4*A:
a2:=Int((1/S1),z=0..1):
b2:=Int((sin(alpha)/F),z=0..1):
c2:=(1/S1)*(-h(z)^6/(6912*A)-h(z)^4/(9216*A)+h(z)^2/(4608*A^3)+ln(1+A*h(z)^2)*(h(z)^6/(576*A)+h(z)^4/(512*A^2)-1/(4608*A^4))):
c3:=Int(c2,z=0..1):
c4:=2*Gr*(Nb-Nt)*c3:
e2:=(1/S1)*(-7*h(z)^4/(256*A)-h(z)^2/(128*A^2)+ln(1+A*h(z)^2)*(3*h(z)^4/(128*A)+h(z)^2/(32*A^2)+1/(128*A^3))):
e3:=Int(e2,z=0..1):
e4:=2*(Nt/Nb)*Br*e3:
l1:=-a2:
l2:=-b2-c4+e4:
Dp:=q*l1+l2:

igRe:=subsindets(Dp,specfunc(anything,Int),
                         u->Int(Re(op(1,u)),op(2,u),
                                   method=_d01ajc,epsilon=1e-6)):

plot([seq(eval(igRe,gamma2=j),j=[0,0.02,0.06])],gamma1=0.02..0.1,
     adaptive=false,
     legend = [gamma2 = 0.0,gamma2 = 0.02,gamma2 = 0.04],
     linestyle = [solid,dash,dot],
     color = [black,black,black],
     labels=[gamma1,'Re(Dp)'],
     gridlines=false, axes=boxed);

igIm:=subsindets(Dp,specfunc(anything,Int),
                         u->Int(Im(op(1,u)),op(2,u),
                                   method=_d01ajc,epsilon=1e-6)):

plot([seq(eval(igIm,gamma2=j),j=[0,0.02,0.06])],gamma1=0.02..0.1,
     adaptive=false,
     legend = [gamma2 = 0.0,gamma2 = 0.02,gamma2 = 0.04],
     linestyle = [solid,dash,dot],
     color = [black,black,black],
     labels=[gamma1,'Im(Dp)'],
     gridlines=false, axes=boxed);
 

 

Hi, all i am unable to plot the graphs ,can any one help me to overcome the error in plotting the graphs.I am using the maple 13. I am attaching the codes

restart:
with(plots):
with(IntegrationTools):
d1:=0.2:L1:=0.2:L2:=0.2:B1:=0.7:B:=1:beta:=0.01:
d2:=0.6:m:=0.1:k:=0.1: 

h:=z->piecewise( z<=d1,    1,
                z<=d1+L1,   1-(gamma1/(2))*(1 + cos(2*(Pi/L1)*(z-d1-L1/2))), 
                z<=B1-L2/2,  1 ,          
                z<=B1,  1-(gamma2/(2))*(1 + cos(2*(Pi/L2)*(z - B1))),
                z<=B1+L2/2,  1-(gamma2/(2))*(1 + cos(2*(Pi/L2)*(z - B1))),
                 z<=B,    1):
                
A:=(-m^2/4)-(1/(4*k)):
S1:=(h(z)^2)/(4*A)-ln(A*h(z)^2+1)*(1+h(z)^2)/(4*A):
b1:=evalf((1/S1)):               
c1:=evalf(Int(b1,z=0..1)):

plot([seq(eval(c1,gamma2=j),j in[0,0.02,0.06])],gamma1=0.02..0.1,legend = [gamma2 = 0.0, gamma2 = 0.02,gamma2 =0.04],linestyle = [solid,dash,dot],color = [black, black,black],axes=boxed); 
 

Hai, any one can help me to rectify my error

 I have evaluate the codes in maple and got different answer.

restart:
epsilon:=0.2:z:=0.9:m:=10:k:=0.8:
A:=(-m^2/4)-(1/(4*k)):
h(z):=1+epsilon*sin(2*Pi*z):
S1:=(h(z)^2)/(4*A)-ln(A*h(z)^2+1)*(1+h(z)^2)/(4*A):  
g1:=evalf((1/S1));

g1 := 8.821345336-11.12386331*I

but in mathematica i am getting  answer as (27.8647 + 35.2042 I)

ClearAll;
\[Epsilon] = 0.2;
h[z_] = 1 + \[Epsilon]*Sin[2*Pi*z];
m = 10;
k = 0.8;
A = -(m^2/4) - (1/4 k);
S1[z_] = (h[z]^2/4*A) - ((1 + h[z]^2)/4*A)*
    Log[(A*h[z]^2) + 1] /. {z -> 0.9}

 

Hellow, help required to remove the errors

 How to  obtain the pressure drop i am unable to get the output. I am uploading the file  and the equations

help_dp.mw

Help required to get the derire output  for the differential equation . I am attacing the codes and the sample output.

restart:
with(DETools):
a1:=m^2*((1-N)/(2-N))*(r/2)*Dp:
a2:=((1-N)*m^2/(2-N))*(((Nb-Nt)/64)*(r^5/6-h^2*r/2)-(B[r]/4)*(r^3/4-h^2*r/2)*(Nt/Nb)):
a3:=a1-a2:
a4:=r^2*a3:
DE1:=r^2*diff(v(r),r,r)+r*diff(v(r),r)-(m^2*r^2+1)*v(r)=a4:
b1:=dsolve(DE1,v(r)):

2 3 4 5 6 7 8 Last Page 4 of 14