Numerical solution of the 2d wave equation using finite differences. We give a simple and efficient algorithm based on an iterative process for numerical solution of the method. All the matlab codes are uploaded on the course webpage. Example 2 in this example the finite difference schemes 17 is used to solve the fractional wave equations 1 with. Numerical solution of nonlinear fourth order fractional sub.
The 1d scalar wave equation for waves propagating along the x axis can be expressed as 1 22 2 22 u x t u x t, v tx ww ww where u x t, is the wavefunction and v is the speed of propagation of the. Jan 27, 2016 this code aims to solve the wave equation on a 2d square plate and simulate the output in an userfriendly matlab gui you can find the solution derivations here. Pdf numerical simulation of wave equation researchgate. Based on your location, we recommend that you select. Numerical integration of linear and nonlinear wave equations by laura lynch this thesis was prepared under the direction of the candidates thesis advisor.
Numerical solution of 1d time independent schrodinger. Numerical solution of partial di erential equations. Numerical solution of twosided spacefractional wave. In the hyperbolic pdes, we encountered the 1d wave equation and burgers equation. Consider a onedimensional wave equation of a quant. The matlab code ive written finds a numerical solution to the falknerskan, a third order ordinary differential equation, for laminar boundary layers given a value of the pressure gradient. From the obtained numerical results, we conclude that the numerical solutions are in excellent agreement with the exact solution by using shifted grunwald finite difference method. Numerical solutions of the schr odinger equation 1 introduction. February 6, 2003 abstract this paper presents an overview of the acoustic wave equation and the common timedomain numerical solution strategies in closed environments. Numerical methods for solving the heat equation, the wave.
Suppose that the function hx,t gives the the height of the wave at position x and time t. A matlab toolbox for the time domain simulation of. Matlab plots the graph on a figure with a limited number of screen pixels. The methods of choice are upwind, downwind, centered, laxfriedrichs, laxwendroff, and cranknicolson.
Later we will derive for numerical solution using pdes. Numerical and analytical methods with matlab and maple. Figures will normally be saved in the same directory as where you saved the code. Pdf on the numerical solution of the 2d wave equation with. For an example, see provide initial guess to find solutions for polynomial equations, vpasolve returns all solutions. Create an animation to visualize the solution for all time steps. If vpasolve cannot find a solution, it returns an empty object. Solution of wave equation by finite difference method. Also we will design a matlab program to solve and simulate wave propagation. Finally for visualizing, some array manipulation is done.
All lessons and labs cover numerical analysis with examples from civil engineering water, environment, structures, transportation, and geotech such as sediment transport, surface flooding, groundwater flow, traffic network, pollute dispersion, and shock wave propagation. In the numerical tests, once t he combination m ethod of dq. Numerical integration of linear and nonlinear wave equations. After you solve an equation with pdepe, matlab returns the solution as a 3d array sol, where soli,j,k contains the kth component of the solution evaluated at ti and xj. Numerical methods for partial differential equations math f422 bits pilani. Provide initial guess to help the solver finding a solution. Chapter 4 the w ave equation another classical example of a hyperbolic pde is a wave equation. Keep a fixed vertical scale by first calculating the maximum and minimum values of u over all times, and scale all plots to use those zaxis limits.
Numerical solutions for pdes heat equation, poisson equation, wave equation numericalmethods numericalanalysis partialdifferentialequations scientificcomputing computationalscience matlab. For nonpolynomial equations, there is no general method of finding all solutions and vpasolve returns only one solution by default. Pdf on the numerical solution of the 2d wave equation. This is accomplished using an implicit finite difference fd scheme for the wave equation and solving an elliptic modified helmholtz equation at each time step with fourth order spatial accuracy by the method of difference potentials mdp. Numerical methods for partial differential equations matlab central. This is a numerical simulation result for the socalled kortewegdevriespde, which models the propagation of nonlinear waves in. For four different energy level, wave function or the probability density function is plotted at the end. For this we investigate finite difference method and present explicit. Traveling wave analysis of partial differential equations. R i am going to write a program in matlab which will compare initial and final velocity profile for 1d linear convection for different value of grid points. On the numerical solution of the 2d wave equation with compact fdtd schemes. In general, you can extract the kth solution component with the command u sol. I am trying to implement matlab code to solve the wave equation, my function looks like this.
Numerical solution to the wave equation explicit method. Numerical solution for kawahara equation by using spectral. Research journal of applied sciences, engineering and technology, 2012. First, the wave equation is presented and its qualities analyzed.
Efficient semiimplicit schemes for stiff systems via newtons form. Wave equation file exchange matlab central mathworks. Finite difference methods for 2d and 3d wave equations. To solve the falknerskan equation a fourthorder rungekutta integration scheme was used. Numerical solution of fractional diffusionwave equation. A numerical approach for solving a general nonlinear wave equation. Jan, 2015 wave equation with finite difference method code. Matlab files numerical methods for partial differential. Such solutions include all events from primary and multiple scattering, and so are used for reverse time migration and waveform inversion. In trying to implement a simplistic numerical solver for wave equations, i have run into a conceptual problem that i havent been able to solve. This code aims to solve the wave equation on a 2d square plate and simulate the output in an userfriendly matlabgui you can find the solution derivations here. Numerical solution of fractional diffusionwave equation with two space variables by matrix method mridula garg, pratibha manohar abstract in the present paper we solve spacetime fractional di.
The wave equation is a secondorder linear hyperbolic pde that describes the propagation of a variety of waves, such as sound or water waves. Therefore one needs to use numerical methods for solving this equation. Solitary waves are wave solutions of nonlinear pdes that do not change shape, even after overtaking each other. For each code, you only need to change the input data and maybe the plotting part. Simple wave equation solver file exchange matlab central. This code aims to solve the wave equation on a 2d square plate and simulate the output in an userfriendly matlab gui you can find the solution derivations here. If eqn is a symbolic expression without the right side, the solver assumes that the right side is 0, and solves the equation eqn 0. At the end, wave function is normalized to get probability density function using matlab inbuilt trapz command trapezoidal rule for numerical integration. Pdf numerical solution for diffusion waves equation using. The toolbox has a wide range of functionality, but at its heart is an advanced numerical model that can account for both linear and nonlinear wave propagation, an arbitrary distribution of heterogeneous material parameters, and power law acoustic absorption. Numerical solution to the falknerskan chris otoole. When the elasticity k is constant, this reduces to usual two term wave equation u tt c2u xx where the velocity c p k.
This chapter introduces some popular numerical methods for approximating solutions to the acoustic and elastic wave equations. The graphical rendering involves some kind of downsampling, if the matrix that has to be represented is large compared with the number of figure pixels. A symbolic equation is defined by the relation operator. Choose a web site to get translated content where available and see local events and offers. We will begin with solution for linear waves, then present problem for nonlinear waves. An example of solving a wave equation using finite difference. Wave equation 1 the wave equation the wave equation describes how waves propagate. Numerical simulation of wave equation global journal of science. Numerical solutions for pdes heat equation, poisson equation, wave equation numerical methods numerical analysis partialdifferentialequations scientificcomputing computationalscience matlab. A brief derivation of the energy and equation of motion of a wave is done before the numerical part in order to make the transition from the continuum to the lattice clearer.
Matlab codes for numerical solutions of the heat, the wave and laplaces equations. Numerical solution of 2d wave equation with absorbing boundaries. Jan 27, 2016 2 dimensional wave equation analytical and numerical solution this project aims to solve the wave equation on a 2d square plate and simulate the output in an userfriendly matlab gui you can find the gui in mathworks fileexchange here. Pdf numerical analysis of the onedmential wave equation. Matlab scientific programming language and the implement the. Jan 26, 2015 at the end, wave function is normalized to get probability density function using matlab inbuilt trapz command trapezoidal rule for numerical integration. We solve the wave equation with variable wave speed on nonconforming domains with fourth order accuracy in both space and time. Numerical solutions to the wave equation seismic inversion. Finite difference modelling of the full acoustic wave equation in matlab hugh d. This program describes a moving 1d wave using the finite difference method. Solve 2d wave equation with finite difference method.
17 662 19 53 964 56 481 544 83 62 1223 155 926 715 229 630 88 404 122 800 777 861 1167 124 1370 720 1011 558 68 1216 1221 385 713 468 189 824