/[escript]/trunk/doc/cookbook/example07.tex
ViewVC logotype

Contents of /trunk/doc/cookbook/example07.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3003 - (show annotations)
Wed Apr 7 02:29:57 2010 UTC (10 years, 3 months ago) by ahallam
File MIME type: application/x-tex
File size: 3320 byte(s)
Pressure wave working, accelleration example, new entries to cookbook for example 7.
1
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % Copyright (c) 2003-2010 by University of Queensland
5 % Earth Systems Science Computational Center (ESSCC)
6 % http://www.uq.edu.au/esscc
7 %
8 % Primary Business: Queensland, Australia
9 % Licensed under the Open Software License version 3.0
10 % http://www.opensource.org/licenses/osl-3.0.php
11 %
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14
15
16 The acoustic wave equation governs the propagation of pressure waves. Wave
17 types that obey this law tend to travel in liquids or gases where shear waves
18 or longitudinal style wave motion is not possible. The obvious example is sound
19 waves.
20
21 The acoustic wave equation is;
22 \begin{equation}
23 \nabla ^2 p - \frac{1}{c^2} \frac{\partial ^2 p}{\partial t^2} = 0
24 \label{eqn:acswave}
25 \end{equation}
26 where $p$ is the pressure, $t$ is the time and $c$ is the wave velocity.
27
28
29
30 \section{Numerical Solution Stability}
31 Unfortunately, the wave equation is belongs to a class of equations called
32 \textbf{stiff} PDEs. This types of equations can be difficult to solve
33 numerically as they tend to oscilate about the exact solution and can
34 eventually blow up. To counter this problem, explicitly stable schemes like the
35 backwards Euler method are required. In terms of the wave equation, the
36 analytical wave must not propagate faster than the numerical wave is able to,
37 and in general, needs to be much slower than the numerical wave.
38
39 For example, a line 100m long is discretised into 1m intervals or 101 nodes. If
40 a wave enters with a propagation velocity of 100m/s then the travel time for
41 the wave between each node will be 0.01 seconds. The time step, must therefore
42 be significantly less than this. Of the order $10E-4$ would be appropriate.
43
44 This requirement for very small step sizes makes stiff equations difficult to
45 solve numerically due to the large number of time iterations required in each
46 solution. Models with very high velocities and fine meshes will be the worst
47 affected by this problem.
48
49
50 \section{Displacement Solution}
51 \sslist{example07a.py}
52
53 We begin the solution to this PDE with the centred difference formula for the
54 second derivative;
55 \begin{equation}
56 f''(x) \approx \frac{f(x+h - 2f(x) + f(x-h)}{h^2}
57 \label{eqn:centdiff}
58 \end{equation}
59 substituting \refEq{eqn:centdiff} for $\frac{\partial ^2 p }{\partial t ^2}$
60 in \refEq{eqn:acswave};
61 \begin{equation}
62 \nabla ^2 p - \frac{1}{c^2h^2} \left[p_{(t+1)} - 2p_{(t)} + p_{(t-1)} \right]
63 = 0
64 \label{eqn:waveu}
65 \end{equation}
66 Rearranging for $p_{(t+1)}$;
67 \begin{equation}
68 p_{(t+1)} = c^2 h^2 \nabla ^2 p_{(t)} +2p_{(t)} - p_{(t-1)}
69 \end{equation}
70 this can be compared with the general form of the \modLPDE module and it
71 becomes clear that $D=1$, $X=-c^2 h^2 \nabla ^2 p_{(t)}$ and $Y=2p_{(t)} -
72 p_{(t-1)}$.
73
74 \section{Acceleration Solution}
75 \sslist{example07b.py}
76
77 An alternative method is to solve for the acceleration $\frac{\partial ^2
78 p}{\partial t^2}$ directly, and derive the the displacement solution from the
79 PDE solution. \refEq{eqn:waveu} is thus modified;
80 \begin{equation}
81 \nabla ^2 p - \frac{1}{c^2} a = 0
82 \label{eqn:wavea}
83 \end{equation}
84 and can be solved directly with $Y=0$ and $X=-c^2 \nabla ^2 p_{(t)}$.
85 After each iteration the displacement is re-evaluated via;
86 \begin{equation}
87 p_{(t+1)}=2p_{(t)} - p_{(t-1)} + h^2a
88 \end{equation}
89
90

  ViewVC Help
Powered by ViewVC 1.1.26