Unbound Shear Layer boundary condition problem
Mostrar comentarios más antiguos
Hi, I'm very new to Matlab so bare with me, I'm trying to solve the unbounded shear layer problem for the internal section, between z=1 and -1. I cannot however enter the boundary conditon at z=1 to depend on a constant. Any help would be great.
Thanks.
4 comentarios
Alexander Kimbley
el 9 de Abr. de 2019
Torsten
el 10 de Abr. de 2019
And you want to determine "a" such that all three boundary conditions are met ?
Alexander Kimbley
el 10 de Abr. de 2019
Respuesta aceptada
Más respuestas (1)
Alexander Kimbley
el 16 de Abr. de 2019
0 votos
4 comentarios
Torsten
el 16 de Abr. de 2019
What constants are given ? What constants are to be determined ?
Alexander Kimbley
el 16 de Abr. de 2019
function main
xlow = -1; xhigh = 1;
a = 1;
B = 0.5;
c0 = 0.5;
R0 = 0.5;
y10 = 1.0;
y20 = 0.0;
solinit = bvpinit(linspace(xlow,xhigh,4000),[y10,y20],[c0,R0]);
sol = bvp4c(@(x,y,p)bvp4ode(x,y,p,a,B), @(ya,yb,p)bvp4bc(ya,yb,p,a,B), solinit);
c = sol.parameters(1)
R = sol.parameters(2)
xint = linspace(xlow,xhigh,2000);
Sxint = deval(sol,xint);
plot(xint,Sxint(1,:))
end
function dydx = bvp4ode(x,y,p,a,B)
c = p(1);
R = p(2);
dydx = [y(2); 2*B^2*(y(1)-(x-c^2)*y(2))/((x-c^2)^2*((x-c^2)^2-B^2))+a*y(1)];
end
function res = bvp4bc(ya,yb,p,a,B)
c = p(1);
R = p(2);
res = [ya(1)-1; yb(1)-R; ya(2)-((1+c^2)-a*(1+c^2)^2)/(B^2-(1+c^2)^2); yb(2)-R*((1-c^2)-a*(1-c^2)^2)/((1-c^2)^2-B^2)];
end
Alexander Kimbley
el 18 de Abr. de 2019
Editada: Alexander Kimbley
el 18 de Abr. de 2019
Categorías
Más información sobre Boundary Value Problems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!