Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Learning Outcomes

In this assignment you will demonstrate your understanding of solving engineering problems using numerical computations and assessing particular algorithms. The objectives of this assignment are to program algorithms for root-finding, solving systems of linear algebraic equations, performing least-squares approximations and interpolations, regressing solutions and solving a transport equation using finite-difference discretization schemes.

Rootfinding

Imagine a wedge-shaped object flying through air at supersonic speeds (see Fig. 1). In compressible flow theory (covered in MCEN90008 Fluid Dynamics), it is known that an oblique shock wave forms at the front tip of this object under certain conditions

2.1 Analytical solution for θ = 0°

For θ = 0, i.e. the object would be a flat plate, show that two possible solutions for β are

βL = arcsin (1/M), βU = 90°.

βU and βL are usually called the strong shock and weak shock solutions, respectively. Even though we can mathematically obtain two possible solutions, in reality, or physically, only the weak shock solution occurs.

Graphical solution

Plot f(β) vs β for

a. M =1.5 and θ = 5°, 10° and 15°

b. M = 5.0 and θ =20°, 30° and 45°

Indicate how βU and βL change with θ and M. Can you identify from your plots the approximate value of θmax?

C program to solve shock-wave equation

Your task is to write a C code that solves Eq. (2) using the Newton-Raphson method to find the root of f (β), regarding θ and M as parameters and solving for β.

(a) Write your C program such that it uses the Newton-Raphson method to solve f (β) = 0. What values of βL and βU do you think might be appropriate to use as an initial guess? For M = 5.0 and θ =20°, you should find that βL =  29.80092...° , and βU =  84.55625...°

(b) Extend your C program to find βU and βL values for M = 5.0 and 0 ≤ θ ≤ θmax. Remember that for θ = 0, βL = arcsin(1) and βU= 90°. Plot values of θ on the horizontal axis and M corresponding values of β on the vertical axis. Your solution to this part of the assignment should look like Fig. 2. Note that you can plot your results obtained from your C code with your program of choice, e.g. Matlab, Excel, etc.

(c) Use your computer program to solve f (β) = 0 for M = 1.5, 3.0, 4.0, 5.0, 7.0, 8.0. Plot β vs θ for all the M's. This plot is called the θ-β- M diagram and you will find it very useful if you decide to do MCEN90008 Fluid Dynamics in the future.

Linear Algebraic Systems

Write a C code using the Thomas algorithm to solve the tri-diagonal system shown in Eq. 4. Since the tri-diagonal system is a banded matrix, you need not store all the zeros!

Regression

Write C code that uses both second-order Lagrange interpolating polynomials and cubic splines in order to estimate f (x). Estimate the value of f (x= 5) using both methods. You will implement both methods in interp0, reading in from the file in_interp.csv the values of x and f (x) and outputting the values of the interpolated value to out_interp.csv in the following format (up to 6 decimal places).

Differentiation, differential equations

Tasks

Run your code until a time of t =2.0 for different resolutions Δx, i.e. different number of grid points Nx. Your time steps need to satisfy the so-called Diffusion number, specifying that µΔt/(Δx)2 ≤ 1. You should investigate the effect of

- spatial resolution, i.e. Δx, determined by the number of points Nx used
- temporal resolution Δt (or, for a given Δx, variations of the Diffusion number µΔt/(Δx)2

- effect of time integration type (explicit vs implicit) on the maximum time step permitted on the accuracy of the solution. In particular, assess the error made in amplitude of the numerical solution compared with the solution obtained with Nx = 1,000 and Diffusion number 0.1, called grid-independent reference solution.

Project Report

Your project report need not be a full technical report but should state all approximations made and use figures of results to back up any conclusions. Be sure to include enough detail (using appendices as necessary) so that your results could be reproduced by another researcher (or yourself at a future date!) wishing to check or extend your findings. Your report will be primarily assessed on the completeness of the results, and the visual/logical effectiveness of the manner in which they are presented.

Attachment:- codes.zip

Python, Programming

  • Category:- Python
  • Reference No.:- M92496170
  • Price:- $155

Guranteed 48 Hours Delivery, In Price:- $155

Have any Question?


Related Questions in Python

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Homework -this homework will have both a short written and

Homework - This homework will have, both a short written and coding assignment. The problems that are supposed to be written are clearly marked. 1) (Written) Make heuristics Describe two heuristics for the slide problem ...

Lab assignment -background - we have discussed in detail

Lab Assignment - Background - We have discussed, in detail, the function of Stacks and Queues and how they are specifically implemented in Python. To get a better understanding of the utility of these data structures, we ...

Below zero - ice cream storethe local ice-cream store needs

Below Zero - ice cream store The local ice-cream store needs a new ordering system to improve customer service by streamlining the ordering process. The manager of the store has found that many orders are incorrect and s ...

Question write a python program with a graphical user

Question: Write a python program with a graphical user interface that will allow a user to create a custom pizza which they wish to order. At minimum, the user should be able to choose the size of the pizza, the type of ...

Sieve of eratosthenes in pythonthe goal is to find all the

Sieve of Eratosthenes (in Python) The goal is to find all the prime numbers less than or equal to some natural number maxn. We have a list that tells us if any of the numbers 0..maxn are "marked". It can be an array of b ...

Question write a simple python program that takes use

Question: Write a simple python program that takes use inputs as non-zero digits and converts them into binary form. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow th ...

Python programming assignment -you first need an abstract

Python Programming Assignment - You first need an abstract base class, called, Account which has the following attributes and methods: accountID: This attribute holds the ID assigned the account , if not provided set to ...

Learning outcomes lo3 - research develop and document a

Learning Outcomes LO3 - Research, develop, and document a basic security policy, and analyse, record, and resolve all security incidents LO4 - Identify and assess the threats to, and vulnerabilities of networks Assessmen ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As