## How to draw Fig. 4

### MINATI (view profile)

on 30 Apr 2019
Latest activity Commented on by MINATI

on 15 May 2019

### Stephan (view profile)

function main
Pr=1; L=-1;D=1;
R=0.1;Sc=1;
% D=input('D='); %%D=0.5, 1, 1.5
xa=0;xb=6;
solinit=bvpinit(linspace(xa,xb,101),[0 1 0 1 0 1 0]);
sol=bvp4c(@ode,@bc,solinit);
xint=linspace(xa,xb,101);
sxint=deval(sol,xint);
figure(1)
plot(xint,sxint(2,:));
xlabel('\eta');
ylabel('f^\prime');
hold on
function res=bc(ya,yb)
res=[ya(1); ya(2)-L-D*ya(3); ya(4)-1; ya(7)-1; yb(2)-1; yb(4);yb(6)];
end
function dydx=ode(x,y)
dydx=[y(2); y(3); y(2)^2-y(3)*y(1)-1; y(5); -3*Pr*y(1)*y(5)/(3+4*R); y(7); -Sc*y(1)*y(7)];
end
end
Actually I dont know the concept of DUAL solution.

### Stephan (view profile)

on 30 Apr 2019
Edited by Stephan

### Stephan (view profile)

on 30 Apr 2019

Hi,
maybe this is useful:
As shown in the link, the results strongly depend on the initial guesses - here is an example:
[sol1, sol2] = main
function [sol1, sol2] = main
Pr=1;
L=-1;
D=[0.5, 1, 1.5];
R=0.1;
Sc=1;
for k = 1:numel(D)
xa=0;xb=6;
solinit1=bvpinit(linspace(xa,xb,101),[0 1 0 1 0 1 0]);
solinit2=bvpinit(linspace(xa,xb,101),[-1 -1 -1 -1 -1 -1 0]);
sol1=bvp4c(@ode,@bc,solinit1);
sol2=bvp4c(@ode,@bc,solinit2);
figure(1)
plot(sol1.x,sol1.yp(1,:),'-r')
xlabel('\eta');
ylabel('f^\prime');
hold on
plot(sol2.x,sol2.yp(1,:),'-b')
end
hold off
function res=bc(ya,yb)
res=[ya(1); ya(2)-L-D(k)*ya(3); ya(4)-1; ya(7)-1; yb(2)-1; yb(4);yb(6)];
end
function dydx=ode(x,y)
dydx=[y(2); y(3); y(2)^2-y(3)*y(1)-1; y(5); -3*Pr*y(1)*y(5)/(3+4*R); y(7); -Sc*y(1)*y(7)];
end
end
results in:
Best regards
Stephan

on 1 May 2019
Sicht => insight
MINATI

on 1 May 2019
OK Stephan
Thanks
MINATI

on 15 May 2019