Simple Matlab coding and a report for the code

V teku Objavljeno pred 6 letoma/leti Plačilo ob prevzemu
V teku Plačilo ob prevzemu

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

Matlab and Mathematica Pisanje reportažnih vsebin

ID projekta: #15414286

Več o projektu

4 predlogov Oddaljen projekt Aktiven pred 6 letoma/leti

4 freelancerjev ponuja v povprečju za $29 na tem delu

saied2017

Hello Dear I'm mohamed saeed .Aerospace engineer . I have checked your hob and I'm ready to help you .I'ts advanced numerical solution using different methods Relevant Skills and Experience math Proposed Milestones Več

$25 USD v 1 dnevu
(31 ocen)
4.9
Mohammed099

A proposal has not yet been provided

$25 USD v 1 dnevu
(0 ocen)
0.0
umair8511

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

$25 USD v 3 dneh
(0 ocen)
0.0