bvp4c for coupled interface boundary conditions
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Here I am trying to solve a system of ODE with coupled boundary conditions, but got stucked. I dont know how to define coupled boundary condition in Matlab. Can anybody please help me. If any other information is required please let me know. Moreover, one PDF file is also attached there with name bvp4c with the complete details of the ODE and respective boundary conditions.
function pp(solver)
infinity =1;
maxinfinity=infinity;
pp1=infinity;
pp2=maxinfinity;
%CONSTANTS
%--------------------------------------------------------------------------
p=0.01;
e=0.783;
H=1;
M=1;
a=1.92;
%--------------------------------------------------------------------------
solver = 'bvp4c';
bvpsolver = fcnchk(solver);
infinity = pp1;
maxinfinity = pp2;
Mva=[0.5 1 1.5 2];
colors = ['k','m','r','b'];
for j = 1:4
Le=Mva(j);
for d=Mva(j)
solinit = bvpinit(linspace(0,infinity,45),[1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1]);
sol = bvpsolver(@fsode,@fsbc,solinit);
eta = sol.x;
f = sol.y;
solinit = bvpinit(linspace(0,0.5,100),[0.001 0 0 0]);
sol = bvp4c(@pp2_ode,@pp2_bc,solinit,options);
x = sol.x;
y1 = sol.y(1,:);
y2 = sol.y(2,:);
y3 = sol.y(3,:);
y4 = sol.y(4,:);
figure(5)
plot(real(y(1,:)+p*exp(1i*t)*y(3,:)),eta,colors(j),'LineWidth',2)
plot(real(y(5,:)+p*exp(1i*t)*y(7,:)),eta,colors(j),'LineWidth',2)
hold on
%--------------------------------------------------------------------------
function dydx = pp2_ode(x,y)
dydx = [y(2)
(((M^2)*y(1))-((H)^2))
y(4)
(((M^2)+(i*((H)^2)))*y(3))-((H)^2)
y(6)
-a*((H)^2)
y(8)
((i*a*(H)^2)*y(7))/e-(a*((H)^2))];
end
%--------------------------------------------------------------------------
function res = pp2_bc(ya,yb)
res = [ ya(1)
]
0 Commenti
Risposte (1)
Vedere anche
Categorie
Scopri di più su Boundary Value Problems in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!