ME2543 Exam3

pdf

School

Louisiana State University *

*We aren’t endorsed by this school

Course

2543

Subject

Mechanical Engineering

Date

Dec 6, 2023

Type

pdf

Pages

15

Report

Uploaded by EarlToad129

ME2543 Exam 3 TOTAL POINTS 81/100 QUESTION 1 - 6 pts No response for **[|]** T5pts QUESTION 3 1.17@2/4 3 10 pts - 0 pts Correct 3.17a@3/5 - 1 pts Denominator is $$2\Delta t$$ -0 pts Correct - 1 pts Terms in approximation should be $$f(x_i)$$ etc. not $$x_i$$ v - 2 pts Incorrect; need to use a backward looking v -2 pts I[Matrix.JPG](/files/8affa452-4f12-499b-8c13- **second order** approximation since you're at the 205530b35¢59) **end** of the array, i = 501, see page 11 3.2bs/5 1.2b 171 v - 0 pts Correct v - 0 pts Correct - 2 pts Incorrect -1 pts N =501 - 5 pts No response QUESTION 2 QUESTION 4 229/1 9/10 4 20 pts - 0 pts Correct - 1 pts Incorrect unkowns, $$\vec{x} = [\theta_1; 47d4/4 \theta_R; L_2]$$ v - 0 pts Correct Vv - 1 pts Need to include **full equations** in - 0.5 pts Notation in correct (including a $$\vec{f}$$ (including constant terms) $$\sums$$, for example) -3 pts -2 pts $$1/R {eff} =1/100 + 1/150 + 1/200%$%, etc. I[Jacobian.]JPG](/files/98112495-6096-4b8b-9265- 29fe0a4271ff) 42b8/s - 2 pts No response for $$\vec{f}$$ v - 0 pts Correct
- 2 pts Incorrect function logic - 3 pts Incorrect function structure - 8 pts No response 43C8/8 v - 0 pts Correct or error carried forward from previous part - 3 pts Missing/incorrect _fprintf_ command - 3 pts No calling of _flowresistance_ function - 8 pts No response QUESTION 5 520 pts 517a5/8 - 0 pts Correct v -3 pts I[2ndODE.JPG](/files/873a7dba-d983-4e€93-9132- d2b677806ff2) - 8 pts No response - 2 pts Need two equations 52b3re - 0 pts Correct or error carried forward from a) v - 3 pts Incorrect_ode45_ function call v - 2 pts Incorrect/missing ode45 function definition - 8 pts No response 53C4/4 v - 0 pts Correct or error carried forward from a) - 1 pts Incorrect _max(theta)_request - 3 pts No response or missing output message 54 ABET S01.3 - Ability to Solve Complex Page 2 Engineering Problems o/o0 - 0 pts Poor v - 0 pts Inadequate - 0 pts Adequate - 0 pts Excellent QUESTION 6 6 Missing 10710 v - 0 pts This question was missing; full credit awarded QUESTION 7 7a)-C) 25 pts 7.1A19/25 - 0 pts Correct - 25 pts No response v -3 pts b) $5F(v)$% vs. $3v$$ plot incorrect - 5 pts ¢) Missing trapezoidal rule for numerical integration - 6 pts b) No $$F(v)$$ vs. $$v$$ plot v - 3 pts ¢) No display of $3P$$ - 2 pts Incorrect $$P$$ - 3 pts a) $$v = 0:0.05:5%% 7.2 ABET S01.5 - Applying principles of mathematicso/0 - 0 pts Poor - 0 pts Inadequate v - 0 pts Adequate - 0 pts Excellent
ME 2543-1 Simulation Methods for Engineers using MATLAB Spring 2023 listrucior: Aindiew Beciel Final Exam Name: _\ Last 4 digits of LSU ID: 89-XXX- The exam is closed-book, closed-notes. You may only use a cheat sheet of MATLAB functions and commands, which you must submit with the completed exam, and the MATLAB help documentation. The use of other notes, websites, previously-written codes, other students’ work, calculators, or smart devices is strictly prohibited! Your screen may be monitored. Write the Last 4 digits of your LSU ID at the top of every page. Please read the questions carefully and be sure to answer them completely. Algorithms are given at the end of the exam. Problems may require written work, MATLAB coding, or both. For written work, write your answers on the pages provided and turn them in at the end of the exam. Please show your work where possible. Do not write on the back of any page! For the coding problems, please write a separate M-file for each problem. Include your name and the problem number in comments. Include enough comments for us to follow your logic. You may iaunch MATLAB on the iaboratory computers to write your codes. When they are completed, you should upload your codes to the Moodle page for this course. DO NOT LEAVE THE EXAMINATION AREA until you have: e Uploaded all necessary M-files to the Moodle page, and e Verified that the uploads were completed successfully. TURN IN THE FOLLOWING: e lhis signed exam paper, ® Your list of MATLAB commands and functions. Academic Honesty Agreement Please sign below to indicate that you have read and agree to the following statements. I declare that all answers given on this exam are my own work. I understand that copying another student’s work, allowing another student to copy my work, or disciosing the contents of this exam to a student who has not yet taken the exam is a serious violation of the LSU Code of Student Conduct, and may result in sanctions as determined by LSU Student Accountability and Advocacy. Signature:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Last 4 digits of LSU ID: Problem 1. (Written) [5 pts] You are given a set of position (x;) versus time (t;) data using the format shown below. a) [4 pts] Write an expression to approximate the speed v = dx/dt when t = 50 s. The approximation should be second-order accurate. Write the expression in terms of the known vaiues (x;, x,, X3, elc.). ) i 1 2 3 4 N t, (s) 0.0 0.1 0.2 03] .. 50.0 xm) | 3171 383 426l 496] 22.86 Write your expression below. glzseta 1) - x(zrie-.f) i il Bt PR il v(505) ~ o | / b) [1pt] Assuming the times are evenly spaced, how many tot:mta points are there? \ | I v= HO| | J f X iy - < - x (31 + AB) -x (2-0%) n _E_(_)_:SOO‘\" 'l Page 2/13
Last 4 digits of LSU ID: Problem 2. (Written) [10 pts] In order to position a robot arm in two-dimensions, we need to solve for 6, Oz, and L, that satisfy the following equations: \/\,\) 3 cos 91 + £L2 =0.5 un known s 2 - Set up the problem as if you were going to solve it using the Newton-Raphson method. Define your vector.x, your vector function f (), and find the expressions for all terms of the Jacobian. Write your answers in the spaces béTow. el N {6059\ ¥ r-"ziLt i \ x=1 L f=|sin & © i, “6 \ g,| + O@ / F Q_i ’»'FI a-t-, 1 26, ol 26¢ o 2 pL = ’a;p_}_ ./ - 28, 3]_2 20¢ 245 LS PAS L 26y L. 16r i 6, | < [ —5in 6, \}% 0 e L. Cos 9. - _'1 9] ok\ Tn ¢ | \ % X0 1f Hy ~ O Page 3/13
Extra space for Problem 2 (if needed) Last 4 digits of LSU ID: Page 4/13
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Last 4 digits of LSU ID: Problem 3. (Written + MATLAB) [10 pts] We wish to solve for the spring forces F;, F;, F,, and F, in the diagram of a three-legged stool shown above. For smalii defiections, stiffness of each legisk; = ’—’;fi in units of [ib/thou]. By applying the static force balance equation in the vertical direction, we find: = FRF=FR+F+F By setting the deflection in each leg to be ec’u 110 AYrorq Ay, = 110 [thou], we find: ) 17F, 48, =110 % 29 F, 417, + 1T Fy = 11 0 17FA5F =110 = |7 F2 +27Fs 1%y =110 17F,A3F, =110 = |9 F7 +11F3 +20 Fe = 14 L a) [5 pts] In the space below, write the system of equations in matrix form. Clearly identify the unknowns. ) 76 177 17 7 = 1o L7 7T |7 oy | = 1o \77 \ 7 20 Fu 1o A px = DnVwiowns (Continued on next page) Page 5/13
Last 4 digits of LSU ID: Problem 3 (continued) b) [5 pts] Write a MATLAB code to solve the system of equations. Write the answers below. = § qy |bs 5= ,409 Yvs F, = 7)\00% ‘\05 Page 6/13
Last 4 digits of LSU ID: Problem 4. (Written + MATLAB) [20 pts] For a set of pipes connected in parallel, the effective flow resistance Resr is given by the equation, where R; is the flow resistance of the it" pipe according to R; = 128ul, /nD}. —-—"f-_\— R Flow resistance values in units of Pa/(L/s) for 1* case: 100, 150, 200 R Flow resistance values in units of Pa/(L/s) for 2™ case: 35, 45, 55, 65, 75, 85, 95, 105, 115 a) [4 pts] In the space below, write the summation (showing each term) using the gloe P L N resistance values givei. 1% case: I Rerr 100 | So 200 274 cgse: 1 = | o l ] ] ] - + t= +— L - Rerr 35 4S Ss T gs +75 k?% J(‘lfi fi‘())—s‘}llfi b) [8 pts] Write a MATLAB function named £1 owresistance which takes as input a vector containing values for the resistances (K, Ko, ..., K,) and outputs the effective flow resistance R, . c) [8 pts] Write a MATIZAR script which calls your function to calculate the effective flow resistance for each case. Your script should receive the output from the flowresistance function and write the effective flow resistance to the screen using an fprint f command resulting in the formatted output: The effective flow resistance for case 1 1is 46.15385 The effective flow resistance for case 2 is T1:13S5SLE% Page 7/13
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Last 4 digits of LSUID: Problem S. (Written + MATLAB) [20 pts] The SpaceX Falcon 9 first stage (mass m, height L, width w) is landing on a recovery ship in the ocean. The angle from vertical as a function of time 6(t) can be found by solving the following differential equation. 16 +b6|6| + Tsing = 0 Initial conditions: 6(0) = 0 rad, 6(0) = 2.37 r:—d (6 and § refer to d6/dt and d26/dt?, respectively. 8 is in radians.) a) [8 pts] In the space below, write the second-order differential equation as two first-order ar fiva . . . . . \—V"’—‘__‘ diffcrential cquations (or, if you prefer, as a voctor first-order differential cquation). For Il points, write each equation in the form y = ... (where y is one of your variables). Th— =0 .\n«'lio\\ (Ondo'fions /\/u)m/\ F TSI Qf:t) Continued on next nnoo) {(Continued on next page) Page 8/13
Last 4 digits of LSU ID: _ Problem 5 (continued) b) [8 pts] Write a MATLAB code to solve the ODE on the domain t = [0 s, 30 s] using oded4S. Use the following values. I= imL2 b= -:-pCDL‘*w T= %mgL L=125m w=65m /n=5,789kg p =129 kg/m? Cp =1.28 g =981m/s? (4 pts] Have your MATLAD code find the maximum value of 8 from the solutions in part (b), then print this value with exactly three digits past the decimal and an appropriate message on one line. For example, N’ Maximum angle = X.XXX rad Page 9/13
Last 4 digits of LSU IL Problem 7. (MATLAB) [20 pts] The total energy dissipated by a shock absorber can be found from the area under its force- velocity curve. An adaptive shock absorber generates a force according to the piecewise function: ((Fc + 0.75) tanh{ = 1.7\ 0<v<n, F(v) = i \Vorr / 18 F0+Fo(v_voff) vaf <v where Fy and v,/ are “adaptive” terms they can be set based on the situation. The hyperbolic tangent function, tanh(v), is different than the tangent function. Note: The F; term is numerically equal to Fo, but has units that maintain consistency. Don’t worry aboui ihis in your code, jusi ireai Fg = Fy. Write a MATLAB script that: a) [5 pts] Discretizes the range v [0,5] m/s using the step size vstep=0.05 b) [10 pts] Plots F(v) over the range v [0,5] m/s using the following values: FO =200 [N] Vorr = 2 [m/S] and iabei the axes accordingiy. ¢) [10 pts] Calculates and displays the total energy dissipated, P = fos wdt. You may write your own numerical scheme or use a built in MATLAB function. P’; Sos F(\)B 0{\/ = \,CFav Page 10/13
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Last 4 digits of LSUID: ___ Finite Difference Formulas Order Ax approximations of derivatives: . ) _ _f(xl+1) = f(xi) Jx) = Ax reon _ O = f(xioq) ') = Iy fu(x!) = f(xl) - zf(xH-l) + f(xi+2) Ax“ F(x) = f(x) = 2f (2;-21) + f(xi-2) Order Ax? approximations of derivatives: frlny = LG+ 4/’2 (Ax;u) = FGia2) freap = LED = Ge) + 5 ) = f(xi+1)2;{(xi-1) 2f(x;) 5f(x40) + 4f (xi42) = f(Xi43) " x = £ = F'(x) = 2f () 5 (x-0) + 4f (x-5) f(x-3) ; Ax? £ = fGien) = 2f G + Flooy) : Ax? Page 11/13
Last 4 digits of LSU ID: Algorithms Gaussian elimination: Forifrom 1 to N R; « R;/Aug,; R; refers to row i of Aug Forjfrom(i+1)to N R; « R; R; - Aug;; End loop For i trom N back to | For j from 1 to (i 1) R; < R;—R; - Aug,, End loop End loop Gauss-Seidel iterative method: Loop until converged For j from 1 to N 1 N X; & b-—Z Rivx i DIJ<] k=1( & k)) Eind loop End loop A=D+R, D isadiagonal matrix Page 12/13
Last 4 digits of LSU ID: Newton-Raphson method: i ) = o _ FxY) f'(x®) D = g _ j~1 f"(,;(t)) oh of: ox, 0x, I=\3f of, d0x; 0x, Area of a right trapezoid: -i.. A = base - average height = Ax - (&LZM) Exact Derivatives —ax™ = nax""! dx d ) d . Frl sin(bx) = ab - cos(bx), el cos(bx) = —ab - sin(bx) —a-eb*=qbh.e"* dx Page 13/13
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help