Assignment Document

ENG3104 - Engineering Simulations and Computations

Pages:

Preview:


  • "Question 1:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must perform hand calculations:\r\n\r\n1. Derive the formulae for the slope ( v'), curvature (v'') and v''' of the beam from Eq. (1).\r\n\r\n2. Estimate the value of the slope at t..

Preview Container:


  • "Question 1:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must perform hand calculations:\r\n\r\n1. Derive the formulae for the slope ( v'), curvature (v'') and v''' of the beam from Eq. (1).\r\n\r\n2. Estimate the value of the slope at the second measurement point using backward, forward and central differences.\r\n\r\n3. Validate your answers from Requirement 2 using the appropriate formula from Requirement 1.\r\n\r\n4. Estimate the numerical errors in the calculations of Requirement 2 using the appropriate formulae from Requirement 1. What is the ratio of (the numerical error) to (the deviations from the theoretical values calculated in Requirement 3)? Be careful to get the sign consistent between the errors (i.e. that you compare the same thing)!\r\n\r\n5. Discuss which is the best result out of the backward, forward and central differences and why.\r\n\r\nYou must also produce MATLAB code which:\r\n\r\n6. Calculates backward, forward and central differences for the length of the beam.\r\n\r\n7. Verifies the results from Requirement 6 using the results of Requirement 2.\r\n\r\n8. Calculates the theoretical values at the measurement locations using the appropriate formula from Requirement 1. Calculates the error between the numerical and theoretical values.\r\n\r\n9. Estimates the numerical error in the calculations of Requirement 6. Perform this using:\r\n\r\n(a) analytical derivatives obtained from Eq. (1)\r\n(b) numerical derivatives (for data spaced evenly in x) for as many data points as possible (you won't be able to calculate these at the ends of the data):\r\n\r\nd2y/dx2|xi = (yi-1 - 2yi + yi+1)/(Δx)2\r\n\r\nd3y/dx3|xi = (yi+2 - 2yi+1 + 2yi-1 - yi-2)/2(Δx)3\r\n\r\n10. Plots the results from Requirements 6 and 8 on the same graph.\r\n\r\n11. Plots the results from Requirements 8 and 9 and discusses the results, including which is the best method, reporting to the Command Window1.\r\n\r\n12. Has appropriate comments throughout.\r\n\r\nQuestion 2:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must perform hand calculations:\r\n\r\n1. Use the trapezoidal method to determine the deflections at the mid-point and end of the beam using the data in ass3q2in.csv. Perform the calculations using the data at 5 mm intervals (do not calculate based on all the data).\r\n\r\n2. Validate your answers using the theoretical values from Eq. (1).\r\n\r\nYou must also produce MATLAB code which:\r\n\r\n3. Uses the trapezoidal method to determine the deflections at the mid-point and end of the beam using the same data as Requirement 1.\r\n\r\n4. Verifies the results from Requirement 3 using the results of Requirement 1.\r\n\r\n5. Uses the trapezoidal method to determine the deflections at the mid-point and end of the beam using all the data in ass3q2in.csv.\r\n\r\n6. Reports the values from Requirements 3 and 5 and the theoretical values from Eq. (1), discussing the reasons for similarities or differences.\r\n\r\n7. Estimates, reports and discusses the numerical error in the calculations of Requirement 5.\r\n\r\nPerform this using:\r\n\r\n(a)analytical derivatives obtained from Eq. (1)\r\n\r\n(b)numerical derivatives based on the data in ass3q2in.csv\r\n\r\n8. Plots the data from from ass3q2in.csv with the numerical results from Question 1 and the theoretical slope.\r\n\r\n9. Plots the data from from ass3q1in.csv with trapezoidal integration of ass3q2in.csv at all locations of x and the theoretical deflection.\r\n\r\n10. Discusses the results from the plots.\r\n\r\n11. Has appropriate comments throughout.\r\n\r\nQuestion 3:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must perform hand calculations:\r\n\r\n1. Assume that the properties of water are constant (use the values from Table 1 at 273 K). Use Euler's method to estimate the temperature after 10 s using five equal steps. Only use the first formula for Q″′ (even if the temperature goes over 343 K).\r\n\r\n2. Given the assumptions of Requirement 1, use Eq. (4) to obtain an analytical formula for d2T/dt2 that is a function of T .\r\n\r\n3. Find the analytical solution of Eq. (4) given the assumptions of Requirement 1 and use that to determine if the temperature will reach 343 K before tres.\r\n\r\nYou must also produce MATLAB code which:\r\n\r\n4. Repeats Requirement 1 to verify the method.\r\n\r\n5. Repeats Requirement 1 using an appropriate timestep (which must be reported) to determine if the water's temperature reaches Tout and 373 K before tres. For both target temperatures:\r\n- If the target temperature is reached, the time required to reach that temperature should be reported.\r\n- If the target temperature is not reached, the temperature at tres should be reported.\r\n\r\n6. Repeats Requirement 5 using the values of ρ and cp from Table 1.\r\n\r\n7. Repeats Requirements 5 and 6 using the following MATLAB ode solvers:\r\n\r\n(a)ode23 (b)ode45\r\nIf you use the default settings, report this, otherwise report what values you used for any changed settings.\r\n\r\n8. Repeats Requirement 5 using Simulink with Euler's method and the same solvers as Requirement 7. For this Requirement, only test whether Tout reaches 343 K.\r\n\r\n9. Repeats Requirement 5 using a variable timestep so that the numerical error divided by the change in temperature at each timestep (take the absolute value of this ratio) is:\r\n\r\n(a) 10%\r\n\r\n(b) 1%\r\n\r\n(c)0.1%\r\nEstimate the numerical error using the formula from Requirement 2. The average timestep for each simulation is to be reported.\r\n\r\n10. Plots the temperature versus the time normalised by residence time to non-dimensionalise the time axis. The following plots are to be produced:\r\n\r\n(a) All results with constant values of thermodynamic properties. (b)All results with variable values of thermodynamic properties. (c)All results using Euler's method.\r\n\r\nAll plots where constant values of thermodynamic properties are shown must also show the analytical solution.\r\n\r\n11. Compares the different methods shown in each plot and discusses which is the best for this problem.\r\n\r\n12. Has appropriate comments throughout.\r\n\r\nQuestion 4:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must produce MATLAB code which:\r\n\r\n1. Calculates the curvature profile under steady-state conditions, i.e. determines ω(x) = vtt(x). To achieve this, re-write the steady-state form of Eq. (7) so that ω is the dependent variable and solve.\r\n\r\n2. Calculates the steady-state deflection profile directly from Eq. (7) and uses this result to determine if the beam deflects sufficiently to contact the terminal. To do this, do not solve Eq. (7) at the first interior nodes: instead, apply the curvature boundary conditions by specifying that the gradient between the boundary and first interior node is equal to the gradient between the first and second interior nodes (i.e. set vtt = 0 at the first interior node). From these results, calculate the curvature.\r\n\r\n3. Plots the curvature and deflection results from all previous Requirements, also marking where the terminal is located on the deflection plot.\r\n\r\n4. Discusses the similarities or differences between the curvature results and any reasons for them.\r\n\r\n5. Has appropriate comments throughout.\r\n\r\nQuestion 5:\r\n\r\nRequirements\r\n\r\nFor this assessment item, you must produce MATLAB code which:\r\n\r\n1. Simulates the system for a duration of 5 ms. The convective term [second term in Eq. (12)] should be \"upwinded\", i.e. use a backward difference.\r\n\r\n2. Plots the temperature distribution in the pipe at initial conditions, final conditions and when the temperature at the outlet becomes greater than a multiple of 10?C, i.e. when T (L, t) = 273 K, 283 K, 293 K etc. Report on the plot how long it takes to reach each of these distributions.\r\n\r\n3. Has appropriate comments throughout.\r\n\r\nQuestion 6:\r\n\r\nYou are to write a brief report (about 100 words, excluding any code), which includes:\r\n\r\n1. A description of an instance during the writing of your code for this assignment where there was a problem (e.g. a bug, an error, an unexpected result) or the most challenging aspect to overcome.\r\n\r\n2. What steps you took to overcome the problem or challenge (including any code you wrote to test the problem/challenge).\r\n\r\n3. The code before you resolved the problem or challenge, highlighting the line(s) of code where the problem or challenge occurred.\r\n\r\n4. The code after you resolved the problem/overcame the challenge.\r\n\r\n5. Code from the MATLAB editor is to be copied into Word; screenshots should be taken of the Command window.\r\n\r\nENG3104 - Assignment 3 October 24, 2016 1 Question 1 The formula for the de?ection is \u001a Px 2 2 - (3L -4x ), 0= x= L/2, 48EI v(x) = P(x-L) 2 2 - (L -8Lx+4x ), L/2< x= L. 48EI 1.1 Requirement 1 By successive derivation of the expression for v(x), we obtain for the slope, \u001a P 2 2 dv (12x -3L ), 0= x= L/2, 48EI = P 2 2 - (9L -24Lx+12x ), L/2 < x= L. dx 48EI For the curvature, \u001a 2 Px d v , 0= x= L/2, 2EI = P(L-x) 2 dx , L/2< x= L. 2EI For the sheer force, \u001a 3 P d v , 0= x= L/2, 2EI = P 3 - , L/2< x= L. dx 2EI 1.2 Requirement 2 In the following expressions, measured de?ections are denoted by vˆ . At the n second measurement point (at x =0.001), the Euler backward di?erence is ?v =(vˆ -vˆ )/(x -x )= (-0.00038-0)/(0.001-0)=-0.380, 2 2 1 2 1 the forward di?erence is ?v = (vˆ -vˆ )/(x -x )= (-0.00076-0.00038)/(0.001-0)=-0.384, 2 3 2 3 2 and the central di?erence is ?v =(vˆ -vˆ )/(x -x )= (-0.00076-0)/(0.002-0)=-0.382. 2 3 1 3 1 11.3 Requirement 3 ' The theoretical value is v (0.001) = -0.38016 rad, in good agreement with estimated values. 1.4 Requirement 4 ' The absolute errors are given by o = |v (0.001)- ?v |. For the backward 2 2 -4 formula, the absolute error is o = 1.6· 10 and the relative error is ? = 2 2 -4 4.2·10 . -3 Fortheforwardformula,theabsoluteerroriso = 3.84·10 andtherelative 2 -2 error is ? = 1.0·10 . 2 -3 For the central di?erence formula, the absolute error is o =1.84·10 and 2 -3 the relative error is ? = 4.8·10 . 2 1.5 Requirement 5 Normally central di?erences should be best, giving lower bias, but longer line segments in the approximation. Given the relative few data points and the shape of the curve, the forward or backward method may be better. In this case, the backward formula gives the best approximation for point 2. 1.6 Requirement 11 The errors cleary increase with degree of di?erentiation. The second and and third di?erences are very noisy. 2 Question 2 2.1 Requirement 1 To get calculate the de?ection from the slope, the trapezoidal rule can be used, \u0012 \u0013 Z b f(a)+f(b) f(x)dx˜ (b-a) . 2 a Using ?ve point steps, the de?ection at the midpoint is found to be v¯ = L/2 -4 -3 -6.5·10 . At the endpoint, the de?ection is v¯ = 1.7·10 L 2.2 Requirement 2 -3 The theoretical de?ections are v(L/2)=-2.56·10 and v(L) =0. 23 Question 3 3.1 Requirement 1 t T 0 273.00 1 278.69 Five equal steps of 2s with Euler’s methods gives 2 284.11 3 289.28 4 294.20 5 298.88 3.2 Requirement 2 Taking the derivative of the heat equation, the second derivative is obtained \u001a 2 d T -100/(?c ), 273= x=343, p = 2 500/(3?c ), 343< x=373. dt p This derivative is valid under the assumption of constant ? and c . p 3.3 Requirement 3 The heat equation is a linear ?rst order di?erential equation dT ?c = f(T). p dt We may try the function T(t) = Aexp(Bt)+C. Plugging it into the equation andusingtheinitialconditionT(0)= 273givesA+C = 273. Also,T(8)=373 ? gives C = 373 and A = -100. Using the expression for Q at t = 0 gives ?c dT/dt(0) = -100(393- 273) = -12000 so that B = -120/?cp. For the p interval 273= T = 343, the solution is T(t)=-100exp(-120t/?c )+373. p ? At the in?ection point, using the second expression for Q, the equation (derived similarly, with translated t) is ¯ T(t)=-30exp(-500(t-t)/?c )+373. p ¯ ¯ Here t is the time where T(t)= 343. At t= t ,T(t )= 366, so T = 343 is reached before t= t . res res res 3.4 Requirement 5 The ?xed time step Euler and constant parameters, using a time step of 1s, reaches T at t= 51 and T = 373 at t= 56(s). out 33.5 Requirement 6 The ?xed time step Euler and tabulated parameters, using a time step of 1s, reaches T at t= 50 and T = 373 at t= 55(s). out 3.6 Requirement 7 For ode23 and ode45, the settings ’RelTol’=1e-3, ’AbsTol’=1e-3, ’NormCon- trol’=’on’ where used. Default settings for ’MaxStep’ and ’InitialStep’ where used (with system value 6.0). 3.7 Requirement 9 For 10%, t = 16, for 1%, t = 1.18 and for 0.1%, t = 0.12, showing that ave ave ave on average, the time step is proportional to the error rate. 3.8 Requirement 11 Methods with constant parameters: Numerical methods seem to overestimate the temperature, and with that the time to reaching the desired temperature. When comparing the numerical methods, the results are fairly similar. Notably the Euler method with variable time step gives reults close to ode23 and ode 45. Methodswithtabulatedparameters: Tabulatedparametersgivehighertem- perature than constant. The ode packages seem to give better results than the ?xed step Euler method. Euler methods: The methods show fairly similar results. From the com- parison above, it may be assumed that the method with variable time step is superior to the ?xed step Euler method. 4 Question 4 The de?ection was found not to be su?cient for the switch. 4.1 Requirement 4 Theshapeofthede?ectionisthesame,whereasthecurvatureissmoother. This is due to that the force is applied on a non-in?nitesimal area, and in particular is continuous at the de?ection point. In Question 1, the third derivative is discontinuous at L/2. 4"

Why US?

Because we aim to spread high-quality education or digital products, thus our services are used worldwide.
Few Reasons to Build Trust with Students.

128+

Countries

24x7

Hours of Working

89.2 %

Customer Retention

9521+

Experts Team

7+

Years of Business

9,67,789 +

Solved Problems

Search Solved Classroom Assignments & Textbook Solutions

A huge collection of quality study resources. More than 18,98,789 solved problems, classroom assignments, textbooks solutions.

Scroll to Top