Simple Matlab coding and a report for the code
$10-30 USD
Dibayar semasa penghantaran
FSH Oct-2017
Engineering Analysis and Numerical Methods: MECH-314-02/04
Fall 2017
Programming Assignment 2
Due: October 23th, 2017
Problem: Bernoulli’s equation can be considered to be a statement of the conservation of energy
principle appropriate for flowing fluids. It states that for an inviscid flow of a fluid, an increase in
the speed of the fluid occurs simultaneously with a decrease in pressure or a decrease in the
fluid's potential energy. The principle is named after Daniel Bernoulli who published it in his book
Hydrodynamica in 1738.
Bernoulli’s equation for fluid flow in an open channel with a small bump (Fig. 1) is
ܳଶ
2ܾ݃ଶ݄
ଶ ݄ ൌ ܳଶ
2ܾ݃ଶ݄ଶ ݄ܪ
ܳ ሺ݉ଷ⁄ ሻݏ = volume rate of flow
݃ ൌ 9.81 ሺ݉ ݏଶ ⁄ ሻ = gravitational acceleration
ܾ ൌ ሺܻ െ 1826ሻ/90) = width of channel ሺ݉ሻ, where ܻ is your birth year
݄ ൌ ሺܯ 92.5ሻ/110ሻ = upstream depth ሺ݉ሻ, where ܯ is your birth month
ܪ ൌ ሺܦ 209ሻ/3000ሻ = height of bump ሺ݉ሻ, where ܦ is your birth day
݄ ሺ݉ሻ= depth of water above the bump
Figure 1. Definition sketch
Write a MATLAB program to find ݄ for to five significant figures using the following methods:
Bisection, Modified False Position, Newton Raphson, and Secant.
Request the user to choose the root‐finding method and a value of ܳ between 40 and 60 ft3
/s.
Also, ask whether the user wishes to run the program again.
Have the code plot the function in the vicinity of the root and include the value of the function at
the root.
Explain your algorithm in detail in a short report. Attach a copy of your MATLAB code and sample
results to your report. Also, submit a copy of the m‐file to Moodle.
FSH Oct-2017
Sample output:
--- Bernoulli’s Equation Program ---
--- [1]: Bisection Method
--- [2]: Modified False-position Method
--- [3]: Newton-Raphson Method
--- [4]: Secant Method
--- Enter value of Q (40 >= Q >= 60 ft^3/s): 41
--- Enter root finding technique: 3
-- Newton-Raphson Method –
--- b (m) ..... 1.8
--- h_0 (m) ... 0.9
--- H (m) ..... 0.075
-- Q(m^3/s) ... 1.161
-- Iter ....... 5
-- h(m) ....... 0.81961
-- ea(%) ...... 2.002366e-005
--- Enter 0 to STOP, 1 to REPEAT : 0
ID Projek: #15414286
Tentang projek
4 pekerja bebas membida secara purata $29 untuk pekerjaan ini
I am experienced engineer worked a lot on matlab. I am sure i can help you out Relevant Skills and Experience mathematics. Matlab Proposed Milestones $25 USD - Complete project