Project 1

pdf

School

McMaster University *

*We aren’t endorsed by this school

Course

3F04

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

4

Uploaded by UltraElkMaster672

Report
McMaster University Department of Mechanical Engineering ME 3F04 – Modelling and Numerical Solutions Project 1 – Winter 2024 Instructor: Chris Morton ( mortoc5@mcmaster.ca ) Teaching Assistant: Ehsan Majma ( majmae@mcmaster.ca ) Due on: Feb 9, 5:00pm Submission Location: Hand-written work can be scanned and submitted via A2L dropbox. MatLab codes should be submitted via A2L dropbox. Important Notes: - Group work is encouraged when solving problems, however each student must submit his/her own work. - Cheating/plagiarism are forms of academic dishonesty. Such cases (if identified) will follow McMaster Academic Integrity Policy. Students are recommended to review the procedures outlined (particularly in section 6) and understand the consequences. - Any questions on the grading scheme can be posed to the TA responsible for Project 1 marking. - Marks will be posted on A2L within 2 weeks of project completion.
Project 1 Question 1 (15 marks). (This question should be completed by hand) Consider the equation 𝑥 + 𝑒 ି௫ = 2 a) Using the graphical method, determine the number of real roots in the interval −3 ≤ x ≤ 3. Show that one root is near x = 2. b) Apply the direct iteration method to find the root near x = 2 with the following rearrangement x e x 2 First, determine whether iterations will converge and explain briefly. With the rearrangement suggested above, Illustrate the iteration process by completing three iterations starting with the initial guess of x = 2. Show all intermediate calculations and summarize the results in the following tabular form: Iteration x old x new 1 2 2 3 c) Apply Newton-Raphson method to find the root near x = 2. Demonstrate the process by completing three iterations starting with the initial guess of x = 2. Show all intermediate calculations and summarize the results in the following tabular form: Iteration x old f(x old ) f ' (x old ) x new 1 2 2 3 d) Show how to apply relaxation to the iteration process in part c) by completing ONE iteration with the relaxation coefficient ω=0.8 by hand. Briefly explain why under relaxation would usually be applied in an iterative algorithm.
Question 2 (15 marks). (This question should be completed by hand) Consider an air bubble rising in a water column, where the bubbles vertical position (y) varies with time ( t ). Experimental measurements were made of the position of the bubble at various instances in time. It is of interest to estimate the rising velocity of the bubble, dy/dt at t=t 5 , based on the measured positions y 3 (t=t 3 ), y 4 (t=t 4 ), y 5 (t=t 5 ) and y 6 (t=t 6 ), shown schematically on the sketch below. Given y 3 = 1.1 [cm], y 4 = 1.2 [cm], y 5 = 1.3[cm], y 6 = 1.1[cm] estimate the following: (i) ௗ௬ ௗ௧ @௧ with the highest possible order of accuracy. (ii) ௗ௧ @௧ with the highest possible order of accuracy. (iii) ௗ௧ @௧ with the highest possible order of accuracy. Based on your derivations, clearly identify, and explain the order of accuracy of your estimate. y 5 t t 3 =1.4 [s] t 4 =1.6 [s] t 5 =1.7 [s] y 3 y 4 Y 6 t 6 =1.9 [s]
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
Question 3 (15 marks). Develop a well-documented and structured MatLab code which allows solving for the roots of non-linear equations using the Newton-Raphson algorithm. Pick a problem of your choice to test the algorithms robustness, and ensure the problem chosen allows you to demonstrate the following: (This question requires hand-written explanation of the problem and supplementary electronic file submission of matlab codes) (1) Handles when a division by zero is present in the derivative and detects when the solution is diverging. Provides warnings to the user as appropriate. (2) Allows the user to set the threshold for acceptable error as a percentage between 0.001% and 2%. (3) Automatically generates a plot to graphically show the progression towards the root on each iteration. (4) Enables a relaxation parameter to be set by the user and is implemented in the iterative solution approach.