% %Subroutine with the constraint functions % file name column_conf.m % constraints % Prof. Reyolando Brasil May 2021 function [g,h]=column_conf(x) % renaming design variables x1=x(1);x2=x(2); %data P=50000; % vertical compressive load (N) E=210e9; % elastic modulus (Pa) L=5.0; % column length (m) Sy=250e6; % allowable stress (Pa) Delta=0.25; % allowable displacement at column top % geometric characteristics A=2*pi*x1*x2; % section area W=pi*x1^2*x2; % bending modulus I=pi*x1^3*x2; % moment of inertia e=0.02*x1; % load eccentricity %inequality constraints g(1)=P/A*(1+e*A/W*sec(L*sqrt(P/E/I)))/Sy-1; % allowable stress g(2)=1-pi^2*E*I/4/L^2/P; % buckling g(3)=e*(sec(L*sqrt(P/E/I))-1)/Delta-1; % displacement at column top g(4)=x1/x2/50-1; % Radius/thickness ratio % equality constraints (none) h=[];