How to idealize a moment curvature plot as a bilinear curve?
10 ビュー (過去 30 日間)
古いコメントを表示
I have a set of data for moment curvature plot considering those I have to idealize it as a bilinear plot
1. Initial values are (0, 0)
2. Final values are (9.093920000000000e-05, 1.970250000000000e+09)
3. Yield values are (4.133600000000000e-06, 1.630480000000000e+09)
Now the initial and final values will remain the same but yield value can change slightly. The idea is simple that area under
both curve (curve made using MC.txt and bilinear curve (sum of traingular and trapezoidal area)) should be same or minimum.
My code is mentioned below
% Determination of Idealized yield moment and curvature
Firstpoint = [Minitial Phiinitial]; % First point in the idealized plot of MC
Secondpoint = [Myield Phiyield]; % Second point in the idealized plot of MC
Lastpoint = [Multimate Phiultimate]; % Last point in the idelaized plot of MC
K = Secondpoint(:,1)/Secondpoint(:,2); % Stiffness based on second point in the idelaized plot of MC
phiincrement = Phiultimate/2000;
Mincrement = K*phiincrement;
Mfinal = K*Phiultimate;
v = 0:Mincrement:Mfinal;
k = v';
NX = numel(v);
% Iterative procedure to get yield curvature and curvature ductility
for Xi = 1:1:NX
areaCurve = trapz(MC(:,2),MC(:,1));
trainglearea(Xi,1) = 0.5*v(Xi)*(v(Xi)/K);
trapeziumarea(Xi,1) = 0.5*(v(Xi)+Lastpoint(:,1))*(Lastpoint(:,2)-(v(Xi)/K));
Bilineararea(Xi,1) = trainglearea(Xi) + trapeziumarea(Xi);
A(Xi,:) = (abs(areaCurve-Bilineararea(Xi))); % Area difference between idelaized and actual plot
end
dlmwrite('bilinearArea.txt',Bilineararea,'newline','pc');
dlmwrite('momentvalues.txt',v','newline','pc');
dlmwrite('Area.txt',A,'newline','pc');
% Idealized yield moment and curvature
[row, col] = min(A);
load momentvalues.txt;
momentvalues(col,1);
yield = momentvalues(col,1)/K;
ductility = Lastpoint(:,2)/(momentvalues(col,1)/K);
mu(:,1) = ductility ;% Curvature ductility
phiy = Phiultimate/mu; % Yield curvature
My = K*phiy; % Yield moment
% Idealized plot of MC
X = [Firstpoint(:,2) phiy Lastpoint(:,2)];
Y = [Firstpoint(:,1) My Lastpoint(:,1)];
plot(X,Y)
hold on
xlabel('Curvature (1/mm)'); ylabel('Moment (N-mm)');
%axis([0 Lastpoint(:,2) 0 2.0*Lastpoint(:,1)])
dlmwrite('Output.txt',[Y(2) X(2) Multimate Phiultimate (Phiultimate/X(2))],'newline','pc')
plot(MC(:,2),MC(:,1))
hold off
grid on
xlabel('Curvature (1/mm)'); ylabel('Moment (N-mm)');
I am not getting the area 0 or minimum its quite high
Can anyone tell what I am doing incorrect in this code?
0 件のコメント
回答 (1 件)
VBBV
2023 年 2 月 2 日
trapeziumarea(Xi,1) = 0.5*(v(Xi)+(Lastpoint(:,2)-Lastpoint(:,1)))*(v(Xi)/K);
Trapezium area may be different as above
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!