KIRAN SAJJAN

35 Reputation

4 Badges

1 years, 72 days

MaplePrimes Activity


These are replies submitted by KIRAN SAJJAN

@C_R

This is the example i want to solve

@acer

How to draw Qz1a[j] versus gamma. At Y=0.5

I can able to draw 

Qz1a[j] versus Y for any value of gamma but reverse i am not able to draw.

Please hlep me to draw with other parameters also i will check once.

Thank you.

 

with(plots):
cols := [red, blue, black,green]:
 plotAA:= display
  ( [ seq
      ( odeplot
        ( Ans1[k],[gamma,Qz1a[k]],
          gamma=0..1,Y=0.5,
          color=cols[k]
        ),
        k=1..numelems(Q1Vals)
      )
    ],
    'axes'= 'boxed','linestyle' = 'solid',labels=[gamma,'Q'],size=[900,700]
  ):
if i kept like this getting error not able to evaluate

@acer

Thank you for your responce sir,

I have another  question

for any value of Y i.e, Y=0.5,

How to write plot commond for Qz1a[j] versus gamma( range of gama from 0 to 1) for different values of Q1

And Thetabz1a[j] versus gamma.

ode_Plots_1_ac.mw

 @SHIVAS 

substituted all the equations, then also no change in the final expressions. 

If any related questions please tag i will check how to impliment they implimented

I have some more equation in the worksheet how to evaluate Q and Thetab terms.

can we substitute P1=(D1*ga+C1)/(1+ga) and P2= (D1-C1)/(1+ga), Z1= -(N*(C1-D1)^2 )/(1+ga)^2,

because the solution is getting long. to reduce the length of equation by substitution with appendixed term

MaplePrimes_ODE_problem.mw

@C_R

I have checked with those posts sir.

There is no answers for this type of questions.

Thank you

@KIRAN SAJJAN

Download sachi_stream_error_3d_ac.mw

How u got that plot directly. I m not getting sir

There sre two different  cases in one it is f(eta) and another is f1(eta)

All equation are ode equations after evaluation of f(eta)

Product with x values   for that need the 3d for x=0..1 and eta =0..10

3d_sachin_p1.mw

In this it is different  for two different parameters nussueslt number plot i need. In work shhet not showing any error but not getting the plot 

@SHIVAS

I also trying for similar graph. Give the solution for this type of problems

It will be helpfull for every one

Thank you

@acer  but i have small dought

for some parameter values Phid, Thetad, diff(Phi(eta,t),eta), diff(Theta(eta,t),eta), remains constant 

for Phid also remains constant for R values  i have tried for others parameters also giving single value for different values of parameters like Kp , Rd 

But in plot it is varing with different parameters error_in_table_value.mw

At pr =7 remains are same as mentioned in above u(y, t)

Horizonatal is y and verticle is t

y= 0..10 and t=0..1 

sir u can keep  y=0 and t=0.5 

i want same plots as mentioned by this person  

I m not getting  some points what u are asking. u can give the plot for that person worksheet only i will understand and according to that i will modify my equations 

thank you

At pr =7 remains are same as mentioned in above u(y, t)

Horizonatal is y and verticle is t

y= 0..10 and t=0..1

1e-10 is ok sir

But i have mentioned about vector plot like i want to check stream lines of the flow by arrows

I have replied with demo plot also but that reply was deleted by some one.

Thank you for your cooperation.

plt[j]:=plot(D[1](U)(0.00001,t)

If i kept 0.00001 as 0 it is not exicuting sir

I want diff(u(y, t), y) at y=0

Not at specific value of y  at y=0 only i need sir

@Carl Love Dear sir for fixed values getting 2d plots but 3d not able to plot
 

restart:````

Digits := trunc(evalhf(Digits))

p1 := 0.1e-1; p2 := 0.2e-1; p3 := 0.1e-1; Px := p1+p2+p3

rf := 1050; kf := .52; cpf := 3617; sigmaf := .8

sigma1 := 25000; rs1 := 5200; ks1 := 6; cps1 := 670

sigma2 := 59.7*10^6; rs2 := 8933; ks2 := 400; cps2 := 385

sigma3 := 2380000; rs3 := 4250; ks3 := 8.9538; cps3 := 686.2

``

B1 := 1+2.5*Px+6.2*Px^2; B2 := 1+13.5*Px+904.4*Px^2; B3 := 1+37.1*Px+612.6*Px^2; B4 := (ks1+2*kf-2*Px*(kf-ks1))/(ks1+2*kf+Px*(kf-ks1)); B5 := (ks2+3.9*kf-3.9*Px*(kf-ks2))/(ks2+3.9*kf+Px*(kf-ks2)); B6 := (ks3+4.7*kf-4.7*Px*(kf-ks3))/(ks3+4.7*kf+Px*(kf-ks3))

a2 := B1*p1+B2*p2+B3*p3

a1 := 1-p1-p2-p3+p1*rs1/rf+p2*rs2/rf+p3*rs3/rf

a3 := 1-p1-p2-p3+p1*rs1*cps1/(rf*cpf)+p2*rs2*cps2/(rf*cpf)+p3*rs3*cps3/(rf*cpf)

a4 := B4*p1+B5*p2+B6*p3

``

a5 := 1+3*((p1*sigma1+p2*sigma2+p3*sigma3)/sigmaf-p1-p2-p3)/(2+(p1*sigma1+p2*sigma2+p3*sigma3)/((p1+p2+p3)*sigmaf)-((p1*sigma1+p2*sigma2+p3*sigma3)/sigmaf-p1-p2-p3))

NULL

NULL



ODEs:= [(a2+K)*(diff(U0(eta), eta,eta))/a1-Ra*(diff(U0(eta), eta))+la0/a1-a5*M1^2*U0(eta)/a1+K*(diff(N0(eta), eta))/a1+la*Ra*Theta0(eta)*(1+Qc*Theta0(eta)), (a2+K)*(diff(U1(eta), eta,eta))/a1-H^2*l1*U1(eta)-Ra*(diff(U1(eta), eta))+la1/a1-a5*M1^2*U1(eta)/a1+K*(diff(N1(eta), eta))/a1+la*Ra*(Theta1(eta))(1+2*Qc*Theta0(eta)), diff(N0(eta), eta,eta)-Ra*a1*Pj*(diff(N0(eta), eta))-2*s1*N0(eta)-s1*(diff(U0(eta), eta)), diff(N1(eta), eta,eta)-Ra*a1*Pj*(diff(N1(eta), eta))-2*s1*N1(eta)-s1*(diff(U1(eta), eta))-H^2*a1*Pj*l1*N1(eta), (a4/(a3*Pr)-delta*Ra^2/H^2+4*Rd*(1+(Tp-1)^3*Theta0(eta)^3+3*(Tp-1)^2*Theta0(eta)^2+(3*(Tp-1))*Theta0(eta))/(3*a3*Pr))*(diff(Theta0(eta), eta, eta))-Ra*(diff(Theta0(eta), eta))+a5*Ec*M1^2*U0(eta)^2/a3+(a2+K)*Ec*(diff(U0(eta), eta))^2/a1+Q*Theta0(eta)/a3+4*(diff(Theta0(eta), eta))^2*Rd*(3*(Tp-1)+6*(Tp-1)^2*Theta0(eta)+3*(Tp-1)^3*Theta0(eta)^2)/(3*a3*Pr), (a4/(a3*Pr)-delta*Ra^2/H^2+4*Rd*(1+(Tp-1)^3*Theta0(eta)^3+3*(Tp-1)^2*Theta0(eta)^2+(3*(Tp-1))*Theta0(eta))/(3*a3*Pr))*(diff(Theta1(eta), eta, eta))-(H^2*l1+2*Ra*l1*delta+Ra)*(diff(Theta1(eta), eta))+(Q/a3-delta*H^2*l1^2)*Theta1(eta)+2*(a2+K)*Ec*(diff(U0(eta), eta))*(diff(U1(eta), eta))/a1+2*a5*Ec*M1^2*U0(eta)*U1(eta)/a3+4*(diff(Theta0(eta), eta, eta))*Theta1(eta)*Rd*(3*(Tp-1)+6*(Tp-1)^2*Theta0(eta)+3*(Tp-1)^3*Theta0(eta)^2)/(3*a3*Pr)+4*Rd*(diff(Theta0(eta), eta))^2*(6*(Tp-1)^2*Theta1(eta)+6*(Tp-1)^3*Theta0(eta)*Theta1(eta))/(3*a3*Pr)+4*Rd*(diff(Theta1(eta), eta))*(diff(Theta0(eta), eta))*(6*(Tp-1)+6*(Tp-1)^3*Theta0(eta)^2+12*(Tp-1)^2*Theta0(eta))/(3*a3*Pr)
]:


(LB,UB):= (0,1):


BCs:= [
  
  U0(0) = 0, U1(0) = 0, N0(0) = 0, N1(0) = 0, Theta0(0) = 0, Theta1(0) = 0, U0(1) = 0, U1(1) = 0, N0(1) = 0, N1(1) = 0, Theta0(1) = 1, Theta1(1) = 0
]:


Params:= Record(
   
   M1=  1.2, Rd=2.1,la=1.5,s1=1.2,Q=0.2,Pj=0.001,Ra=0.8,Ec=0.5,    Pr= 21,   delta= 0.2,    t1= (1/4)*Pi, la0=2,la1=3,   Qc= 0.1,    l1= 1,K=0.4,H=1.2 ,deltat=0.05  ):
   

NBVs:= [   
   (a4+(4*Rd*(1/3))*(1+(Tp-1)*(Theta0(0)+0.1e-2*exp(l1*t1)*Theta1(0)))^3)*((D(Theta0))(0)+0.1e-2*exp(l1*t1)*(D(Theta1))(0)) = `Nu*`     # Nusselt numb
 
]:

Nu:= `Nu*`:

 

Solve:= module()
local
   nbvs_rhs:= rhs~(:-NBVs), #just the names
   Sol, #numeric dsolve BVP solution of any 'output' form
   ModuleApply:= subs(
      _Sys= {:-ODEs[], :-BCs[], :-NBVs[]},
      proc({
         M1::realcons:=  Params:-M1,
         Pr::realcons:= Params:-Pr,
         Rd::realcons:= Params:-Rd,
         la::realcons:= Params:-la,
         Tp::realcons:= Params:-Tp,
         s1::realcons:= Params:-s1,
         Q::realcons:= Params:-Q,
         Pj::realcons:= Params:-Pj,
         Ra::realcons:= Params:-Ra,
         Ec::realcons:= Params:-Ec,
         t1::realcons:=  Params:-t1,
         delta::realcons:= Params:-delta,
         la0::realcons:= Params:-la0,
         la1::realcons:= Params:-la1,
         Qc::realcons:= Params:-Qc,
         K::realcons:= Params:-K,
         l1::realcons:= Params:-l1,
         H::realcons:= Params:-H,
         deltat::realcons:= Params:-deltat
         
      })
         Sol:= dsolve(_Sys, _rest, numeric);
         AccumData(Sol, {_options});
         Sol
      end proc
   ),
   AccumData:= proc(
      Sol::{Matrix, procedure, list({name, function}= procedure)},
      params::set(name= realcons)
   )
   local n, nbvs;
      if Sol::Matrix then
         nbvs:= seq(n = Sol[2,1][1,Pos(n)], n= nbvs_rhs)
      else
         nbvs:= (nbvs_rhs =~ eval(nbvs_rhs, Sol(:-LB)))[]
      fi;
      SavedData[params]:= Record[packed](params[], nbvs)
   end proc,
  ModuleLoad:=()->Init();
export
   SavedData, #table of Records
   Pos, #Matrix column indices of nbvs
   Init:= proc()
      Pos:= proc(n::name) option remember; local p; member(n, Sol[1,1], 'p'); p end proc;
      SavedData:= table();
      return
   end proc ;
   ModuleLoad()
end module:

``


 

NULL

colseq := [red, blue, black, green]

 

#procedure that generates a 2-D plot of an expression versus a varied parameter:
ParamPlot2d:= proc(
   Y::{procedure, `module`}, #procedure that extracts y-value from Solve's dsolve solution
   X::name= range(realcons), #x-axis-parameter range
   FP::list(name= realcons), #fixed values of other parameters
   {
      eta::realcons:= :-LB, #independent variable value
      dsolveopts::list({name, name= anything}):= []  
   }
)
   plot(
      x-> Y(
         Solve(
            lhs(X)= x, FP[],
            #Default dsolve options can be changed by setting 'dsolveopts':
            'abserr'= 0.5e-7, 'interpolant'= false, 'output'= Array([eta]), dsolveopts[]
         )
      ),
      rhs(X),
      #Default plot options can be changed by putting the option in the ParamPlot2d call:
      'numpoints'= 25, 'axes'= 'boxed', 'gridlines'= false,
      'labelfont'= ['TIMES', 'BOLDOBLIQUE', 16],
      'caption'= nprintf(cat("%a = %4.2f, "$nops(FP)-1, "%a = %4.2f"), (lhs,rhs)~(FP)[]),
      'captionfont'= ['TIMES', 16],
      _rest
   )
end proc:

#procedure that extracts Nusselt number from dsolve solution:
GetNu:= (Sol::Matrix)-> Sol[2,1][1, Solve:-Pos(:-Nu)]:

``

RD:= [ 3,3.5,4,4.5]:
plots:-display(
   [seq(
      ParamPlot2d(
         GetNu, H= 1..3, [Pr= 21],
         dsolveopts= [Rd= RD[k], M1=  1.2, la=1.5,Tp=1.3,s1=1.2,Q=0.2,Pj=0.001,Ra=0.8,Ec=0.5,    Pr= 21,   delta= 0.2,    t1= (1/4)*Pi, la0=2,la1=3,   Qc= 0.1,    l1= 1,K=0.4,deltat=0.05 ],
         'legend'= [Rd= RD[k]], 'color'= colseq[k], 'labels'= [H, Nu],size=[600,600]
      ),
      k= 1..nops(RD)
   )]
);

 

 


 

 

#procedure that generates 3-D plots (dropped-shadow contour + surface) of an expression


ParamPlot3d:= proc(
   Z::{procedure, `module`}, #procedure that extracts z-value from Solve's dsolve solution
   X::name= range(realcons), #x-axis-parameter range
   Y::name= range(realcons), #y-axis-parameter range
   FP::list(name= realcons), #fixed values of other parameters
   {
      #fraction of empty space above and below plot (larger "below"
      #value improves view of dropped-shadow contourplot):
      zmargin::[realcons,realcons]:= [.05,0.15],
      eta::realcons:= :-LB, #independent variable value
      dsolveopts::list({name, name= anything}):= [],
      contouropts::list({name, name= anything}):= [],
      surfaceopts::list({name, name= anything}):=[]    
   }
)
local
   LX:= lhs(X), RX:= rhs(X), LY:= lhs(Y), RY:= rhs(Y),
   Zremember:= proc(x,y)
   option remember; #Used because 'grid' should be the same for both plots.
      Z(
         Solve(
            LX= x, LY= y, FP[],
            #Default dsolve options can be changed by setting 'dsolveopts':
            'abserr'= 0.5e-7, 'interpolant'= false, 'output'= Array([eta]),  
            dsolveopts[]
         )
      )
   end proc,
   plotspec:= (Zremember, RX, RY),
   C:= plots:-contourplot(
      plotspec,
      #These default plot options can be changed by setting 'contouropts':
      'grid'= [25,25], 'contours'= 5, 'filled',
      'coloring'= ['yellow', 'orange'], 'color'= 'green',
      contouropts[]
   ),
   P:= plot3d(
      plotspec,
      #These default plot options can be changed by setting 'surfaceopts':
      'grid'= [25,25], 'style'= 'surfacecontour', 'contours'= 6,
      surfaceopts[]
   ),
   U, L #z-axis endpoints after margin adjustment
;
   #Stretch z-axis to include margins:
   (U,L):= ((Um,Lm,M,m)-> (M*(Lm-1)+m*Um, M*Lm+m*(Um-1)) /~ (Um+Lm-1))(
      zmargin[],
      (max,min)(op(3, indets(P, 'specfunc'('GRID'))[])) #actual z-axis range
   );
   plots:-display(
      [
         plots:-spacecurve(
            {
               [[lhs(RX),rhs(RY),U],[rhs(RX),rhs(RY),U],[rhs(RX),rhs(RY),L]], #yz backwall
               [[rhs(RX),rhs(RY),U],[rhs(RX),lhs(RY),U],[rhs(RX),lhs(RY),L]]  #xz backwall
            },
            'color'= 'grey', 'thickness'= 0
         ),
         plottools:-transform((x,y)-> [x,y,L])(C), #dropped-shadow contours
         P
      ],
      #These default plot options can be changed simply by putting the option in the
      #ParamPlot3d call:
      'view'= ['DEFAULT', 'DEFAULT', L..U], 'orientation'= [-135, 75], 'axes'= 'frame',
      'labels'= [lhs(X), lhs(Y), Z], 'labelfont'= ['TIMES', 'BOLDOBLIQUE', 16],
      'caption'= nprintf(cat("%a = %4.2f, "$nops(FP)-1, "%a = %4.2f"), (lhs,rhs)~(FP)[]),
      'captionfont'= ['TIMES', 14],
      'projection'= 2/3,   
      _rest
   )
end proc:

``

 

ParamPlot3d(
   GetNu,H = 1..3, Rd = 3..4, [
   
   Pr= 21   ],
   labels= [H, Rd, Nu]
);

Error, (in plot/iplot2d/levelcurve) could not evaluate expression

 

NULL

NULL


 

Download p6_2d_and_3d_plot_error.mw

1 2 3 4 Page 1 of 4