Shooting Method Boundary Conditions not Implementing

2 次查看(过去 30 天)
Hello, I am trying to implement the shooting method for in the cods shown.
function Shooting_Method_code1
clc
clear all
x = [0.5 0.5];
options = optimset('Display', 'iter');
x1 = fsolve(@solver,x);
end
function F = solver(x)
options = odeset ('RelTol', 1e-8, 'AbsTol', [1e-8 1e-8 1e-8 1e-8 1e-8]);
[t,u] = ode45(@equation, [0,1], [1 x(1) 0 0 x(2)], options);
s = length(t);
F = [u(s,1)-1, u(s,4)-0];
figure(1)
plot(t,u(:,1), t, u(:,4))
end
function dy = equation(t,y)
n = 0.4;
Bo = 0.01322917839;
dy = zeros(5,1);
dy(1) = y(2);
dy(2) = ((2*n+1)*y(3)*y(2)*Bo^(2/(n+1))/(n+1))/0.2e1;
dy(3) = y(4);
dy(4) = y(5);
dy(5) = ((-y(4)^2*n+2*y(3)*y(5)*n+2*y(1)*n-y(4)^2+y(3)*y(5)+2*y(1))/y(5)^(n-1)/n/(n+1))/0.2e1;
end
The graphs for are not taking the form they're supposed to take. It's a Boundary layer equation.
3 initial conditions are given: eta=0, f(0)=0, f'(0)=1,theta(0)=1
The boundary conditions that needs to be satisfied are: f'(eta=inf)= 0 and theta(eta=inf)=0 as eta=inf.
Any Help would be greatly appreciated.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assembly 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by