Write a program to implement this process

Assignment Help MATLAB Programming
Reference no: EM13799850

Exploration: Discretizing the Wave Equation

A computer cannot store an entire function in its memory. Typically it stores the values of the function at a finite number of points. It approximates derivatives by differences of functions. In particular,

1276_equation.png

Plugging this into equation gives a discretized version of the wave equation:

F(x, t + Δt) = 2f (x, t) - f (x, t - Δt)+ [v2(Δt)2/ (Δx)2][f(x + Δx, t) - 2f(x, t) + f(x- Δx, t)]

We will use above equation to solve the wave equation numerically. Take an interval [a, b] and a large integer N, let Δx = (b - a)/N, and let xk = a + kΔx. Pick a time interval Δt. Define variables yk(t) = f(xk,t). Pick a small value of Δt. Use above equation to evolve y1, . . . , yN-1 in time, but set y0(t) = yN(t) = 0. To implement our initial conditions, take yk(0) = f0(xk) and yk(-Δt) = f0(xk) - (Δt)g0(xk).

(1) Pick values of a, b, v, N, and Δt, and write a program to implement this process. Be sure to leave a, b, v, N, and Δt as parameters that can be changed easily.

(2) Run this program with a = 0, b = 10, v = 1, N = 100, and Δt = 0.01 with initial conditions f0(x) = max(1 - |x - 2|, 0) and g0(x) = 0. Plot f (x, t) for t ranging from 0 to 20 at intervals of 0.5.

(3) Vary the sizes of Δt and Δx, always keeping vΔt  <<  Δx. How small do Δx and Δt need to be to adequately model the continuous wave equation?

(4) Now take Δx <  vΔt. What happens? Why? If your program keeps crashing, take Δx only slightly less than vΔt.

Viewing the discretized wave equation as a second-order difference equation in N-1 variables, one of the modes crosses the line from neutrally stable to unstable when Δx hits vΔt. As Δx gets smaller and smaller, this mode becomes more and more unstable, and other modes become unstable as well. This is to be expected, since the discretized wave equation can only carry a pulse a distance Δx in time Δt. If Δx <  vΔt, the discretized wave equation cannot support traveling waves.

(5) Going back to the setup of step 2, take f0(x) as before but try different functions g0(x). Can you find a function for which the wave is purely a forward traveling wave at time t = 0?

(6) For various integers k, take f0(x) = sin (kΠ(x-a)/b-a) and g0(x) = 0. What happens? How fast?

(7) The conditions y0(t) = 0 and yN(t) -= 0 implement Dirichlet boundary conditions. To implement Neumann boundary conditions, take y0(t) = y1(t) and YN(t) = YN-1(t). Repeat step 2 with these boundary conditions.

(8) What happens if you take Dirichlet boundary conditions at x = a and Neumann boundary conditions at x = b? Try it!

Reference no: EM13799850

Questions Cloud

Assignment on using ebp to formulate a clinical : Using EBP to Formulate a Clinical
Write a paper about the growth of new digital media : Write a paper about The growth of new digital media.
Interpreting statistical output for data analysis : Interpreting Statistical Output for Data Analysis
Discuss the role that global inequality and poverty : Discuss the role that global inequality and poverty have played in your chosen event. Provide examples of these roles to support your rationale.
Write a program to implement this process : A computer cannot store an entire function in its memory. Typically it stores the values of the function at a finite number of points. Pick values of a, b, v, N, and Δt, and write a program to implement this process. Be sure to leave a, b, v, N, an..
Write an essay about about my self or my idetity : Write an essay about about my self or my idetity.
Complex array of outlets for sports coverage : Media technologies have evolved throughout history to include a complex array of outlets for sports coverage. What is the best formula for sports organizations hoping to effectively reach their varied audiences using ever changing media technologi..
What is idea that you are trying to impart to your audience : What is the idea/theme/emotion that you are trying to impart to your audience? Do you want to make a political statement or do you just want to make someone laugh?
An industry with a monopoly on a product has its average wee : An industry with a monopoly on a product has its average weekly costs given  by C(x)=(10000)/x +60-.03x+.00001x^2 The weekly demand for the product is given by p=120-.015x. Find the price the industry should set and the number of units it should prod..

Reviews

Write a Review

 

MATLAB Programming Questions & Answers

  Calculate and display the altitude and velocity of rocket

Write a program that will solve the problem specified above( for the rocket). However, lit user of your program is to insert the starting height, and the time the rocket travels.

  The train will be unsafe if the normal acceleration is

a train track is designed with a radius of 20 meters. the train will be unsafe if the normal acceleration is greater

  Control design using matlab

Control Design using Matlab,  Please try and explain the characteristic of all the plots and graphs.   Import all the required data in word of simply write in the script itself.

  Neglecting drag draw a free body diagram and formulate a

a two inch diameter craft ball is thrown vertically. this initial velocity of the ball is 20 fts.a. neglecting drag

  Write a system program for bus arbiter

The bus arbiter is a device used in multi-master system with shared bus. It is used to allocate the control of the shared system bus to one master at a time depending priority.

  Write project report and provide cross-synthesis

Write project report and provide Cross-synthesis.

  Program the rank order cluster algorithm with a matrix

Program the rank order cluster algorithm with a matrix with x rows and x columns in any plataform (that the person inputs). I prefer visual studio or visual basic

  Matlab i uploaded the requirments

i uploaded the requirments

  Simulate an atm machine and provide the code

Simulate an ATM machine and provide the code. I have the answer already but i do not understand it; I need expert to guide through it step by step. thanks!

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  Blood declines due to metabolic processes

Find an expression for the half-life in terms of k, and obtain a plot of the half-life versus k for the indicated range.

  Consider a cstr with a feed stream

Consider a CSTR with a feed stream containing only A at a concentration of cA and the reactions A?B?C taking place in the CSTR. Both reactions are first order in the reactant

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd