Good day my good people, how can we plot the classical variables and the main equations under variation of parameters in bvp4c?
And the classical variables are:
The bvp4c code of the problem is:
function sisko5
% Parameter initialization
A = 1;
M = 1;
n = 2;
m = 1;
gamma = 1;
Nt = 1;
Nb = 1;
GrT = 1;
GrC = 2;
Rd = 1;
Sc = 1;
Pr = 1;
Ec = 1;
% Constant calculation
Costant = (m*(2*n – 1) + 1) / (n + 1);
% System of ODE
function dydx = odefun(~, y)
%f = y(1), f’ = y(2), f” = y(3), theta = y(4), theta’ = y(5), phi = y(6), phi’ = y(7)
dydx = zeros(7, 1);
dydx(1) = y(2);
dydx(2) = y(3);
dydx(3) = (-Costant*y(1)*y(3) + m*y(2)^2 – GrT*y(4) – GrC*y(6) + M*y(2))/(A + n*(-y(3))^(n-1));
dydx(4) = y(5);
dydx(5) = (-Costant*y(1)*y(5) – Nb*y(5)*y(7) – Nt*y(5)^2 – Ec*A*y(3)^2 – Ec*(-y(3))^(n+1) – M*Ec*y(2)^2)/((1+4/3*Rd)/Pr);
dydx(6) = y(7);
dydx(7) = -Sc*Costant*y(1)*y(7) – (Nt/Nb)*dydx(5) + gamma*y(6);
end
% Nested function: Boundary conditions
function res = bcfun(ya, yb)
res = zeros(7, 1);
res(1) = ya(2)-1; % y(2) = 1 at eta = 0
res(2) = ya(1); % y(1) = 0 at eta = 0
res(3) = ya(4)-1; % y(4) = 1 at eta = 0
res(4) = Nb*ya(7) + Nt*ya(5); % Boundary condition at eta = 0
res(5) = yb(2); % y(2) = 0 at eta = 10
res(6) = yb(4); % y(4) = 0 at eta = 10
res(7) = yb(6); % y(6) = 0 at eta = 10
end
solinit=bvpinit(linspace(0,10,10),[0 0 0 0 0 0 0]);
sol=bvp4c(@odefun,@bcfun,solinit);
eta=linspace(0,10,100);
y=deval(sol,eta);
plot(eta,y(6,:))
end
Is it possible to do plot under variation of parameter in bvp4c method? It has been a chalenge for me honestly. Can anyone help my good peolple?And the classical variables are:
The bvp4c code of the problem is:
function sisko5
% Parameter initialization
A = 1;
M = 1;
n = 2;
m = 1;
gamma = 1;
Nt = 1;
Nb = 1;
GrT = 1;
GrC = 2;
Rd = 1;
Sc = 1;
Pr = 1;
Ec = 1;
% Constant calculation
Costant = (m*(2*n – 1) + 1) / (n + 1);
% System of ODE
function dydx = odefun(~, y)
%f = y(1), f’ = y(2), f” = y(3), theta = y(4), theta’ = y(5), phi = y(6), phi’ = y(7)
dydx = zeros(7, 1);
dydx(1) = y(2);
dydx(2) = y(3);
dydx(3) = (-Costant*y(1)*y(3) + m*y(2)^2 – GrT*y(4) – GrC*y(6) + M*y(2))/(A + n*(-y(3))^(n-1));
dydx(4) = y(5);
dydx(5) = (-Costant*y(1)*y(5) – Nb*y(5)*y(7) – Nt*y(5)^2 – Ec*A*y(3)^2 – Ec*(-y(3))^(n+1) – M*Ec*y(2)^2)/((1+4/3*Rd)/Pr);
dydx(6) = y(7);
dydx(7) = -Sc*Costant*y(1)*y(7) – (Nt/Nb)*dydx(5) + gamma*y(6);
end
% Nested function: Boundary conditions
function res = bcfun(ya, yb)
res = zeros(7, 1);
res(1) = ya(2)-1; % y(2) = 1 at eta = 0
res(2) = ya(1); % y(1) = 0 at eta = 0
res(3) = ya(4)-1; % y(4) = 1 at eta = 0
res(4) = Nb*ya(7) + Nt*ya(5); % Boundary condition at eta = 0
res(5) = yb(2); % y(2) = 0 at eta = 10
res(6) = yb(4); % y(4) = 0 at eta = 10
res(7) = yb(6); % y(6) = 0 at eta = 10
end
solinit=bvpinit(linspace(0,10,10),[0 0 0 0 0 0 0]);
sol=bvp4c(@odefun,@bcfun,solinit);
eta=linspace(0,10,100);
y=deval(sol,eta);
plot(eta,y(6,:))
end
Is it possible to do plot under variation of parameter in bvp4c method? It has been a chalenge for me honestly. Can anyone help my good peolple? And the classical variables are:
The bvp4c code of the problem is:
function sisko5
% Parameter initialization
A = 1;
M = 1;
n = 2;
m = 1;
gamma = 1;
Nt = 1;
Nb = 1;
GrT = 1;
GrC = 2;
Rd = 1;
Sc = 1;
Pr = 1;
Ec = 1;
% Constant calculation
Costant = (m*(2*n – 1) + 1) / (n + 1);
% System of ODE
function dydx = odefun(~, y)
%f = y(1), f’ = y(2), f” = y(3), theta = y(4), theta’ = y(5), phi = y(6), phi’ = y(7)
dydx = zeros(7, 1);
dydx(1) = y(2);
dydx(2) = y(3);
dydx(3) = (-Costant*y(1)*y(3) + m*y(2)^2 – GrT*y(4) – GrC*y(6) + M*y(2))/(A + n*(-y(3))^(n-1));
dydx(4) = y(5);
dydx(5) = (-Costant*y(1)*y(5) – Nb*y(5)*y(7) – Nt*y(5)^2 – Ec*A*y(3)^2 – Ec*(-y(3))^(n+1) – M*Ec*y(2)^2)/((1+4/3*Rd)/Pr);
dydx(6) = y(7);
dydx(7) = -Sc*Costant*y(1)*y(7) – (Nt/Nb)*dydx(5) + gamma*y(6);
end
% Nested function: Boundary conditions
function res = bcfun(ya, yb)
res = zeros(7, 1);
res(1) = ya(2)-1; % y(2) = 1 at eta = 0
res(2) = ya(1); % y(1) = 0 at eta = 0
res(3) = ya(4)-1; % y(4) = 1 at eta = 0
res(4) = Nb*ya(7) + Nt*ya(5); % Boundary condition at eta = 0
res(5) = yb(2); % y(2) = 0 at eta = 10
res(6) = yb(4); % y(4) = 0 at eta = 10
res(7) = yb(6); % y(6) = 0 at eta = 10
end
solinit=bvpinit(linspace(0,10,10),[0 0 0 0 0 0 0]);
sol=bvp4c(@odefun,@bcfun,solinit);
eta=linspace(0,10,100);
y=deval(sol,eta);
plot(eta,y(6,:))
end
Is it possible to do plot under variation of parameter in bvp4c method? It has been a chalenge for me honestly. Can anyone help my good peolple? bvp4c, fluid dynamics MATLAB Answers — New Questions









