3. We will develop numerical methods to solve the equation u+au=0, aR>, (2) u(x, t) and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. We will develop numerical methods to solve the equation u+au=0, aR>, (2) u(x, t) and a is a speed. You will also need the last non-zero digit of your ID where u = number a. i Perform a Taylor expansion of u(a, t + k), where k < 1, including terms of up to first order in k. Hence find a first order approximation to u ii. Substitute equation (2) into your Taylor expansion of u(x, t+k). (1 mark) iii. Perform a Taylor expansion of u(x-h, t), where h < 1, including terms of up to first order in h. Hence find a first order approximation to u (1 mark) (1 mark) iv. Substitute your approximation to u, into your first order expansion of u(x, t + k) in [ii] to find a forwards-in-time-backwards-in-space algorithm. In doing so, you should introduce discretisations of a and t, making sure you define all terms and notation. Your final algorithm should be in short-hand notation of the form u. where i and n denote discrete points in space and time, respectively. It should also include a CFL-type number F= a^t/Ar, and be written as concisely as possible. (4 marks) v. A skeleton Python code is provided for you on Moodle called "CWcodel". It includes an initial condition and periodic boundary conditions, but the algorithm is missing (line 32). Complete the code with the algorithm you just derived. The code includes input values for the CFL number, the timestep, the final time, and the length. It also includes a plotting command that plots the solution at 3 moments in time. The value of c must be the last non-zero digit of your ID number. Run your script and plot the solution. You should also include your ID number in the title of your plot (it will not be marked if you don't). Include a copy (a screenshot or a PDF) of your code and the plot (as well as uploading your code). 3. We will develop numerical methods to solve the equation u+au=0, aR>, (2) u(x, t) and a is a speed. You will also need the last non-zero digit of your ID where u = number a. i Perform a Taylor expansion of u(a, t + k), where k < 1, including terms of up to first order in k. Hence find a first order approximation to u ii. Substitute equation (2) into your Taylor expansion of u(x, t+k). (1 mark) iii. Perform a Taylor expansion of u(x-h, t), where h < 1, including terms of up to first order in h. Hence find a first order approximation to u (1 mark) (1 mark) iv. Substitute your approximation to u, into your first order expansion of u(x, t + k) in [ii] to find a forwards-in-time-backwards-in-space algorithm. In doing so, you should introduce discretisations of a and t, making sure you define all terms and notation. Your final algorithm should be in short-hand notation of the form u. where i and n denote discrete points in space and time, respectively. It should also include a CFL-type number F= a^t/Ar, and be written as concisely as possible. (4 marks) v. A skeleton Python code is provided for you on Moodle called "CWcodel". It includes an initial condition and periodic boundary conditions, but the algorithm is missing (line 32). Complete the code with the algorithm you just derived. The code includes input values for the CFL number, the timestep, the final time, and the length. It also includes a plotting command that plots the solution at 3 moments in time. The value of c must be the last non-zero digit of your ID number. Run your script and plot the solution. You should also include your ID number in the title of your plot (it will not be marked if you don't). Include a copy (a screenshot or a PDF) of your code and the plot (as well as uploading your code).
Expert Answer:
Answer rating: 100% (QA)
a i Perform a Taylor expansion of ux tk where k 1 including terms of up to the first order in k Henc... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
A company has the following results for the three years to 31 March 2021: Assuming that the trading loss is carried forward and that maximum loss relief is taken as soon as possible, calculate the...
-
The EITF has issued numerous interpretations on the topic of consolidations. These interpretations are subdivided by topic. Choose any three interpretations under the topic "New Basis of Accounting,"...
-
The American Produce Company purchased a truckload of cantaloupes (weighing 4,000 pounds) for $800. American Produce separated the cantaloupes into two grades: superior and economy. The...
-
CD Real Estate specializes in residential real estate services in the state of California. To complement the experience and local market knowledge of its licensed realtors, CD Real Estate wants to...
-
1. List 10 mistakes that Mike made with respect to customer relations and management of his business. 2. For each business error, identify why it was a mistake. For example, poor customer relations,...
-
3 6 C C (Simplify your answer. Type a fraction.)
-
Brad?s Building Supplies entered into the following transactions involving current liabilities during 2020 and 2021: Required Prepare journal entries to record these transactions for Brad?s Building...
-
A balloon is rising vertically above a level, straight road at a constant rate of 1 ft/sec. Just when the balloon is 154 ft above the ground, a bicycle moving at a constant rate of 20 ft/sec passes...
-
Emily Company uses a periodic inventory system. At the end of the annual accounting period, December 3 1 of the current year, the accounting records provided the following information for product 2 :...
-
Via Gelato, a popular neighborhood gelato shop, provided the following cost formulas and actual results for the month of June: Fixed Element per Month Variable Element per Liter Actual Total for June...
-
On January 1 , Park Corporation and Strand Corporation had condensed balance sheets as follows: Items Park Strand Current assets $ 7 0 , 0 0 0 $ 2 0 , 0 0 0 Noncurrent assets 9 0 , 0 0 0 4 0 , 0 0 0...
-
report the answer with the appropriate number of significant figures. When entering units, use proper abbreviated units with proper capitalization. A buffer solution is prepared by combining...
-
On March 3 1 , 2 0 2 4 , the Herzog Company purchased a factory complete with vehicles and equipment. The allocation of the total purchase price of $ 9 7 0 , 0 0 0 to the various types of assets...
-
Two types of medication for hives are being tested. The manufacturer claims that the new medication A is more effective than the standard medication B and undertakes a comparison to determine if...
-
Calculate the change in entropy when 100 kJ of energy is transferred reversibly and isothermally as heat to a large block of copper at (i) 0 C, (ii) 50 C.
-
-5 < x -2 Sketch the graph of the given inequality.
-
In a study of U.S. veteran patients undergoing a first liver transplant, the ages (in years) of patients are approximately normally distributed (see the normal curve in Fig. 89). Interpret the area...
-
Today, Americans scores on the Wechsler IQ test are normally distributed with mean 100 points and standard deviation 15 points. However, the typical IQ of Americans has been increasing about 3 points...
-
According to Equation 14.4, if the foreign interest rate falls, all other things constant, what should happen to the price of foreign money in the short run? E = exp(E++1) i-+1 (14.4)
-
According to Equation 14.4, if expectations about the future exchange rate suddenly fall, all other things constant, what should happen to E? E = exp(E++1) i-+1
-
If rp is positive in Equation 14.9, then foreign assets are perceived as being more risky than domestic counterparts. In that case, according to Equation 14.9, what will happen to the exchange rate...
Study smarter with the SolutionInn App