Você está na página 1de 29
cece! i at etna NewCivil.com | = i | a [eon eer ent tact Ali Moeinadini Yel dum CetecLined RY Borin (cum aaai ttc oan atd AVRO CHM MTEC athe Ronan Croat PC Ret mee Cente ety CRU os Gmee crete tt SSS ut ROM co ketene! PE UElnOut ana aaI nao) So Occ ea oc coon CU eee mn ee ats) NewCivil.com 2D Frame Analysis Using Stiffness Method This program is able to analyze all types of 2D frames (with all degree of freedom) using stiffness method (matrix analysis) under any kind ofconcentrated nodal loadings (Fx, Fy, Mz) and submit values of supportive reactions, nodal displacements, element forces as MATLAB output. General feature of this program includes one “m- file" and an “Excel” input file which to run this program both of them (framem and Frame.xls) must be saved in MATLAB directory. Meanwhile notice that input file (Frame.xls) must be saved as “Excel 2003”. Using this program is very easy and user friendly (ie. for each new example adjus input file and then save it. In entering fil some questions are asked and some tables exist which are related to problem inputs. In this file, variables are shown in blue color). Then using MATLAB software run "frame.m" file, later you can see results in sae MATLAB’s command window. Finally, to test this program, different Examples are given which in these examples program outputs are compared L. with the results from ABAQUS or ANSYS Top software. Similarity of results shows that this program works without any ok e deficiencies as well as these two softwares, 2 \e Ye poe ie ben oh ja nae Suerte NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) yeiveen by: "Sobhan Rostami & Ali Moeinadini" SInput data NNex1sread(*F i=coor (4.1); X{i)=Coor (3,2 YAS }=Coor (54313 end NEazlsread('Frane! Prowwleread('Pran for }=1:NE i=Pro(},1)7 Dir (i, 1)=1; Dir (i,2}=Pro(j.5)¢ Dir (i,3)=Pr0(3,6); end Nowwleread(* *input*, *AD8"); neler sNinput, *Y17 A829 NE=xleread('Frane',"input', Fore=xlsread("Frame', "inp SDefinition of Local stiffness sulmatrixes for each element: LG) msqee¢ (x (Dir (1,3))-x(Dir( 12) )424(W(DLe (4,3) )=¥ (Die (442)))°202 cos {i)=(X(Dir (4,3) }=K (Dir (1,2) ) /L(4)3 sin{i)=(¥ (Dir (,3) )-¥ (Dir G,2)))/L); end ietim S(4)~E (4) (4)/L(4) 937 rll E)mS (2) * [AG)*LG) °2/ GrL(4) 4¢LG4) 21; (4) 0 070 12 6G); 12 ( (2)*(-A()4L(4)*2/1 (4) 0 070 12 GHL(4) 70 ~6L(d) 29L(E)42) 7 kal 4)-8(4)*[-AG)*LG) 92/1 (4) 0 070 ~12 ~6*L(4);0 L(A) 2°L(A)PZI7 22( (2)*[AG)*L) 42/74) 0 070 12 ~6*L(4) 70 -6 Lcd) °2}7 end SDefinition of Transport matrixes for each element: 01 sin(n) Os-sin(n) cosin) 07 end Suerte NewCivil.com Tt (ry F¢AD MAL (yt /ADIN (sete) PADPL2G 2A) Cd Bipesherem teri ty ty eA) 22 Gy AVON (Syed) E end WDefinition of structure stiffness matrix (plant of submatrixes) Kezeros (3*NN, 3*NN); neL:NE i=Dir(n,2); jqDir(n,3}; +4, 3ei-223+4) KL ( SOS )=K12 (2, 26n)7 2344) me BAG )R22 (2, yn) K(345-22349, 345~ pny K(34in2: Sef he end SDefinition of primary extern Fezeros(3*NNy1)+ i=LiNe r=3*Fore(i,1); F(r Fir F(r)=Fore(i,4)7 1 nodal forces vector end SBlemination of rows and columns of K-matrix concern to supports seine r=3¢Cons (1,1 we fazed Le Cona(4,4) s(r-44, OF S{zpr-d44}=07 S(r-d end Ssolution of equation "{F) ne3M; US (i+1,4)/8 55 suit, Hy 2)-Les (22 PAH), )eL*P US): end Suerte NewCivil.com d=zeros(3*NN, 1): din)=Fin)/Sinyn for 1 sun=0; for tim ‘summsunts (1,5) end (i) = (1/8 (4,4))*(P (4) sum end Screation of extemal nodal forces vector: weKtar Scalculation of Global and Local node displacement for each element f :NB. ir in,2)5 j=Dir(n,3); Vi(z, Lon) [ad (3*i-2) pd(3Hi vj (2, Lyn} =[a(345-2) 7403 ULG Apm)aT (sy zen) AVEC Lan) | uj (a Lem)=T( 5, f¢n) 45 (2-1/7 palarinda S71) ASDF end Scalculation of elements forces: 11 (2,2,n) ui (2 ,Lyn)+ k12 (2, ten) tus pdms 21 (zy yn) tud(z;Lem)+ R22 (2,250) U5 (2, 1¢n)F ‘analysis results. disp('2n-fran digp(isi+s+4 Analysis (c sprintf, 3); fprinte('= end Cons (i, 3 fprintt /3); fpeint€('= 8¢\n",wor-1)) end cons (i, 4 fprinté (‘M /3); fprint€('- 8e\n" Wir) Peer imcattad NewCivil.com disp ("Slane for n=1:NE dispcr) fprinté(’ fprinté ("} fprinct(* fprinté(" pDir (ny 2)) 7 DL (n,2)) 7 Dir (my 2)) 7 phe (m3) 3 Dir (ny 3)) 7 pDir(ny3)) 3 gprinte(* fprintf(* fprintf(* fprinté('= fprintt(* fprintf(* PLC, Ln) (2, 1)n)} PACA H(2,1ym P53, 1m Example 1: Determine the reactions, nodal displacements, nodal rotations and elements forces for 2-D frame which is given and then check the results with ANSYS Software, (force unit is Kg and distance unit is Cm) w m ‘60 mo m0 » 2 s 45000 | 45000: ign a S al . gon ee aw! 2s a ¥ 5) = ° slg @ a 20h o 8 8 8 8 8 B a 0 8 o|—_*—o a o 8 o_o For all element : w wo g 1=935em*4 F=216+6kyom-2 @/—____# __ \@ A=228om~2 fi wi 8 0 cost0=86452 © @ — osio-31466 oe ote Bet amr Ta CICy NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) Pagel/3 Written by :" Sobhan Rostami & Ali Moeinadini " M.Sc. students of structural engineering of Azad university of Kerman-iran E-mail: info@neweivil.com "input Data in Excel" 3% Enter number of nodes : 26 % Enternumber of elements: 39 3% Please insert coordinates of the nodes respect to nodes ID: X: horizontal coordinate vertical coordinate 480 540, 540 600 (600 720, 720 780 720 840 840 960 960 1020 1020 1080 1080 ema eet Li ey NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) Page2/3 Whitten by :" Sobhan Rostam! & Ali Moeinadini " MSc, students of structural engineering of Azad university of Kerman-tran E-mail : info@newclvl.com " Input Data in Excel" 3 Please insert properties of the elements,respect to elements ID : D E T A__| Start | End fodulus of elasticity 1 |2d0e-06| 935 | 22.8 fi 3 1: moment of inertia 2 |2u0e06| 935 | 22.8 2 4 A: Area cross section 3 _|2soe-0s| 935 | 22.8 3 4 Start : start node of element 4_|2106+06| 935 | 22.8 3 5 end node of element 5 |2t0e06| 935 | 22.8 4 6 6 [2406-06] 935 | 22.8 3 6 7 _[2.10606|935__|_ 22.8 5 7 3 |2106-065| 935 | 22.8 é 8 9 [2.10606 | 935 __| 22.8 7 8 10 _|2.106+06| 935 | 22.8 7 9 [2.10606] 935 | 22.8 s 40 i2_|2.10606| 935 | 22.8 Ss 10 13 _[2106+06| 935 | 22.8 s it 14_|2106+06| 935 | 228 a B 15_|2.406+06| 935 | 22.8 s B 16 _|2.106+06| 935 | 22.8 10 14 7_|2.106+06| 935 22.8 10 12 18 [2.10606] 935 | 22.8 2 14 19 _|2.106+06| 935 | 22.8 B 14 20_|2.10e+06| 935 | 22.8 B 15 21_|2.106+06] 935 | 22.8 1 16 22 [210606 935 | 22.8 5 16 23_|2.106+06| 935 __|_22.8 5 7 24 [2106-06] 935 | 22.8 7 19 25 [2106-06] 935 | 22.8 15 19 26_|2.106+06| 935 | 22.8 16 20 27_|2.d06+06| 935 | 22.8 16 18 28210606 | 935 | 22.8 18 20 29 |2.106+06| 935 | 22.8 13 20 30_|2.106-06| 935 | 22.8 as 22 31_|2ioe+06| 935 | 22.8 20 2 32_|2106+06| 935 | 22.8 21 2 33 [2106-06] 935 | 22.8 2 B 34210606] 935 | 22.8 B 3 35_|2.106+06| 935 | 22.8 21 3 36 [2.10606] 935 | 22.8 2 25 37_|2.106+06| 935 | 22.8 2 24 38_|2.106+06| 935 | 22.8 24 26 39 [2106-06] 935 | 228 3 26 Bet amr Ta CICy NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) Page3/3 Written by :" Sobhan Rostami & Ali Moeinadini " M.Sc. students of structural engineering of Azad university of Kerman-iran E-mail: info@neweivil.com "input Data in Excel" 3 Enter number of constrained nodes ( number ofsupports) : is ATTENTION : < if your response to questions below is positive please insert code ‘land if it is negative insert '0" > ‘ques(1) 1s this support restrain for displacement in X dir? ‘ques(2): Is this support restrain for displacement in ¥ dir? ‘ques(3) 1s this support restrain for rotation in 2 dir? ~D B 2) ies(3) 1 1 z | 2 i % Enter number of nodes that loaded : 6 X-Force: omount of concentrated force in X direction ¥-force : amount of concentrated force in ¥ direction Zmoment : amount of moment (clockwise is negative) 1D _| Kforce | ¥-force |Z-moment a_| -314.65 | -864.52 | ~45000 12_| -314.65_| -864.52 | -45000 17_| -314.65_| -864.52 | -45000 13_| -314.65 | -864.52 | -45000 23_| -314.65 | -864.52 | -45000 724_| 314.66 | -964.52 | 45000 Peace moe NewCivil.com Node displacement: ‘Elements force ox ° Element-1 dy ° PL = 601898 tetal = 0 vi 1035.05, Ma -58282.5, 2 ° P3 6018.98, ya. ° 3 1035.06 tetaz = 0 va = 659248 x3 = 0.061898 Element-2 ya, -0.0150852 P2 = 831.86 tete3 = -0,00023353 ve = 352899 m2 4191.9 da = 00516154 Pa = 631.86 ya 0.00208486 va 852.899 tetat -0,000182248, ma “54156 x5 = 0.0288936 Element-3 dys. -0.0390823 P3 1538.54 tetas 0.000712678 a 60.181 va 9983.62, de = 0.023672 Pa 1538.54 yo (0.0535824 va 60.181 tetaé = 0.000798309 ma $314.3 a7 = 0.223712 Element-4 oy 0.114787 P3 6495.74 teta7 0.00226338 3 1230.75 Ma 75868.4 ake = 0.228135 Ps 6485.74 ays (0.056275 vs 1230.75, teteB8 = 0.002581 Ms 01633 dx9 = 0.558713 Element-5 yo. 0.12732 Pa 361.899 teted = 0,00224093 va 1065.3 ma = 634703 do = 0.553499 P6 361.899 dy10 = 0.056229 ve = 1065.3 tetaio = 0,00216833 Ms = 90169.7 xt 0.698025, Element-5 dylt 01653845 P5 = 1564.01 tetall = 0,00181775 v5 182.903 Ms = -18683.6 ut 0.696627 P6 1564.01, dyi2 0.502278 ve 182.909 tetal2 = 0,00135601 Me = -13581.9 Part of ANSYS results NewCivil.com NTU NODAL UT! N PER NODE +4484 POST NODAL DEGREE OF FREEDOM LISTING + LOAD STEP= 1 SUBSTEP= 1 TIME 1. 000 LOAD CASE= 0 1G DEGREE OF FREEDOM RESULTS ARE IN THE NODE ux uy uz 1 0.0000 0.0000 0.0000 2 0.0000 0.0000 0.0000 3 -0.618 150858-01 0.0000 208498-02 0.0000 ° d.0000 oo d.0000 oo 0. 0.0000 0. 00000 0 00000 0. T0000 oo -0 co00 =o -0.69663 0 00000. 13 -0.83309 © -0. ‘00000 14 -0.82845 0. ‘0000 0. 15 -1.1047 -0. 10000 16 -1.1112 0.5 0000 17 -1.2087 —--0 0.0000 ie -1.2081 0. 0.0000, 19 -1.3098 = -0. 0.0000, 20 -1 0.50270E-01 0.0000 PRINT ROT NODAL SOLUTION PER NODE +484 POST NODAL DEGREE OF FREEDOM LISTING *++++ LOAD STEP= 1‘ SUBSTEP= 1 TIME 1.0000 LOAD CASE= 0 THE FOLLOWING DEGREE OF FREEDOM RESULTS ARE IN THE GLOBAL COORDINATE SYSTEM NODE ROT: 1 0.0000 2 3 4-0. 5 0 6 0 70. 8 0 9 0 0. 0. 20 13 0.205855. 1a 0:20496E-02 18 0.18258E-02 16 0.1765E~ 17 0.10784E-02 18 0.27686E-03, 19 0.16167E-02 20 0.15633E+02 Part of ANSYS results NewCivil.com PRINT F ELEMENT SOLUTION PER ELEMENT ‘s+#* POSTL ELEMENT NODE TOTAL FORCE LISTING ***** LOAD STE! TIM 1 SUBSTEP 1.0000 LOA casi THE FOLLOWING X,Y,% FORCES ARE IN GLOBAL COORDINATES ELEM 5 ELEM 9 172.91 -378.59 378.59 Part of ANSYS results NewCivil.com NewCivil.com NewCivil.com Part of ANSYS results NewCivil.com sas? 7599 L. 4 “Lit62 wae esu07 NewCivil.com Example 2 : Determine the reactions, nodal displacements, nodal rotations and elements forces for 2-D frame which is given and then check the results with ANSYS ‘Software. (force units Kips and distance unt fs Inch) Ok 15k 10kn 10k a ® s * o wy ok g 100 ein 120k. a ® w Mok ¥ g @ n\® @) « / ® e sk = okh mr © ® ® a @ ® s S ® 8 B @ . om wr |@ ® 9 8 @ @ ia z ® ® Zz * o @ at Y El ot 24a 6 8 a a | OF an @| ® ® ® - a 100m 100 «in 120in——120In 130i 120in_80In._100in The modulus of elasticity (E) for al element is 30000 ksi The area cross section for all element is 15 in~2 The moment of inertia for all element is 150 in~4 Bet amr Ta CICy NewCivil.com 2D-frame analysis using stiffness method (matrix analysis} Pages/3 Written by :" Sobhan Rostami & Ali Moeinadini M.Sc. students of structural engineering of Azad university of Kerman-tran E-mail :info@newcivitcom * Input Data in Excel” % Enter number of nodes : 33 % Enter number ofelements: 44 9% Please insert coordinates of the nodes,respect to nodes ID: D x Y X:: horizontal coordinate 1 ° o Y: vertical coordinate 2 200 o 3 _| 400 o 4_| 520 oO 3 | 70 o 6 | 400 35 7_|_s20 85 a 100. 170. ‘9 | 200 170. 10 | 400 170 1 [520 170 2 | 770 170. 13 | _950 170 14_[ 400 270 15 |__s20 270 16 | _100 370 17_[_200 370 1s_[ 400 370 19_[_520 370 20 [770 370 2a_[ 850 370 22 _[ 400) 480 2 [20 480 24_ [200 590 25 |_400 590 26_[_s20 590 27 [70 580 28_| 100 740 23 [280 740 30_| 400 740 31_| 650 740 32_| 280 875. 33_|__400 875 Bet amr Ta CICy NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) Page2/3, Written by : Sobhan Rostami & Ali Moeinadini " M.Sc. students of structural engineering of Azad university of Kermar-iran E-mail : info@newcivitcom “Input Data in Excel" % Please insert properties of the elements,respect to elements ID: D E 7 A_| Start | End] E: Modulus of elasticity 1 _|3.00E04 | _150 15, 1 8 I: moment of inertia 2 [3.006404 | 150 15 2 S| A: Area cross section 3 [3.00604 150 15, 3 5 _| Start: start node of element 4_|3.006+04| 150, 15 4 z End: end node of element 5 __|3.006+04 | 150 15, 5 2 6 | 3.006+04| 150 5, & 7 7_|3.008+04 | 150 15, 6 10 3 _|3.006+04| 150 15, zi i 9 [3.00604 | 150 15 g 9 70 _|3.006+04 | 150 15, 3 10 a1 [3.006404 | 150 15, rr 2 12 [3.00604 | 150 15, 2 B 13 [3.00604 | 150 15 10 4 14 [3.006404 | 150 15 en 5 15_| 3.006404 | 150 15, 4 5 16 [3.00605 | 150 15, 3 7 17_|3.006+04 | 150 15, 4 8 18 [3.00604 | 150 5, 5 9 19 [3.00604 | 150 15, 2 Fy 20 [3.00608 [150 15 2 20 21_|3.006+04 | 150 15 6 a7 22_|3.006+04 | 150 15, 7 8 23_|3.006+05 | 150 5, 15 22 24_|3.006+05| 150 15 19 2 25_|3.006+05 | _150 15, 2 2 26 _|3.006+04 | 150 15 19 20 27_|3.006+08 | _150 15) 20 21 28_[3.006+06 [150 15, 7 24 29 _|3.006+04 | 150 is 7 3 30_[3.006+04 | _150 15, 22, 3 31_|3.006+08 | 150 15, 23 26 32_|3.006+05 | 150 15, 20 27 33_|3.006+05| 150 15, 24 a 34 _|3.006+05 | 150 15 26 27 35_| 3.006005 | 150 15 24 28 36 [3.006008 | 150 15 25 23 37_[3.006+04 | 150 15, 26 30, 38_|3.006+04 | 150 15 27 31 39_|3.006+04| 150 15 28 29 40_|3.006+05 | 150 15 Fz] 30 41_|3.006+05 | 150 15, 30 31 42_|3.006+05 | 150 15, 23 32 43_ [3.006008 | 150 15, 30 33 44 [3.006404 | 150 15, 32 33 Bet amr Ta CICy NewCivil.com 2D-frame analysis using stiffness method (matrix analysis) Pages /3 Written by :" Sobhan Rostami & Ali Moeinadini " M.Sc, students of structural engineering of Azad university of Kerman-Iran E-mail :info@newcivil.com “Input Data in Excel " %6 Enter number of constrained nodes ( number ofsupports) : 7 ATTENTION << if your response to questions below is positive please insert code ‘ques(1): Is this support restrain for displacement in X dir? ‘ques(2): 15 this support restrain for displacement in ¥ dir? ques(3): Is this support restrain for rotation in 2 dir? ‘and if it is negative insert ‘0! > ques(1) | ques(2) |_ques(3) 0 1 1 oO o Z 1 a 5 Enter number of nodes that loaded : 10 X-force : amount of concentrated force in X direction ¥.force : amount of concentrated force in ¥ direction Z:moment : amount of moment (clockwise is negative) 1D | Kforce | ¥-force |Z-moment i | 400 0. S o 14_| 650 2 16 27, 28 33 31 26 Peace moe NewCivil.com Node displacemer Elements force da = 13.4967 Element-1 aya ° PL 740.641 tetal = 0 vi 28.4014 Mi -2857.08, x2 o Ps -740.641 yz ° ve 28.4014 teta2 = 0 ma 274855 axa ° Element-2 aya ° P2 = 66.5128 tetas = -0,00944347 v2 75.2467 M2 7239.73 xa ° P9 66.5128 dy4 o va 75.2467 tetad = -0.0443055 us = 5552.21 ds = 0 Element-3 dys ° P3 268.287 tetas = 0 v3 53.8819 M3 ° x6 2.02826 P6 268.387 dy = 0.0506953 ve = 53.8819 tetas = -0.0526987 Me -4579.96, x7 1.94436 Element-4 dy? 0.0583662 Pa 308.998, teta7 = 0.019863 va 80.0866 ma ° axe, 9.64434 P7 = 308.998 dye 1.88947 wr 80.0866 teta8 = 0.00246621 7 6807.36 dxg = 9.55545 Element-5 aya -0.0251271 PS 720.433 tetas = -0.0318753 vs 8.59281 Ms 652.595 dxto = 9.40809 P12 -720.433, dy10 0.0897596 viz 8.59281 tetalo = -0.0511768 iz 808.183 oa 0.892711 Element-6 yi. 0.128363 P6 314.605 tetala = -0.057997 ve = 615755 Me 642021 daz = 0.531982 P7 “314.605, dyi2 -0.272163 v7 61.5755 tetal2 = 0.00293888 7 968.841 Part of ANSYS results NewCivil.com PRINT U NODAL S LUTION PER NODE veeee POST] NODAL DEGREE OF FREEDOM LISTING **#¥+ LOAD STEP= —-O_-SUBSTEP: 1 TIME= 1.0000 ° THE FOLLOWING DEGREE OF FREEDOM RESULTS # THE GLOBAL COORDINATE SYSTEM NODE ux vz usum 1 497 0.0000 13.497 2 0.0000 0.0000 0.0000 0.0000, 0.0000 0.0000 4 0.0000 0.0000 0.0000 5 0.0000 0.0000 0.0000 6 2.0283 0.0000 2.0289 7 1sas4 0.0000 1.948: 8 9.6443 0.0000 9.8277 9 9.5555 0.0000 915555 109.4081 0.0000 9.4085 AL 0.89271 0.0000 12 0.53198 0.0000 13 0.0000 0.0000 ag 11.546 0.0000 a5 11.321 0.0000 a6 14.194 0.0000, iy 0.000: 38 0.20039 0.0000 19 9966 0.0000 20 -0.33847 0.0000 1.8389 NT ROT NODAL SOLUTION PER NODE ssse4 POSTL NODAL DEGREE OF FREEDOM LISTING **#¥+ LOAD STEP= 0 SURSTEP= TIME= 1.0000 LOAD CAS! THE FOLLOWING DEGREE OF FRI EDOM RESULTS ARE IN THE GLOBAL COORDINATE SYSTEM NODE, ROTZ 0.0000 0.0000 3 -0,.94435E-02 4 -0.44305E-01 5 0.0000 6 -0.52699E-D1 7 0.19986E-01 8 0.24662E-02 -0.31875E-01 10 -0.51177E-01 LL -0,57997E-01 12 0.29389E-02 13° 0.0000 14 -0.17811E-01 15 0.30503E-02 16 0.4067 7E~03 1) ~0.35318E~ 18 0,13479E-01 19 0.29710E-01 20 -0 6168B-01 Part of ANSYS results NewCivil.com PRINT F ELEMENT SOLUTION PER ELEMENT +4<* POSTL ELEMENT NODE TOTAL FORCE LISTING ***** LOAD STEP= 0.‘ SUBSTEP= 1 TIME= 1.0000 AD CASI THE FOLLOWING X,¥,2 FORCES ARE IN GLOBAL COORDINATES ELEM 1 FX 1 -400.00 5 400.00 ELEM= 1 Fx 6 260.72 10-260 ELEM= 10 14 Part of ANSYS results NewCivil.com Part of ANSYS results NewCivil.com

Você também pode gostar