Numerical solution using Fixed point iteration and Newton-Raphson methods
古いコメントを表示
Trying to solve for inflow ratio (Lambda) using fixed point iteration method and Newton-Raphson method. Also, trying to plot inflow ratio vs advance ratio(mu) for a series of angles attack(alpha), but I cant have both graphs on the same plot, can't figure out where to put the hold on and hold off commands. Also, the two methods should give very close answers but Newton Raphson is not converging for some reason.
Below is my code, I would appreciate the feedback on what I can change to make this code work.
%%
It_Max=15;
error=100;
tol=1e-5;
It=1;
Vstream=50; %ft/s
Vtip=600; %ft/s
Ct=0.0075;
lambda_old=sqrt(Ct/2);
alpha=2:1:16
while error>tol && It<It_Max
mu=(Vstream*cosd(alpha))/(Vtip);
lambda_New=mu.*tand(alpha)+Ct./(2*sqrt(mu.^2+lambda_old));
error=abs((lambda_New-lambda_old)/(lambda_New));
lambda_old=lambda_New;
It=It+1;
plot(mu,lambda_New,'b*--')
%
hold on
f_lambda= lambda_old-mu.*tand(alpha)-((Ct)./(2*sqrt(mu.^2+lambda_old)))
f_lambdaPrime=1+(Ct/2).*(((mu.^2)-(lambda_old).^2).^1.5).*lambda_old
lambda_New=lambda_old - (f_lambda/f_lambdaPrime)
error=abs((lambda_New-lambda_old)/(lambda_New));
lambda_old=lambda_New;
It=It+1;
plot(mu,lambda_New,'k*--')
xlabel('Advanced Ratio')
ylabel('Inflow Ratio')
title('Inflow Ratio Vs Adavnced Flow Ratio')
hold off
end
回答 (1 件)
Brice Carin
2022 年 4 月 26 日
0 投票
Hello
Did you find a solution? because I have the same work to do and I don't know how to do it.
Have a nice day
カテゴリ
ヘルプ センター および File Exchange で Newton-Raphson Method についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!