bvp4c problem with fewer boundary value than variable
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Torsten
le 24 Mai 2024
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
le 3 Sep 2024
Déplacé(e) : Walter Roberson
le 3 Sep 2024
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.

Réponses (0)
Voir également
Catégories
En savoir plus sur Boundary Value Problems dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!