필터 지우기
필터 지우기

How do I obtain graphs of parameters like Reduced Sherwood no. vs Brownian motion parameter(Nb) from a bvp4c code that I have written

조회 수: 4 (최근 30일)
Following are non-dimensional the set of equations that I have:
f"=g(g^2+gamma^2)/(g^2+lambda*gamma^2) ------ (1)
g'= (1/3)*f'^2-(2/3)*(f*f")+ Mn*f' ------------------------(2)
t"+Rd*t"+ 2*Pr*f*t'/3+ Nb*t'*p'+Nt*(t')^2= 0------(3)
p"+(2*Lew*f*p')/3+ Nt*t"/Nb= 0 ------------------------(4)
'f', 'g', 't', 'p' are the dependent variable and 'η' is the independent variable
gamma, lambda, Mn, Le, Rd, Nb, Nt, Pr are the parameters
converting these higher order equations to first order equations, I have let
f = y1, df/dη = y2, g = y3, t = y4, dt/dη = y5, p = y6, dp/dη = y7
Now, converting the above equations into 1st order ode
y1' = y2,
y2' = {y3*(y3^2+ gamma^2)}/(y3^2+ lambda*gamma^2) ,
y3' = y2^2/3 (2/3)*y1*{y3*(y3^2+ gamma^2)/(y3^2+ lambda*gamma^2)} + Mny2,
y4' = y5,
y5' = (1/(1+Rd))*{(2*Pr*y1*y5)/3 + Nb*y5*y7 + Nt*y5^2} ,
y6' = y7,
y7' = (2*Le*y1*y7)/3 + {Nt/Nb*(1+Rd)}{(2*Pr*y1*y5)/3 + Nb*y5*y7 + Nt*y5^2}
I have solved the above equations numerically using bvp4c solver
However, I am not able to figure how do I plot graphs of
Reduced Sherwood number i.e p'(0) vs Nb or Nt, the Brownian motion and thermophoresis parameter respectively.
I have attached a picture of a graph from an already published research paper for reference.
The bvp4c code that I have used is:
function sol= proj
clc;clf;clear;
global lambda gama Pr Rd Lew Nb Nt Mn m
gama=1;
Lew=1;
Nt=1;
Rd=1;
Pr=5;
Mn=1;
pp=[0.5 1 1.5];
qq=[0.2 0.5 0.9];
%figure(1)
%plot(2,1);hold on
options=bvpset('stats','on','RelTol',1e-9);
m=linspace(0,10);
solinit= bvpinit(m,[1,0,0,0,0,0,0]);
for i=1:numel(pp)
lambda=pp(i);
for i=1:numel(qq);
Nb=qq(i)
sol= bvp4c(@projfun,@projbc,solinit,options);
y1=deval(sol,0)
solinit= sol;
plot(sol.x,sol.y(6,:));hold on
end
end
end
function f= projfun(x,y)
global lambda gama Pr Rd Lew Nb Nt Mn
f= [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))+Mn*y(2)
y(5)
-(2*Pr*y(1)*y(5))/(3*(1+Rd)) - (Nb*y(5)*y(7))/(1+Rd) - (Nt*y(5)^2)/(1+Rd)
y(7)
-(2*Lew*y(1)*y(7))/3+ Nt*((2*Pr*y(1)*y(5))/(3*(1+Rd)) + (Nb*y(5)*y(7))/(1+Rd) + (Nt*y(5)^2)/(1+Rd))/Nb];
end
function res= projbc(ya,yb)
res= [ya(1); ya(2)-1; ya(4)-1.0; ya(6)-1.0; yb(2); yb(4); yb(6)];
end
Could anyone please show me how do I implement the above-written code. to obtain the graphs of Reduced Sherwood no. i.e p'(0) vs Nb or Nt.
  댓글 수: 1
Anil Gautam
Anil Gautam 2018년 11월 25일
I also want to know how to plot such type of graphs usin bvp4c. naygarp . If you got something which is related to this . Plz share

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by