Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This problem explores how one has to be careful when choosing which finite difference rules to use whern discretizing differential equations. Consider an example of

image text in transcribed

This problem explores how one has to be careful when choosing which finite difference rules to use whern discretizing differential equations. Consider an example of the classical convection-diffusion transport equation, which describes the transport of a fluid due to convection and diffusion: u(0) 0 u(1) = 0 Depending on the so-called Peclet number Pe-ad , where is the spacing between nodes in the finite difference approximation, we can get spurious behavior in the numerical solution if we use a central difference method for the convection (first-order derivative) term. In particular, if Pe > 1 (convection- dominated), then a different scheme should be used Assignment (B) Develop the exact solution to the differential equation in terms of a and v. (B2) By hand, discretize the differential equation, for an arbitrary number of points N, using a central difference approximation for both terms and write down the resulting equations in a form similar to equations (9.3) and (9.4) in the notes. When the Pe > 1, this scheme will be "unstable". (B3) An alternative scheme is based on "upwinding". By hand, discretize the differential equation, for an arbitrary number of points N, using a backward difference rule for the first-order derivative and a central difference rule for the second-order derivative. Write down the resulting equations in a form similar to equations (9.3) and (9.4) in the notes (BA) Based on the previous parts, write a MATLAB .m file that performs the following (a) Take a = v-1 and N = 21 . Compute the numerical solution using both discretizations developed previously, (part B2 and B3). You may use the "" command in MATLAB to solve the resulting linear systems (b) Plot both numerical approximations and the exact solution on the same plot (c) Take -500, v-1, and N 21, Recompute the numerical solutions and plot both approximations and the analytical solution on the same plot. This problem explores how one has to be careful when choosing which finite difference rules to use whern discretizing differential equations. Consider an example of the classical convection-diffusion transport equation, which describes the transport of a fluid due to convection and diffusion: u(0) 0 u(1) = 0 Depending on the so-called Peclet number Pe-ad , where is the spacing between nodes in the finite difference approximation, we can get spurious behavior in the numerical solution if we use a central difference method for the convection (first-order derivative) term. In particular, if Pe > 1 (convection- dominated), then a different scheme should be used Assignment (B) Develop the exact solution to the differential equation in terms of a and v. (B2) By hand, discretize the differential equation, for an arbitrary number of points N, using a central difference approximation for both terms and write down the resulting equations in a form similar to equations (9.3) and (9.4) in the notes. When the Pe > 1, this scheme will be "unstable". (B3) An alternative scheme is based on "upwinding". By hand, discretize the differential equation, for an arbitrary number of points N, using a backward difference rule for the first-order derivative and a central difference rule for the second-order derivative. Write down the resulting equations in a form similar to equations (9.3) and (9.4) in the notes (BA) Based on the previous parts, write a MATLAB .m file that performs the following (a) Take a = v-1 and N = 21 . Compute the numerical solution using both discretizations developed previously, (part B2 and B3). You may use the "" command in MATLAB to solve the resulting linear systems (b) Plot both numerical approximations and the exact solution on the same plot (c) Take -500, v-1, and N 21, Recompute the numerical solutions and plot both approximations and the analytical solution on the same plot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions