In Fig.1 WE WANT TO VARY G : -1 to 2 (continuous range) in X-axis and M=0,1,2 AND In Fig.2 HOW TO FIND SECOND SOLUTION (LOWER BRANCH SOLUTION) for velocity profile

1 visualización (últimos 30 días)
function main
Pr=1; K=1; G=0; L=-1; n=0.5; S=0.1;
% Pr=input('Pr=');
% K=input('K=');
% G=input('G=');
% L=input('L=');
% n=input('n=');
% S=input('S=');
xa=0;xb=6;
solinit=bvpinit(linspace(xa,xb,100),[0 1 0 1 0 0 1]);
sol=bvp4c(@ode,@bc,solinit);
xint=linspace(xa,xb,100);
sxint=deval(sol,xint);
function res=bc(ya,yb)
res=[ya(1)-S; ya(2)-L; ya(4)+n*ya(3); ya(6)-1; yb(2)-1; yb(4); yb(6);];
end
function dydx=ode(x,y)
dydx=[y(2); y(3); (y(2)^2-1-y(1)*y(3)-K*y(5)-G*(1-y(2)))/(1+K); y(5); 2*(y(2)*y(4)-y(1)*y(5)+K*(2*y(4)+y(3)))/(2+K); y(7); -Pr*y(1)*y(7)];
end
figure(1)
plot(xint,sxint([3],:),'Linewidth',2);
title('Fig.1 Variation of Skin friction coefficient C_{f}')
xlabel('\eta'); %%%%%HERE WE WANT TO VARY G : -1 to 2 (continuous range) in X-axis and M=0,1,2
ylabel('C_{f}');
hold on
figure(2)
plot(xint,sxint([2],:),'Linewidth',2);
xlabel('\eta'); %%% HOW TO FIND SECOND SOLUTION (LOWER BRANCH SOLUTION)
ylabel('f^\prime');
hold on

Respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by