In[]:=
clear[Re1,A1,Ha,λ,Pr,Rd,Ec,K1,Sc,S1,S2,β,pde1,pde2,pde3,pde4];
In[]:=
pde1[Re1_,A1_,Ha_,λ_]=D[u[t,x,y],t]+u[t,x,y]*(D[u[t,x,y],x])+v[t,x,y]*(D[u[t,x,y],y])D[D[u[t,x,y],x],x]+D[D[u[t,x,y],y],y]+Re1*((Ha+λ)*(A1-1)+A1^2)*(u[t,x,y]);
In[]:=
pde2[Re1_,λ_]=D[v[t,x,y],t]+u[t,x,y]*(D[v[t,x,y],x])+v[t,x,y]*(D[v[t,x,y],y])D[D[v[t,x,y],x],x]+D[D[v[t,x,y],y],y]-(Re1*λ)*(v[t,x,y]);
In[]:=
pde3[Re1_,Pr_,Rd_,Ec_,S1_]=D[theta[t,x,y],t]+u[t,x,y]*(D[theta[t,x,y],x])+v[t,x,y]*(D[theta[t,x,y],y])(1+(4/3)*Rd)/Pr*(D[D[theta[t,x,y],x],x]+D[D[theta[t,x,y],y],y])+2/(x*Pr)*D[theta[t,x,y],x]-(1/x)*(u[t,x,y])*(theta[t,x,y])-(1/x)*((u[t,x,y])*S1)+(Ec/Re1)*(2*(D[u[t,x,y],x])^2+2*(D[v[t,x,y],y])^2+(D[u[t,x,y],y]+D[v[t,x,y],x])^2);
In[]:=
pde4[Re1_,Sc_,K1_,S2_]=D[phi[t,x,y],t]+u[t,x,y]*(D[phi[t,x,y],x])+v[t,x,y]*(D[phi[t,x,y],y])(1/Sc)*(D[D[phi[t,x,y],x],x]+D[D[phi[t,x,y],y],y])+2/(x*Sc)*D[phi[t,x,y],x]-(Re1*K1)*phi[t,x,y]-(1/x)*(u[t,x,y])*S2-(1/x)*(u[t,x,y])*(phi[t,x,y]);
In[]:=
ics[S1_,S2_]={u[0,x,y]0,v[0,x,y]0,theta[0,x,y]1-S1,phi[0,x,y]1-S2};With[{lb=1,uin=1},bcs[Re1_,β_,A1_,S1_,S2_]={{u[t,x,0]Re1*x+(D[u[t,x,y],y]+D[v[t,x,y],x]),v[t,x,0]-β,theta[t,x,0]1-S1,phi[t,x,0]1-S2},u[t,x,uin]Re1*A1*x,v[t,x,uin]0,theta[t,x,uin]0,phi[t,x,uin]0}];
In[]:=
mol[n_Integer,o_:"Pseudospectral"]:={"MethodOfLines","SpatialDiscretization"{"TensorProductGrid","MaxPoints"n,"MinPoints"n,"DifferenceOrder"o}}mol[tf:False|True,sf_:Automatic]:={"MethodOfLines","DifferentiateBoundaryConditions"{tf,"ScaleFactor"sf}}
In[]:=
Clear@solfuncWith[{pts=70,lb=1,L=1},solfunc[Re1_,A1_:0.5,Ha_:1,tend_:2,λ_:2,Pr_:0.6,Rd_:1,Ec_:1,K1_:0.2,Sc_:0.5,S1_:0.1,S2_:0.2,β_:0.3]:=NDSolveValue[{pde1[Re1,A1,Ha,λ],pde2[Re1,λ],pde3[Re1,Pr,Rd,Ec,S1],pde4[Re1,Sc,K1,S2],bcs[Re1,β,A1,S1,S2],ics[S1,S2]},{u,v,theta,phi},{t,0,tend},{x,0,lb},{y,0,L},MethodUnion[mol[pts,4],mol[True,100]]]]
In[]:=
(sollst[#]=solfunc[#])&/@{0.3,0.6};gr=Plot[{sollst[#][[1]][0.1,0.1,y]&/@{0.3,0.6}//Evaluate,sollst[#][[1]][0.2,0.1,y]&/@{0.3,0.6}//Evaluate,sollst[#][[1]][0.2,0.1,y]&/@{0.3,0.6}//Evaluate},{y,0,1},PlotRangeAll,PlotStyle{Red,{Red,Thick,Dashed},Green,{Green,Thick,Dashed},Blue,{Blue,Thick,Dashed},Yellow,{Yellow,Thick,Dashed}},PlotLegendsPlaced[LineLegend[{"Re1= 0.3","Re1= 0.6","Re1= 0.3"}],{0.85,0.3}],FrameLabel{"y","u(t,x,y)"},FrameTrue,FrameStyleDirective[Black,Bold,12],PlotRangeAll,Axes->False]
Out[]=
