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

  Write a matlab script that performs dot product

Let a and b be three-dimensional vectors. Write a MATLAB script that performs: 1. the dot product between the two vectors and 2. the cross product a × b.

  Draw the set x on a two-dimensional plane

Draw the set X on a two-dimensional plane and draw the set Yon a two-dimensional plane. Comment on the mapping - Draw the set Z on a two-dimensional plane.

  Create a matrix of 5x6

Prepare a matrix of 5x6. with identical columns and rows ranging from 200 to 1000 in equal increments

  Matlab function to perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  Plot an outcome of the proportion of successes

Simulate 2000 coin flip experiments with a biased coin with "success" probability (chance of 1) p = 1=5. Plot an outcome of the proportion of successes with respect to the number of coin flips. Supply your code.

  Let''s combine everything together

Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

  Construct a correlation receiver to detect the noisy signals

Write a program to plot a graph of the theoretical probability of error versus 10log10(Eb/N0) ranging from 0 to 12 dB in increments of 1 for the signals. This will be used to evaluate your simulations.

  Describe how you would access these 4 members

Create a namespace titled global Type that contains four members. The members should be two named constants, n and rate. It should also contain a variable count and the function printResult. Describe how you would access these 4 members in a progr..

  Natural frequencies of vibration of a uniform beam

Natural frequencies of vibration of a uniform beam clamped at one end and free at the other are solutions of the equation - output explain how you know your program has actually found the correct "physically meaningful" roots within the expected err..

  Create a vector in matlab

Create a three dimensional diagram of function.

  Problem gauss-seidel method

Write all of the above sets of equations in the matrix format and identify the sets that you cannot solve by using an iterative method such as Jacobi and/or Gauss-Seidel method. Show the details of how you decide that the method will not converge ..

  Hi i attached the instructions would you guys do it by 50

i attached the instructions. ltbrgt ltbrgtwould you guys do it by 50 dollars ? ltbrgt ltbrgtit is due this friday

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