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 return the area of a rectangle

Write a function calcrectarea that will calculate and return the area of a rectangle. Pass the length and width to the function as input arguments.

  Coding(using for and while loop)

coding(using for and while loop)

  Evaluate the average power for the signals

Evaluate the average power for the signals and graph the discrete-time functions. Find and to graph the unit-sequence response of the system

  Calculate the inverse of a function

Using matlab write the function [Bag,x] = EG(A,b) to solve the system without pivoting. The solution is the vector x and flag is 0 when the algorithm is completed and 1 otherwise.

  Build a simple revolvate robot

Define the robot as Robot.  Use the appropriate functions (i.e. methods) in the Robotics Toolbox - Generate a second pose and re-plot it.

  Mat lab programming problem

In case the problem in the code I want you to modify it give the correct temperature.

  Build a matlab birthday cake using the cylinder

Prepare for Project you should carefully read the Notes on Trajectory Formation that are available on Moddle.  As you read them, you should try out the concepts in MATLAB.

  Rearranging preceding relationship between moles and mass

Create a function M-file called mass that requires two vector inputs-the number of moles and the molecular weight-and returns the corresponding mass. Because you are providing vector input, it will be necessary to use the meshgrid func..

  Plot the open loop displacement response of the

a farm equipment manufacturer has a need to actively reduce the vibration of the operators seat using an electrodynamic

  Determine the specular component

Reparemeterizing each pixel point using spherical coordinates and rotation RGB color space to SUV color space in the paper

  Find general solution of the ordinary differential equation

Find a general solution of the following ordinary differential equations and find the general solution of the following ordinary differential equation

  It is now cooled so the volume becomes half the initial

a piston cylinder loaded so it gives constant pressure has 0.75 kg saturated vapor water at 200 kpa. it is now cooled

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