1 / 11

The Wave Equation

The Wave Equation. The Wave equation describes sound waves in a continuum (i.e., liquid or gas),. time step. Time Dependent Problem. Weak Formulation ( variational formulation). Fix a time t. Multiply equation (1) by and then integrate over the domain. Green’s theorem gives.

gerodi
Download Presentation

The Wave Equation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Wave Equation The Wave equation describes sound waves in a continuum (i.e., liquid or gas), time step

  2. Time Dependent Problem Weak Formulation ( variational formulation) Fix a time t Multiply equation (1) by and then integrate over the domain Green’s theorem gives

  3. Variational Formulation Spatial Discretization

  4. Spatial Discretization spatial semi-discretization equation Reduce into first order

  5. Spatial Discretization spatial semi-discretization equation Reduce into first order

  6. Spatial Discretization spatial semi-discretization equation Crank-Nicolson Method

  7. Fully Discrete Equation Crank-Nicolson Method Crank-Nicolson Method (Matrix Form)

  8. Example

  9. Computer Implementation % We solve the wave equation % d2u/dt2-div(grad(u))=0 on a square. % Problem definition g='squareg'; % The unit square b='squareb3'; % 0 on the left and right boundaries and % 0 normal derivative on the top & bottom. c=1; a=0; f=0; d=1; % pde coeff % Mesh [p,e,t]=initmesh('squareg'); % The initial conditions: % u(0)=atan(cos(pi/2*x)) and % dudt(0)=3*sin(pi*x).*exp(sin(pi/2*y)) x=p(1,:)'; y=p(2,:)'; u0=atan(cos(pi/2*x)); ut0=3*sin(pi*x).*exp(sin(pi/2*y)); % We want the sol at 31 pts in time between 0 and 5. n=401; tlist=linspace(0,5,n); % Solve hyperbolic problem uu=hyperbolic(u0,ut0,tlist,b,p,e,t,c,a,f,d); % To speed up plot, we interpolate to a rect grid. delta=-1:0.1:1; [uxy,tn,a2,a3]=tri2grid(p,t,uu(:,1),delta,delta); gp=[tn;a2;a3]; % Make the animation newplot; M=moviein(n); umax=max(max(uu)); umin=min(min(uu)); for i=1:n,... pdeplot(p,e,t,'xydata',uu(:,i),'zdata',... uu(:,i),'zstyle','continuous',... 'mesh','off','xygrid','on',... 'gridparam',gp,'colorbar','off');... axis([-1 1 -1 1 umin umax]); caxis([umin umax]); M(:,i)=getframe; end

  10. T=0 100 time step 200 time step 400 time step

More Related