Help with iteration convergence.

So I have a system of equations that I need to iterate until convergence.
I've tried doing this with for loops, while loops, symbolicly, and lastly using approximation methods.
Maybe convergence doesnt mean what I think it means, maybe I'm just missing something.
Here is my code...
clear all; close all; clc;
%% Given Data.
T = 20000; % lb
rho = .002377; %slug/ft^3
A = 2827; % ft^3
v_tip = 650; % ft/sec
R = 30; %ft
a = 6; % Lift Curve Slope
Theta_Tw = -10*pi/180; % Radians Twist Rate
gamma = 8.1; % Blade Lock
Cd0 = 0.01;
Sigma = 0.085;
k = 1.15;
mu = linspace(0.05,0.3,26); % Advance Ratio
i_hp = [-10; 0; 10]*(pi/180); % Radians
phi_hp = 0; % Lateral Shaft Tilt
beta1C = 0;
beta1S = 0;
%% Derived Data.
Omega = v_tip/R; % Rad/sec
% Thrust Coefficient of Main Rotor During Trimming Process
CT = T/(rho*A*v_tip^2);
% Constant for Flapping Equations
delta = 1-mu.^2+9*mu.^4/4;
% Initial Conditons
lambda_i_initial = [sqrt(CT/2), CT./(2*mu(2:end))];
% Convergence Equations
lambda = mu.*tan(i_hp)+lambda_i(1,:);
lambda_i = CT./(2*(mu.^2+lambda.^2));
I need to take the initial solution for lambda_i and insert that into the equation for lambda, and then take the lambda solution and insert it into lambda_i, then lambda_i into lambda and so on until convergence.
Any help would be appreciated.

4 Comments

hello
tried your code , had a bit of a hard time to undretsand what you are doing in the last 2 lines (assuming you are doing a loop there, the values never converge to a given solution) . Why are you trying to make a convergence loop for a 2D array ?
do you have a publication or reference document ?
I actually got it to work with a while loop, and the full code ended up with 4 additional equations. So I set all equations initial conditions except lambda_i_initial to zero then ran the while loop until the abs(difference) of the slowest converging equation was equal to 0.0001. As for publication? You can find the method in Rotorcraft Aeromechanics by Wayne Johnson Chapter 6.
Ok , so problem solved ?
Yes sir, turns out I knew what to do. I’m just bad at working a problem for hours at a time and I get mentally fatigued and then I just can’t think straight anymore.

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2021a

Asked:

on 16 Apr 2021

Commented:

on 22 Apr 2021

Community Treasure Hunt

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

Start Hunting!