The equations that I have to solve are :
f"=g(g^2+gamma^2)/(g^2+lambda*gamma^2) ------ (1)g'= 1/3f'^2-2/3(f*f") ------------------------(2)t"+4*Rd*t"/3+ 2*Pr*f*t'/3+ Nb*t'*p'+Nt*(t')^2= 0------(3)p"+(2*Lew*f*p')/3+ Nt*t"/Nb= 0 ------------------------(4)
Where 'lambda', 'gamma', 'Rd', 'Pr', 'Lew', 'Nb', 'Nt' are some parameters
where the boundary conditions are : f=0, f'= delta, t=1, p=1 at y=0 f'–>0, t–>0, p–>0 as y—-> infinity
I tried to solve these equations using 'bvp4c'
I am not getting multiple graphs even after running two 'for' loops for different values of parameters 'lambda', 'Rd'
Please help.
function sol= projclc;clf;clear;global lambda gama Pr Rd Lew Nb Nt deltadelta=1;gama=1;Pr=2;Lew=2; Nb=1;Nt=2;pp=[0.5:0.5:1.5];qq=[0 1 2];figure(1)plot(2,1);hold onsolinit= bvpinit([0:0.01:10],[1,0,0,0,0,0,0]);for i= 1:numel(pp) k=1; for lambda=pp(i) Rd=qq(k);sol= bvp4c(@projfun,@projbc,solinit);k=k+1;solinit= sol; end endplot(2,1);plot(sol.x,sol.y(4,:));hold on endfunction f= projfun(x,y)global lambda gama Pr Rd Lew Nb Ntf= [y(2) y(3)*(y(3)^2+gama^2)/(y(3)^2+lambda*gama^2) y(2)^2/3-(2*y(1)*y(3)*(y(3)^2+gama^2))/(3*(y(3)^2+lambda*gama^2)) y(5) -((2*Pr*y(1)*y(5))/3 + Nb*y(5)*y(7) + Nt*y(5)^2)/(1+4*Rd/3) y(7) -(2*Lew*y(1)*y(7))+ Nt*((2*Pr*y(1)*y(5))/3 + Nb*y(5)*y(7) + Nt*y(5)^2)/Nb*(1+4*Rd/3)];endfunction res= projbc(ya,yb)global deltares= [ya(1); ya(2)-delta; ya(4)-1.0; ya(6)-1.0; yb(2); yb(4); yb(6)];end
Best Answer