bvp4c problem with fewer boundary value than variable

조회 수: 2 (최근 30일)
ulan
ulan 2024년 5월 24일
이동: Walter Roberson 2024년 9월 3일
In my problem i have 11 varaible of y but only 9 boundary conditions what can i do here? Another additional problem is equation 3 and 4 both contain θ₂ and φ₂ how do i write y9' and y11' for them? in my code i took one of the constant as zero. I also tried taking some other boundary condition (f'' and f'')=0 to solve it but solution is unstable.
clc;clear;
work=0;
nnn=0;
aa=.5;
bb=10;
cc=30;
name='B';
sol=main(aa,bb,cc,name);
function sol1=main(aa,bb,cc,name)
sol=jobs(aa);
% sol1=jobs(bb);
% sol2=jobs(cc);
figure('Name',name)
hold on
subplot(2,2,1)
plotting(2,"Pimary Velocity(F')",sol,cc)%,sol1,sol2,aa,bb,
subplot(2,2,2)
plotting(5,"Secondary Velocity(G)",sol,cc)
subplot(2,2,3)
plotting(8,"Concentation 1 (\Xi)",sol,cc)
subplot(2,2,4)
plotting(10,"Temparature(\Theta)",sol,cc)
xlim([0 3.2])
hold off
sol1=sol;
end
function plotting(line,titles,sol,aa)%,sol1,sol2,aa,bb,cc
hold on
grid on
a=plot(sol.x,sol.y(line,:),'r');
% b=plot(sol1.x,sol1.y(line,:),'g');
% c=plot(sol2.x,sol2.y(line,:),'b');
xline(0);
yline(0);
% legend([a; b; c],{num2str(aa); num2str(bb) ;num2str(cc)})
title(titles)
hold off
end
function out=jobs(VARABLE)
RC=.1;FW=.5;
M=0.5;BI =1.5;BE = 1.5;AE = 1+BE*BI;R=0.6;GR=8;
GM=6;PR=.71;EC=0.3; S = 0.5;S0 = 1;K=.5;SC=.6;
D = 2;GAMMA = 1;EPS = .8;ST = 5;STT= .5;
NEBLA = 2;LAMB=.8;short=AE^2+BE^2;XX=1+D;W1=1.5;CP=1.5;DF=.8;n=.01;
sol1 = bvpinit(linspace(0,1,500),[1 1 1 1 1 0 0 0 0 0 1]);
sol = bvp4c(@bvp2d, @bc2d, sol1);
sol1=bvpinit(sol,[0 10]);
sol = bvp4c(@bvp2d, @bc2d, sol1);
% sol1=bvpinit(sol,[0 2]);
% sol = bvp4c(@bvp2d, @bc2d, sol1);
out=sol;
function yvector =bvp2d(~,y)
% if y(1)==0
% y(1)=0.01;
% end
yy4=(-y(4)-y(3)*y(1)-W1*(2*y(4)*y(2)+y(3)^2)+K*y(2)+(M/(AE^2+BE^2))*...
(AE*y(2)+BE*y(5))+R*y(5)-GAMMA*y(2)^2+GM*y(10)+GR*y(8))/(-W1*y(1));
yy7=(-y(1)*y(6)-y(7)-2*W1*y(2)*y(7)+K*y(5)-(M/short)*(AE*y(5)+...
BE*y(2))+R*y(2)+GAMMA*y(5)^2)/(W1*y(1));
% yy11=(y(1)*y(9)-y(1)*y(11)*DF*SC+(EC/CP)*(y(3)^2+y(6)^2)+...
% (M*EC)/short*(y(2)^2+y(5)^2)+RC-DF*SC*(y(10)+1))/(1/PR-DF*S0*SC);
% yy9=(y(1)*y(9)+EC/CP*(y(3)^2+y(6)^2)+M*EC/short*(y(2)^2+y(5)^2))/(-PR);
% yy11=(-y(1)*y(11)-S0*yy9-RC*y(10))*SC;
yy11=(-y(1)*y(11)+RC*y(10))*SC;
yy9=(y(1)*y(9)+EC/CP*(y(3)^2+y(6)^2)+M*EC/short*(y(2)^2+y(5)^2)+DF*yy11)/(-PR);
yvector=[y(2);y(3);y(4);yy4;y(6);y(7);yy7;y(9);yy9;y(11);yy11];
end
function residual=bc2d(y0,yinf)
residual=[y0(1)-FW;y0(2)-1;y0(5);y0(8)-1;y0(10)-1;yinf(3);yinf(4);
yinf(2);yinf(5);yinf(8);yinf(10)];
end
end
  댓글 수: 8
Torsten
Torsten 2024년 5월 24일
He said not to mix these two equation
The two equations are mixed in the state they are now because they both contain θ'' and φ''. If you solve for θ'' and φ'', they become "unmixed" because you explicitly solve for the highest derivatives.
Syed Sohaib Zafar
Syed Sohaib Zafar 2024년 9월 3일
이동: Walter Roberson 2024년 9월 3일
Do you find the answer to this? I'm also solving a problem similar to this. I Considered some extra boundary conditions but results are not quite good.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by