0% found this document useful (0 votes)
19 views26 pages

Afonso 2015 Assignment

Something

Uploaded by

Ryan Anderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views26 pages

Afonso 2015 Assignment

Something

Uploaded by

Ryan Anderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 26
Part A: 30 Ven, qoook report | a Encephnal Undwstending of PER, EE \00% Assignment 1- Report MECH419 Afonso Marques 5003027 Francisco Saldanha 5002953 24 April 2015 In this report, as engineering consultants, we will simulate the displacement and the stresses of the structure shown in Figure 1. The maximum design load is 100 kN in the downward vertical and horizontal directions. We distinguished three possible scenarios to solve the problem that will be explained with further detail throughout this report. For each scenario we will analyse the structure and present the results given manually (using Excel), in MATLAB and in ANSYS WORKBENCH. F, = 100KN k= 10Nm rato 4 IR ‘| Tbe Relm re Ol m — 1 008m 6 S88. 200600 Figure First Scenario Manually For this scenario we started by dividing the arch in three FE (2D Frame). We didn’t consider the vertical bar (element 4) for this specific solution. In this scenario the vertical bar doesn’t compress (stress free truss element) it is just a follower and therefore maintains the same length. This means that it doesn’t affect the final solution for the arch. it will be treated in the second scenario (which is a continuation of this first scenario). We will have something similar to structure on the right except the spring support doesn’t move. Manually the spring will not be considered as an extra element, it wll be added to the global assembled characteristic matrix in the correct degree of freedom, 4 ad @ Figure 3 x v Figure a To calculate the stiffness matrix for a particular element in the global system with a specific a and B of inclination, length |, cross section area A, Young's modulus E and moment of inertia I: (ky? = [Ay « (ke) [A] ° 1281 bet 0 oa a OF Af og 7 1281 ae eet = far ly m 8 0 0 0| ~my yo 0 00 0 01 0 0 0| Areaand Moment of inertia 0 00 ly my 0) A= (72) 0 9 0 ~my by 0 + ((2+1)*- @«n)*) 0 00 9 a0 cr Parameters Node x 7] ¥ E = 200+ 10° Pa 10 ° 1 308 poe me 2_| t-cos(80") | cos(60") 20m |_3_| 1-cos(60") | cos(30") yeaa a {oa fa 4= 3500 5 1 jo 108 N/m Table F4X = 100+ 10° N Fay = 100109 N Elements Length, a’) BC) le(0) - i ve v2 Ta a5 22 2 ve 45 “a5 2° 2 3)~O| Ue Oe 15 75 Be 4 a 9 SCO Tables — Stiffness Elementary Matrices After entering all these details in excel we can have the stiffness elementary matrices for the 3 FE of the arch in the global system. (xy un 10816409 agieeroe -2,0066+08 -1,0816409 -$.9186+08 05108 (kp = 2,5868+03 1, 7846+09 24686408 2.586409 5,375E107 w a | 2.00808 53756007 503-07 2006.08 5786-07 1as6es07 14686408 1.468608 3.583607 1,4686+08 -1,4686+08 va 8 w ve 918E+08 -2,006E+08 -1,041E+09 -8,9188+08 41816009 5756007 -9.9186+08 41318109 S.375E+07 7,186E+07 2,0088+08 -5,375E+07 9186108 2,006E+08 1041E+09 8.918e+08 4.31E+09 -5,375E+07 8.918E+08 4,1318+09 2,0066+08 _-5,3756+07 wi v6 17840109 -4468E+08 2.586609 -1,7846+09 25866109 14586108 1,784€+09 -2.5860+09 1A68E108 7,1666+07 1468808 1.468608 A.784E+09 1,468€108 25856909 1,7846+09 25865109 14686108 17848109 2.586E+09 {1A6BE+08 _3,5836+07 _1,468E+08 1.468408 17.4666+07 [KP v3, vs 8. ua va 8, 4ABLE+O9 8.918609 -5,3756+07 -4,1316+09 -8.9186+08 -5,375E407 | UB 8.918608 10416409 2,006E+08 -8.9186+08 -1,0836+09 2,006E+08 | v3 “SATSEAOT 2,006E108 7,1666+07 5,375E+07 -2,006E+08 35836407 | 03 4A3E+09 8.918608 537SE107 4.131609 g.918e+08 5,375.07 | Ua S918E+08 -1,081E+09 -2,0066+08 s.9i8e+08 1,0816+09 -2,006e108 | va 5755407 _2,006£408 35836107 5.375607 _-2,00e008 _7,166¢+07 | Oy Assembling the stiffness matrices for elements 1, 2 and 3, the global stiffness matrixis given by: [xJe woo ww | 4041 8918 2,005 1,041 8.918 2,006 0,000 0,000 0.900 0,000 0,000 0,000 | u E09 E408 E08 E409 E08 EHO «E00 E00 E00 EOE HOO | a Beis 4131 5375 318 4131 5375 0.000 0,000 0.000 000 0,000 0,000 | v coe e609 E407 EOE E09 E407 «EHO E00 EOD EWN HOO EHO | a 2.008 5,375 7,165 2,008 5.375 3583 9.000 0,000 0,600 0,000 0,000 0,000, e108 E07 +07 EHO E407 © G07 EHO E00 «E00 FH00 00 F100 | 8, 1081 3518 2,006 3627 2676 5,375 2586 1,788 1,468 04000 0,000 0,000 | u F109 £408 E408 F109 E409 F407 F109 E409 Fads EHO E400 E00 | 2 8918 4131 5375 2676 6717 9,309 1,784 2586 1,468 0.000 0.000 0000 v £08 G09 €407 E409 F109 £407 sO E409 E408 e000 HOO | 2 2,008 5,375 3583 5,375 91309 1435 1,458 1.468 3,580,000 0,000 0,000 E08 E07 E107 E07 E07 HOH E08 «EHOB £407 HOD E100 E400 | By) 0.900 0.000 0.000 2,586 1,784 1468 6,717 2676 9309 4131 8918 5,375 | U 100 &400 400 t09 E09 Ev0s Er09 E0907 vos E07 | 3 0.000 0,009 0.000 1,784 2,585 1488 2676 3627 5375 8918 1011 2,006 | £100 £100 G00 «£109 E409 Eve E09 E409 «EHO? E108 C409 E08 | 3 0000 0,000 0,000 1468 1468 3.583 9,309 5375 1433 5,375 2006 3,583 £00 400 £400 +08 G08 E07 407 E0708 «EHO? E08 E07 | B, 1,000 0,000 0,000 0,000 0.900 0,000 431 gis 5375 aint agi 5,375 | U £100 +00 £100 E100 E00 EH00 E09 E0407 EH EOS EHOT | 4 0,000 0,000 0,000 0,000 0.000 0,000 as18 1.081 2,006 8.918 1,081 2,006 | v F400 E400 F100 E400 ~FH00 «£00 E40 EOS HOR FH EOD EHS | 4 0,000 0,000 0,000 0,000 0,000 0,000 5,375 20063582 5,375 2,008 7,166 £00400 £00 +00 £400 4006407 E408 6407 __—E+07__Evos F407 | 8, The global system is: Uk]? + (U} = (F) 7 Where is [K]® is a 12x12 matrix, (U} is a 121 vector and {F} is a 12x1 vector. p~ The components of {U} are from the top to the bottom U1, V1, 6;to U4, V4, Band the components of (F)] are FLX, F1Y,MI1 to F4X, FAY, Ma, We need to add the spring (K) to this system in the correct dof corresponding to the entrance of the matrix 4U4 Note that we do this because U4 = FX4— K « U4 Since U1 = V1 = @, =0 [itis a fixed support), we eliminate 1,2 &3 rows and columns of the global system and calculate the solution for the reduced system. Reduced global matrix with soring [KJ w vo &® we we ] 246276009 26766609 527SE007 2,56E09 | L.7RAECH | 1A6BEIB .000e400 oD0E0oONESCO =| 2,6166s09 67276609 93086607 7846109 2.S86E08 LAsHEVOR o.000E400 .00«+00 a.oo0es00 | V2 | S27SE+07 92006607 1,826608 A0HEIO8 L4ssEICE 3.s83E0r .000E+00 GooeEsoo qanocseo | O2 25856109 1. 784E+09 1AG8E+08 G7A7E109 26766109 9.00107 4.36109 arses 537ses07 | U3 | 4.7846109 25866409 LA68E+08 26756109 327E109 S,75E07 .n8E OS ote 2006e+08 | V3 SA6HE,08 14586608 35826607 92096107 Sa7SEIO7 L4s2zE08 Sa7stio7 2o0se08 3sesero7 | A 9900809 9.900809 OD00E00 42816109 gsIseNOe sa7ses07 4asievas ssiecsoe 5373607 | U4 ‘90006100 99D0Eie0 9p00EHO BsIAEOS oHIELO zonKEWOs ouBeIO8 .0c1E109 2,c05E+8 | V4 ‘00006400 _o.00E+00 _oonnE+00 _5.37SE107 _2.006t08 _35836+07 _5,3756%07 2006-06 7.66607 | 94 Considering the two forces applied in node 4 we obtained the following solutions in meters: zai) o iy 6841604 ° ¥ 0 & 9.390603 ° Iu, 79736-03 CCI)" =U) 6 KTP) OF 10" =F Va f= 0 a 100 us =100 vy 0 OF 9,2538-03 Therefore the global system displacement {U} in meters for UandV | -1,3346-02 | and radians to 8 is equal to: -4,6746-02 ,0006+00 | ua .000e-00 | va | oo0e+00 | 8, | ~ 2asieos | uz | ~ -sanie.os | ve |7 -9,3906.03 | 8, | 7o73€03 | us | ~ | sasre0s | va | -aasre.oz | 63 |“ 9.253603 | ua | -agaacce | va | 7 |-a.s7ae-02 | 4 | To calculate the stress in which one of the elements of the curved beam, we used the following expressions: 6 41 6 2 To" TotT 7 ~otpe MTT 6 24 “nt ~e"T 7 me oy = [E+ [B]* + (al® {0} 02 = |E = [8]? = [al* = (U1 ‘We want to calculate the stress on the surface of the elements, therefore y want to obtain the two stresses in each node of the element, that is: a) and we also nodei > 9 nodej > a2 Applying the expressions for the stress given above, we obtained the following stresses for elements 1, 2 and 3: oy (Pa) a, (Pa) 1 4251608 2.883E+08 2 2.946E+08 1.3676+08 ie) 1.430E+08 —6.2526+06 | Table a MATLAB The program is In attachment, and in it we modelled the spring as a FE. If we run program: TwoDframe_main.m on the command window of MATLAB the following menu appears Command Windom 2 = Scenario 2 Figures For this case we have to press 1 and then enter. After this the progeam will ask how many FE we want to model the arch: Insert number of FE for the arch If we choose 3 (the same as given manually) the results will be: ‘We won't show again the stiffness matrices for each element neither the global one, but they are quite similar. The method to calculate the displacements is the same explained in the part done manually. We will just give the results of the displacement and stress as well as a figure developed in MATLAB to plot the structure with and without load. Displacement of the nodes for the entire structure in meters: 0.0000 0.0000 -0.0007 0.0094 0.0073, ~0.0083 0.0150 0.0083 0.0133, 0.0167 Figure 6 ‘The components of u are the same as explained for the manually part except the three final ones correspond to the displacement of the fixed support of the spring, ‘As we can observe the results were quite similar to those obtained manually. For the stresses we had the following results: L.oeto8 «| 4.2406 2.9849 1.4294 L.cesos * 2.8824 1.3669 0.0624 Figure 7 Where stress 1is the stress for the first node of each element and stress 2 is the stress for the final node of each element. This means that for element 1 the stress on node 1 is the first result displayed on stressi and for the same element the stress on node 2 is the first result displayed on stress 2. Stresses are in Pa. The same applies for the other elements, The next figure is the plot of the structure with and without forces applied and the displacements in the figure are multiplied by a factor of 10 so that we can have a better ion of what is happening Sr oF % 1 Figure 8 If we choose more FE to modulate the arch the stiffness of the structure will decrease and therefore the results for the displacements and stresses will be more accurate. ‘The next figure illustrates what we would have if we choose in our program to modulate the arch with 8 FE but we won't show the results for the displacements and stresses since they are 50 many. Figures ANSYS WORKBENCH For the ANSYS WORKBENCH simulation we used a mesh of 23 elements to modulate the curved beam and then added the springs and element 4 as necessary for the different scenarios, For this case we obtained the vertical and horizontal displacements as shown in the next figures: ECTS IVES A * ne Figure 10 Figure 11 ‘The results for the stresses in the structure are as shown in the following figures for the maximum and minimum combined stress: Figure 12 Figure 13, This Table compares the results, for the displacement of node 4, calculated by hand and the results obtained with MATLAB (23 FE) and ANSYS: — Manually MATLAB ANSYS (igi Bgl m (9.253;-13.34)E-03 | (0.0093; -13.3)E-03 (9.55; -14.18)E-03 | Iomaxls Pa 4.2516+08 | 4.22586+08 4.A054E +08 [eminl» Pa iz 6.252E+06 8.53E+06 8.53316+06 Tables Second Scenario Manually Since this a continuation of the first scenario the displacements of the structure are the same but now we have to calculate one more displacement for node 5. In this scenario we'll consider element 4, as a stress free truss element (as explained previously) therefore it won't be necessary to calculate the stiffness matrix for this element. This scenario is only possible if we consider that node 5 is not in the same vertical line as node 4 which means that node 5 can either have a really small offset to the right of node 4 or to the left (we considered 0.001m). This is a more realistic situation; in real scenarios usually there is a small offset. It is quite difficult to align with such a precision for node 4 and 5 to be in the same vertical line. Considering an offset on node 5 so that it can slide freely, element 4 will move to the right if the offset of node 5 is to the right of node 4 and to the left if the offset of node 5 is to the left of node 4, This figure illustrates what happens in this scenario except for the spring support that doesn’t move. ee Will WNT REG Figure 14 Since it maintains the same length to calculate the displacement of node 5 we don’t need much calculations. We obtained the displacement of node 5 (knowing that vs = @s = 0), by applying simple trigonometry. Since element 5 {vertical ate the beginning) has a length of 1m and we already calculated the displacement of node 4, we can calculate the horizontal displacement: us = J? = (1 — val? + v4 - 0.001 = 0.1710 m, if the of fset of node 5 is to the right US = -J1? = (1=V4))? + v4 + 0.001 -0.1525m, if the of fset of node 5 is to the left The stresses are the same as the ones in first scenario and there is no stress on element 4 MATLAB For this case, we have two press 2 and then enter on the menu previously shown for this program, After this another menu will appear on screen: 1 - Offser to the lefe 2 ~ Offset to the right 0 - Exit Figure 15 ‘We can choose whether we want the offset of node 5 to the right or to the left of node 4 or to exit the program. After choosing the option it will ask how many FE we want to modulate the arch. Insert number of FE for the arch To better compare the results we will choose 3 FE. 10 If we choose option number 1: The displacement of the roller in meters is: roller_displacenent_x = 0.1525 Figure 16 [Ewe choose option number 2: The displacement of the roller in meters is: roller_displacenent_x = 0.1710 The next figures are the plot of the structure with and without forces applied. The displacements on both figures are multiplied by a factor of 10 so that we can have a better perception of what is happening except for the displacement of the roller node which is at scale. The one on the left is for option 1 and on the right for option 2. Ea Figure 17 and Figure 12 4 ‘As we can observe the results were quite similar to those obtained manually. ‘The next figures illustrate what we would have if we choose in our program to modulate the arch with 8 FE, With more FE for the arch the results are more accurate like previously noted. For option 1 we would have: Figure 18 a For option 2 we would have: roller_displacerent_x = Figure 19 ‘And we can notice that these are different results from the ones with 3 FE for the arch. They are more accurate. ANSYS WORKBENCH For this scenario, we obtained the vertical and horizontal displacements as shown in the next figures: Figure 20 Figure 21 The results for the stresses in the structure are as shown in the following figures for the maximum and minimum combined stress: Figure 22 Figure 23 2 ‘This Table compares the results, for the displacement of node 4, calculated by hand and the results obtained with MATLAB and ANSYS: ~ [Manually MATLAB ‘ANSYS | us, off set right, 0.1710 0.1710 0.001201 m us,offsetleft,m | -0.1525, 0.1525, | Iomaxl Pa 4.251E+08 4.2258E+08 8.71216+07 [emily Pa 6.2526+06 8,53E406 0.35919E+06 Third Scenario Manually In this scenario we modelled the vertical bar as a spring, to simulate the vertical compression force of a truss element. ‘This can happen if node 4 and 5 are exactly in the same vertical line at the beginning without applied forces. In this scenario we will consider that element 4 is a spring with a fixed support on the ground to simply compress in the vertical direction and not sliding. Since the displacements of the structure are really small compared to scenario 1 we can extrapolate that the displacement of node 5 is the same as the displacement of node 4 (meaning that it compressed and slided). ‘These figures simulate what we are doing: The one on the left is the structure we will solve and the one on the right is the extrapolation we will do. Figure 24 and Figure 25 The vertical spring stiffness is given by: EA _200+10%*9+m = +10? r B00 eT = 22619 + 10° N/m The global system is: IKI? + W} = (F} The global assembled stiffness matrix [I]° is exactly the same as in scenario 1, since we have the same elements 1, 2 and 3 as before. B Where is [K]® is a 1212 matrix, {U} is a 12x1 vector and {F} is a 12x1 vector. The components of {U} are from the top to the bottom U1, V1, @to U4, V4, Bgand the components of {F) are F1X, FLY,MI to FAX, FAY, Ma, We need to add the two springs to this system and to do this we insert the value of K of the two springs in the correct dofs on the stiffness matrix: U4U4 and Vava Note that we do this because U4 = FX4—K + Ud and V4 = F¥4—K + V4 Since U1 = V1 = 0, = 0 (it isa fixed support), we eliminate 1,2 &3 rows and columns of the global system and calculate the solution for the reduced system. «yor we w & wes O, va va 6 se276009 S.7SE07 | 2586E409 17846109 14686408 o.000E1C0 000100 o.00EH0O | UA 2576C+09 67176409 9,3096407 1.784609 25866109 34686408 40006100 0.006400 0,000E100 | V2 SA7SE+07 93096407 14296108 14686+08 14688H08 3,5836+07 9,0008100 0.000€+00 0,0008+00 | @ 2SQ6E109 17846109 1L468EH08 6.717E-09 26766809 9309E+07 4131E109 B.918E:08 5.756407 | Us 4.7B4E109 2586609 14586108 2.676E,09 35278109 5.375607 gai8E0B 1o41E-09 2,0066+08 | VE 14s8e 108 468408 3.5836107 9.5096.07 57SEVO7 24338408 53756107 2.006E~08 3,5836+07 | Bs (90008400 0,0006+00 o.9008+00 42816409 BsIBEICE 5,756.07 .43IEV0S sotBe+os 5,375E007 | UA (9.0008+60 0.000600 ,0008+00 BSIBE+0B 10416109. 2,006e-08 susevoe 3a0aeeon 2,006e008 | va 0006400 _0,0006400 _o.0006100 _S.275E+07 20066108 383.07 5.275607 _2,00se~06 7.166007 | Oy Considering the two forces applied in node 4 we obtained the following solutions in meters for Uand V and radians to @ is equal to: 295x604 | uz (CAI)? # {F) = (0) 6 ((KIOR) « +108 = {V3 p= aasveos | ua 0 0 7,303.05 | va 4,602.08 | 6 Our extrapolation is that the horizontal displacement of node 5 is the same as the horizontal displacement of node &: US = U4 = 0.4857 + 10-9 m {As expected, the displacements in this scenario are smaller than in the first one. Applying the expressions for the stress, we obtained the following stresses (o, and 02) for elements 1, 2 and 3: 14 = 7 (Pa) (Pa) | a "8.292 76+07 06083107 2 (0.35916+07 31069807 3 3.13646407 1,0032+07 MATLAB . For this scenario we would have to press 3 and then enter on the first menu previously shown, Then we can choose how many FE we want for the arch. The difference from this program to the manually part is that we have modelled the two springs as FE. If we choose 3 (the same as given manually) the results will be for the entire structure in meters for U and V and radians for @ : Figure 26 ‘The components of u are the same as explained for the manually part except the six final ones correspond to the displacement of the fixed supports of the springs. ‘As we can observe the results were quite similar to those obtained manually For the stresses we had the following results: a.oevo7 + 9.2927 0.3581 3.2364 stress? = a.oeso7 « 0.6063 3.1069 1.0052 Where stressi and stress2 have the same meaning explained on scenario 1, Stresses are in Pa. The next figure is the plot of the structure with and without forces applied and the displacements in the figure are multiplied by a factor of 10. 15 Figure 27 If we choose more FE to modulate the arch the stiffness of the structure will decrease and therefore the results for the displacements and stresses will be more accurate. The next figure illustrates what we would have if we choose in our program to modulate the arch with 8 FE but we won't show the results for the displacements and stresses, Figure 28 Just for U4 = 0.5236 * 1073 m = US It is a little bit different than the result with 3 FE but still a very small displacement. ANSYS WORKBENCH For this scenario, we obtained the vertical and horizontal displacements as shown in Figure: Figure 29 Figure 30 16 The results for the stresses in the structure are as shown in the following figures for the maximum and minimum combined stress: Figure 31 Figure 32 This Table compares the results, for the displacement of node 4, calculated by hand and the results obtained with MATLAB and ANSYS: Manually MATLAB /ANSYS: (ug; v4), m_ (4.857; -0.7303)E-04 | (4.857; -0.7.30)E-04 | (7.5727; -0.81977)E-04 lomasl Pa 8.29276+07 8.70106+07 | ‘9.5768E+07 leminl> Pa 0.3591E+07 (0.352E+06 | 06 | Tables Conclusion _~ The displacements and stresses calculated by hand, using MATLAB and ANSYS WORKBENCH, as we already stated for each individual scenario considered, were very similar thus confirming the exactitude of the results obtained. We can say that the results obtained with MATLAB and ANSYS are more exact, due to the fact that we can use more FE to modulate the curved beam. Of all three different ways to get to solutions, ANSYS should have the most precise and exact. Despite the fact that we didn’t present detailed results for more FE in MATLAB (except on the tables that compare results) our program was able to do with as many FE as you would like. The mechanism of the structure presented was quite difficult to model using the FE analysis. We had to create three different scenarios in order to fully understand and explore the problem presented to us. Some elements have a stress applied superior to the yield stress and the displacement for node 4 (loaded) both horizontal and vertical are smaller than 0.5mm in scenario 3 and bigger than this value for scenario 1 and 2. So in the first two scenarios the design doesn’t satisfy that requirement. The yield stress that we have considered is for steel dyieta = 250 MPa. (One solution to this particular problem is to decrease the intensity of the vertical and horizontal forces applied in node 4, since itis said that these intensities are only the maximum design loads. For scenario 1 and 2 with 3 FE for MATLAB we have: v7 Avention: stressi(1,1) is greater than the yield stress Reention: stress2(i,1) 18 greater than the yield stress Aventaon: stressi(i,2) 1s greater than the yield stress Figure 23, ‘And for scenario 3 with 3 FE as well there aren't any stresses bigger than the yield stress. MATLAB program is in the appendix. Team work Both members of this group assignment contributed equally to the final result of this work. Small individual tasks were assigned to each member of the group, in order to facilitate and promote the efficiency of the project, but all members gave theirs opinion, contributed and put effort in making all the different parts of the assignment in the best of each capability 18, Appendix MATLAB % PROGRAM: TwoDframe_main.m : clear all; cle: Self; format shorty ge488* PRE-PROCESSING Scenario 3\n\ 2-0; s=input (‘\n\n 1 - Scenario 1\n\n 2 - Scenario 2\n\n 3 - 0 = Exit\n\n"); if seal n_elem arch = input("\n\n Insert number of FE for the arch\n\n'); TwoDErame_preprocess elseif s==2 zeinput('\n\n 1 - Offset to the left\n\n 2 - Offset to the right\n\n 0 Exit\n\n'); if z==0 break; elseif 2 else disp('Not a valid option’); break; end ‘TwoDErame_preprocess elseif s==3 elem_arch = input ("\n\n Insert number of FE for the arch\n\n"); ‘n_elem_arch = Lnput(‘'\n\n Insert number of FE for the arch\n\n'); ‘TwoDErame_preprocess2 elseif s==0 break else disp('Not a valid option"); break; end 3e*** SOLVING «#84 TwoDframe_assemble TwoDframe solve tte8* POST-PROCESSING ***** Twobframe_stress Twodframe plot. 19 “PROGRAM: TwoDFrame_preprocess.m gresee wEsH eeeee r0°0.15 Soutside radius ris0.08; tinside radius : aradiue of arch is lm 008: Young's modulus of elasticity (N/m*2) nelen = nelem arch + 1; % number of elements nonode = nlelem +1 ; number of nodes X= zeros (i, n_node); Y = zeros (1, n_node}; theta = (pi/2)/n_elem arch; tangle theta depends on number of elements pretereeettco-ordinates of each node***ssr#¥ns for n = O:n_node=2 Sfind the angle is between pi and pi/2 vent]; X (1, v) =1-ratcos(theta*n); Sidentify each x value to a cell related to the y value Y (1, v)=ra*sin(theta*n); end X (, n_node)= 2; Y (1, n_node)= 1; connect = zeros (n_elem, 2)? % node to element assignment connect (v, 1)= ws connect (v, 2)= v+ly end t#0* MATERIAL 6 GEOMETRY PROPERTIES ***** 1 = sqrt ((X{connect (:,2))-X (connect (:,1))).°2 +... (v(connect (:,2)}-¥ (connect (:,1))).*2);_ element length (m) 1_4j = (x(connect (,2))-X (connect (2,1)))-/L(2, cosine cos (alfa) m_4j = (¥ (connect (+, 2))-¥ (connect (:,1))) ./1(1, cosine cos (beta) 3 direction % direction campit ((r0)*2- (ri) *2)7 % cross-sectional area (*2) Aszeros(1,n_elem); for n=0:n_elem-2 venti? Ad, end A (,n_elem 20 Aazepir((2¥r0) *4- (2411) *4)/ (64); 8 izz moment of inertia Iezeros(1,n_ elem); for n=0in elem-2 venti: TQ, v= izes end 1, elem Ezeros(1,n_elem) for n=0:n_elem-2 vent: EU, vise end E (1, 9_elem)=10000; g#*¥¥* BOUNDARY CONDITIONS ASSIGNMENT **** Eixed be=zeros(1,n_node*3); % 1 fixed node / 0 free node fixed be (1, 1)=1; fixed be (1,2)=1; fixed be (1, 3)=1; fixed_be(1,n_node¥3-2)=1; fixed_bc(1,n_node*3-1)=1; fixed be (1, n_node*3)=1; Fezeros(1,n_node*3) $0 either unknown reaction force or no force on node F(1,n_node*3-5)=100000; F(1,n_node*3~4) =-100001 PROGRAM: ‘TwoDFrame_preprocess2.m ‘for the third scenario with two springs qeewee MESH ee 10=0.1; 08; ; Sradius of arch is Im 0029; Young's modulus of elasticity (N/m2) n_elem = n_elem arch + 2; % number of elenents nonode = nelen™#1 ; 4 number of nodes X= zeros(I, n node); Y = zeros(1, n node); Sangle theta depends on number of elements theta = (pi/2)/n_elem_arch; \ttseeteearco-ordinates of each node**s#seeeey for n = 0:n_node~3 ‘find the angle is between pi and pi/2 vent]; X (1, v) *I-ra*cos(theta*n); Sidentify each x value to a cell related te the y value Y (1, v)=ra¥sin(theta*n); end 2 (1, n_nede-1)= 1; (1, nnode-1)~ 07 (1, nonede)= 2; (GQ, nnede)= 1; connect = zeros (n elem, 2); * node to element assignment for n=0:n_elem-1 venti connect (v, 1) connect (v, 2) vets end connect (n_elem,1)=1 connect (n_elem, 2 _node-2; Tnode; Qttee* MATERIAL & GEOMETRY. PROPERTIES ***** L = sqrt ((X(connect (:,2))-X (connect (2,1))).42 te. (¥(connect (:,2))-¥(connect (z,1))).*2)7 & element length (my 1_ij = (X(connect (:,2))-X(connect (:,1)))./1 (1,417 direction cosine cos (alfa) mij = (¥ (connect (:,2))-¥ (connect (:,1))) ./L (1,4 cosine cos (beta) % direction ca=pit ( (r0)*2~ (ri) 72) 5 © cross-sectional area (m2) eros (1,n_elem) ; for n=0:n_elem-2 ventl} A (1, w= cay end A (1,n_elem)=1; izz=pit ((2*r0)*4~(2*ri)*4)/(64); © izz moment of inertia Inzeros(1,n_elem) ; for n=0:n_elen-3 ventl? T (1, v= ize end I (1, n_elem-1)=0, I (1, n_elem) eros (1,n_elem); for n=0:n_elem-2 vent; E(, v= end E (1, n_elem)=1000 2 qets4+ BOUNDARY CONDITIONS ASSIGNMENT *¥** fixed be-zeros (1n-node*3); 1 fixed node / 0 free node Fixed be (1/1 fined Be (1,2)=17 Hixed be (1, 3)=17 Fixed be(1yn nodes3-5)=1 Fixed be (lyn node*3-4 fined be (1/n-node*3-3)=1; Hixed_pe (1, n_node*3-2) Hixed=be (1; n_sode* 3-1 Hixed pe (1, n_node3 5 0 either unknown veaction force or no force eros (1,n_node*3) ; on node F(1,n_node*3-8) F(1,n_node*3-7) SPROGRAM: TwoDFrame_assemble.m Qetterestaansnaaneazaaaeeeaae K global (n_node*3, n_node*3) P_global (1in_node*3) = Fy for i= 1:n_élem prop] = A(i) * Bi) / 1(i); prop2 = 12*E(i) * T(i) / 2(4)3; prop3 = 6*E(i)*1 (i) /1 (1) *27 propa = 4*E()*1(i)/1(i)7 propS = 2*B(i)*1(i)/1(i)7 0; K = (propl 0 ° 0 prop? 0 props =propl 0 ~prop2 prop3, a3) V4) ° ° ° ° K_elem(1:6,1:6) = 16 (rem (3,3) temp1 for j ig 23 elseif (rem(3,3) tempt else temp1 end for k = 1:6 if (rem(k, ‘tomp2 us oF elseif (rem(k, 3) ‘temp2 else -propi 0 prop} 0 propd 0 0 P =prop3 0 props 0 maj) Taga 1 0 0 0 Lambda" uv 2) 3 23 » 1 temp2 = 0; ~prop2 ~prop3 0 prop2 ~prop3 opt o 0 o 0 oo Lady omg) oo ° i mij) 0 Taya) 0 Pes ae “K+ lambda 23 end row = connect (i,ceil(3/3))*3 = temply column = connect (i, ceil (k/3))*3 - temp2s K global (rom, column) = K global (row, column) + K elem(j,k)5 end end end QPROGRAM: TwoDFrame solve.m K_global_modified = K global bé_node = find (fixed be); K_global_modi fied (be node, m= length (be_node) ; for i= lim K_global_modified(bc_node(i),be_node(i}) = 14 end u = K global_modified\P global’ for *n_node: if abs(u(i,1))>0.5e-3 & check if there are displacements bigger than 0.5mm desprinté(‘Atention: displacement u(3d, 1) is greater than 0. 5mm", 1) 5 disp (dl; else end end gaseueeeesortset calculationts*ss+# Sfinal coordinates of node connecting spring and frame for Racenario 2 y_finalnode_arch = ¥(n_node-1)+ u(n_node*3~4) ; x_finalnede_arch = X{n_node-1)+ u(n_node*3-5) ; % 280 scenario 1 or 3 (set by deffault) & 2-1 for offset to the left (scenario 2), z=2 for offset to the right (scenario 2) but this is asked when the program is run if aeel; x_xoller=1-0.001; Roffset 0.001m to the left y_roller: x_roller_final = x finalnode arch - sqrt (1*2-y_finalnode_arch*2); Sim iS the 1énght of the bar y_roller_final= 0; roller_displacement_x = x_roller_s inal-x_roller elseif 2-2 140.001; Yoffset 0.001m to the right 24 y roller=0; scroller final = x finalnode arch + sqrt(1"2-y_finalnode_arch*2); y_roller_final= 0; roller displacenent_x = x roller final - x roller end SPROGRAM: TwoDFrame_streess.m tt" CALCULATE STRESS ***** stressi=zeros (1, n_elem arch) stress2-zeros (1, n elem arch); for i = 1:n_elemarch 483-2 lambda = (1ij(i) majliy 0 9 0 ai) LG) 9 0 oO 0 1 6 6 0 0 0 Liga) mag) 0 oO many Tay 0 0 0 0 4: Swhen x = 0 BL = [-1/1Gi) r0*(6)/1(4)°2_—r0* (4) /1(4) o ° A/Li)—O* (6) /1(4) 2 OM (ZL awhen x = 1 B2 = [-2/1(4) -20*(6) /144)*2 — -r0* (21/14) A/G) EDA (-6)/1()92 OFA) /LD I stressl(1, i) = abs(E(i) * BL * lambda * u(x:x+5,1))7 stress2(1, i) = abs(E(i) * B2 * lambda * u(xix+5,1)); Adetermine if there are stresses greater than elements yield_stress_steel-250e6; _#yield stress of if, stress (1, i)>yield_stress_steel tesprintf('Atention: Stressi{1,#d) is greater stress", i}; disp(t)s else end if, stress? (1, i)>yield_stress_steel tesprintf('Atention: stress2(1,%d) is greater stress', i}; dispit) + else end end yield stress on the steel in Pa than the yield than the yield SStress in Pa in order of elements starting with Element 1 stress stress2 25 SPROGRAM: TwoDFrame_plot.m uttsee PLO DISPLACEMENT *#¥#* figure (1) hold on. for i = 1:n_elem x = [X(Gonnect (i,1)) X{connect (4,21); y = [¥{connect (i, 1)) (connect (i,2)) 1; x_new = x + ulconnect (1,1:2)*3 - 2)'*10; % *10 used to scale up the displacements y_new = y + ulconnect (i,1:2)*3 - 1)'10; § *10 used to scale up the displacements plot (x,y, "= ko", ‘hineWidth",2, 'MarkerSize', 10, 'MarkerFaceColor", *k") plot (x_new,y new! ro', ‘Linewidth’,2, 'MarkerSize", 10, 'MarkerFaceColor', "k") end se ' p=(X(n_node-1) x_roller]; t=[¥(n-nede-1) y_roller]; P_new = [X(n_node-1)+ u(n_node*3-5)*10 x_rollertroller displacement _x 1; % *10 used to scale up the displacements , not for the point at the bottom t_new = [¥(n_node-1)+ u(n_node*3-4)*10 y roller final]; % *10 used to scale up the displacements plot (p,t, kot, 'LineWidth', 2, 'MarkerSize', 10, ‘MarkerFaceColor', 'k") plot (p_new, t_new, ' ro’, 'LineWidth', 2, 'MarkerSize', 10, 'MarkerFaceColor', 'k') end xlabel ("x (m)') ylabel("y (m)‘) hold off 26

You might also like