Info

I need assistance in writing a code to solve iteratively this non-linear problem that I have broken down in the example below;

1 view (last 30 days)
George Adomako Kumi on 26 Nov 2021
Closed: John D'Errico on 1 Dec 2021
Q1 = [ 25, 10, 15, 20; 10, 12, 18, 23; 12, 15, 17,19; 15 20, 16, 28 ];
F1 = [ 6;7;12;7];
F2 = [ 48;64;72;75];
iter = 0;
N = 100; % maximum number of iterations
uold = u0;
QA = Q1;
F1 = RF1;
F2 = RFM; % max load capacity
u0 = u1;
dF = 0.2;
[row,col] = size(u);
tol = 0.0001;
syms 'u'
R1 = F2 - F1;
u2 = inv(Q1)*R1;
u3 = u0 + u2;
F3 = F1 + dF;
R2 = F2 - F3; % unbalanced force must be equal to 0 in order to converge
Q2 = F3\u3;
u4 = inv(Q2)*R2;
u5 = u3 + u4;
F4 = F3 + dF;
R3 = F2 - F4;
Q3 = F4\u5;
u6 = inv(Q3)*R3;
u7 = u5 + u6;
F5 = F4 + dF;
R4 = F2 - F5;
Q4 = F5\u7;
u8 = inv(Q4)*R4;
u9 = u7 + u8;
F6 = F5 + dF;
R5 = F3 - F6;
George Adomako Kumi on 26 Nov 2021
This is the first part of the code i am trying to solve. It works by first finding the residual which is the difference in the initial force F1 and F2. Based on that, I will find u2 which happens to be the inverse of Q1 and the residual R1. u3 is also defined as the summation of u0 and u2. I have to further increase the F1 by dF to obtain F3. The last step is to find if the residual force is zero. A solution is obtained once this equals 0 if not the cycle continues until I obtain a value as the difference between the residual F and F2 (MAXIMUM VALUE).
Thanks
Q1 = [ 25, 10, 15, 20; 10, 12, 18, 23; 12, 15, 17,19; 15 20, 16, 28 ];
F1 = [ 6;7;12;7];
F2 = [ 48;64;72;75];
u1 = [ 2;2;3;4];
iter = 0;
N = 100; % maximum number of iterations
uold = u0;
QA = Q1;
F1 = RF1;
F2 = RFM; % max load capacity
u0 = u1;
dF = 0.2;
[row,col] = size(u);
tol = 0.0001;
syms 'u'
R1 = F2 - F1;
u2 = inv(Q1)*R1;
u3 = u0 + u2;
F3 = F1 + dF;
R2 = F2 - F3; % residual force must be equal to 0 in order to converge