필터 지우기
필터 지우기

Shooting Method Boundary Conditions not Implementing

조회 수: 2 (최근 30일)
Mayokun  Ojediran
Mayokun Ojediran 2019년 7월 3일
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