 # Diff of /release/4.0/doc/cookbook/example07.tex

revision 3063 by ahallam, Thu Jul 15 02:57:46 2010 UTC revision 3232 by ahallam, Fri Oct 1 02:08:38 2010 UTC
# Line 35  example $p$. Thus we can write; Line 35  example $p$. Thus we can write;
35      \frac{\partial^2 p}{\partial x^2\hackscore{i}}      \frac{\partial^2 p}{\partial x^2\hackscore{i}}
36   \label{eqn:laplacian}   \label{eqn:laplacian}
37  \end{equation}  \end{equation}
38  For the two dimensional case in Cartesian coordinates \refEq{eqn:laplacian}  For the two dimensional case in Cartesian coordinates \autoref{eqn:laplacian}
39  becomes;  becomes;
40  \begin{equation}  \begin{equation}
41   \nabla^2 p = \frac{\partial^2 p}{\partial x^2}   \nabla^2 p = \frac{\partial^2 p}{\partial x^2}
# Line 66  pressure field which acts in the directi Line 66  pressure field which acts in the directi
67  \end{equation}  \end{equation}
68
69  \refEq{eqn:grad} corresponds to the Linear PDE general form value  \autoref{eqn:grad} corresponds to the Linear PDE general form value
70  $X$. Notice however that the general form contains the term $X$X$. Notice however that the general form contains the term$X
71  \hackscore{i,j}$\footnote{This is the first derivative in the$j^{th}$\hackscore{i,j}$\footnote{This is the first derivative in the $j^{th}$
72  direction for the $i^{th}$ component of the solution.},  direction for the $i^{th}$ component of the solution.},
73  hence for a rank 0 object there is no need to do more than calculate the  hence for a rank 0 object there is no need to do more than calculate the
74  gradient and submit it to the solver. In the case of the rank 1 or greater  gradient and submit it to the solver. In the case of the rank 1 or greater
75  object, it is nesscary to calculate the trace also. This is the sum of the  object, it is nesscary to calculate the trace also. This is the sum of the
77
78  Thus when solving for equations containing the Laplacian one of two things must  Thus when solving for equations containing the Laplacian one of two things must
79  be completed. If the object \verb!p! is less than rank 1 the gradient is  be completed. If the object \verb!p! is less than rank 1 the gradient is
# Line 148  second derivative; Line 148  second derivative;
148   f''(x) \approx \frac{f(x+h - 2f(x) + f(x-h)}{h^2}   f''(x) \approx \frac{f(x+h - 2f(x) + f(x-h)}{h^2}
149  \label{eqn:centdiff}  \label{eqn:centdiff}
150  \end{equation}  \end{equation}
151  substituting \refEq{eqn:centdiff} for $\frac{\partial ^2 p }{\partial t ^2}$  substituting \autoref{eqn:centdiff} for $\frac{\partial ^2 p }{\partial t ^2}$
152  in \refEq{eqn:acswave};  in \autoref{eqn:acswave};
153  \begin{equation}  \begin{equation}
154   \nabla ^2 p - \frac{1}{c^2h^2} \left[p\hackscore{(t+1)} - 2p\hackscore{(t)} +   \nabla ^2 p - \frac{1}{c^2h^2} \left[p\hackscore{(t+1)} - 2p\hackscore{(t)} +
155  p\hackscore{(t-1)} \right]  p\hackscore{(t-1)} \right]
# Line 270  the \verb!Locator! function. Line 270  the \verb!Locator! function.
270
271  An alternative method is to solve for the acceleration $\frac{\partial ^2 An alternative method is to solve for the acceleration$\frac{\partial ^2
272  p}{\partial t^2}$directly, and derive the displacement solution from the p}{\partial t^2}$ directly, and derive the displacement solution from the
273  PDE solution. \refEq{eqn:waveu} is thus modified;  PDE solution. \autoref{eqn:waveu} is thus modified;
274  \begin{equation}  \begin{equation}
275    \nabla ^2 p - \frac{1}{c^2} a = 0    \nabla ^2 p - \frac{1}{c^2} a = 0
276  \label{eqn:wavea}  \label{eqn:wavea}
# Line 309  of the model is $c=380.0ms^{-1}$ then th Line 309  of the model is $c=380.0ms^{-1}$ then th
309  frequency is $f\hackscore{r} = \frac{380.0}{5} = 76.0 Hz$. This is a worst case  frequency is $f\hackscore{r} = \frac{380.0}{5} = 76.0 Hz$. This is a worst case
310  scenario with a small source and the models maximum velocity.  scenario with a small source and the models maximum velocity.
311
312  Furthermore, we know from \refSec{sec:nsstab}, that the spatial sampling  Furthermore, we know from \autoref{sec:nsstab}, that the spatial sampling
313  frequency must be at least twice this value to ensure stability. If we assume  frequency must be at least twice this value to ensure stability. If we assume
314  the model mesh is a square equispaced grid,  the model mesh is a square equispaced grid,
315  then the sampling interval is the side length divided by the number of samples,  then the sampling interval is the side length divided by the number of samples,
316  given by $\Delta x = \frac{1000.0m}{400} = 2.5m$ and the maximum sampling  given by $\Delta x = \frac{1000.0m}{400} = 2.5m$ and the maximum sampling
317  frequency capable at this interval is  frequency capable at this interval is
318  $f\hackscore{s}=\frac{380.0ms^{-1}}{2.5m}=152Hz$ this is just equal to the  $f\hackscore{s}=\frac{380.0ms^{-1}}{2.5m}=152Hz$ this is just equal to the
319  required rate satisfying \refeq{eqn:samptheorem}.  required rate satisfying \autoref{eqn:samptheorem}.
320
321  \reffig{fig:ex07sampth} depicts three examples where the grid has been  \autoref{fig:ex07sampth} depicts three examples where the grid has been
322  undersampled, sampled correctly, and over sampled. The grids used had  undersampled, sampled correctly, and over sampled. The grids used had
323  200, 400 and 800 nodes per side respectively. Obviously, the oversampled grid  200, 400 and 800 nodes per side respectively. Obviously, the oversampled grid
324  retains the best resolution of the modelled wave.  retains the best resolution of the modelled wave.

Legend:
 Removed from v.3063 changed lines Added in v.3232