35 
In a similar process to the previous chapter, we will use the acceleration 
In a similar process to the previous chapter, we will use the acceleration 
36 
solution to solve this PDE. By substituting $a$ directly for 
solution to solve this PDE. By substituting $a$ directly for 
37 
$\frac{\partial^{2}u\hackscore{i}}{\partial t^2}$ we can derive the 
$\frac{\partial^{2}u\hackscore{i}}{\partial t^2}$ we can derive the 
38 
displacement solution. Using $a$ we can see that \refEq{eqn:wav} becomes 
displacement solution. Using $a$ we can see that \autoref{eqn:wav} becomes 
39 
\begin{equation} \label{eqn:wava} 
\begin{equation} \label{eqn:wava} 
40 
\rho a\hackscore{i}  \frac{\partial 
\rho a\hackscore{i}  \frac{\partial 
41 
\sigma\hackscore{ij}}{\partial x\hackscore{j}} = 0 
\sigma\hackscore{ij}}{\partial x\hackscore{j}} = 0 
53 
\mu (u\hackscore{i,j} + u\hackscore{j,i}) 
\mu (u\hackscore{i,j} + u\hackscore{j,i}) 
54 
\end{equation} 
\end{equation} 
55 
\end{subequations} 
\end{subequations} 
56 
One simply recognizes in \ref{eqn:sigtrace} that $u\hackscore{k,k}$ is the 
One simply recognizes in \autoref{eqn:sigtrace} that $u\hackscore{k,k}$ is the 
57 
trace of the displacement solution and that $\delta\hackscore{ij}$ is the 
trace of the displacement solution and that $\delta\hackscore{ij}$ is the 
58 
kronecker delta function with dimensions equivalent to $u$. The second term 
kronecker delta function with dimensions equivalent to $u$. The second term 
59 
\ref{eqn:sigtrans} is the sum of $u$ with its own transpose. Putting these facts 
\autoref{eqn:sigtrans} is the sum of $u$ with its own transpose. Putting these 
60 
together we see that the spatial differential of the stress is given by the 
facts together we see that the spatial differential of the stress is given by the 
61 
gradient of $u$ and the aforementioned opperations. This value is then submitted 
gradient of $u$ and the aforementioned opperations. This value is then submitted 
62 
to the \esc PDE as $X$. 
to the \esc PDE as $X$. 
63 
\begin{python} 
\begin{python} 
109 
\end{verbatim} 
\end{verbatim} 
110 
would call the script in this section and solve it using 4 threads. 
would call the script in this section and solve it using 4 threads. 
111 


112 
The computation times on an increasing number of cores is outlines in Table 
The computation times on an increasing number of cores is outlines in 
113 
\ref{tab:wpcores} 
\autoref{tab:wpcores}. 
114 


115 
\begin{table}[ht] 
\begin{table}[ht] 
116 
\begin{center} 
\begin{center} 
222 
simple to implement a source which is smooth in time. In addition to the 
simple to implement a source which is smooth in time. In addition to the 
223 
original source function the only extra requirement is a time function. For 
original source function the only extra requirement is a time function. For 
224 
this example the time variant source will be the derivative of a gausian curve 
this example the time variant source will be the derivative of a gausian curve 
225 
defined by the required dominant frequency (Figure \ref{fig:tvsource}). 
defined by the required dominant frequency (\autoref{fig:tvsource}). 
226 
\begin{python} 
\begin{python} 
227 
#Creating the time function of the source. 
#Creating the time function of the source. 
228 
dfeq=50 #Dominant Frequency 
dfeq=50 #Dominant Frequency 
285 
allow us the create an approximate solution with small to zero boundary effects 
allow us the create an approximate solution with small to zero boundary effects 
286 
on a model with a solvable size. 
on a model with a solvable size. 
287 


288 
To dampen the waves, the method of Cerjan(1985) 
To dampen the waves, the method of \citet{Cerjan1985} 

\footnote{\textit{A nonreflecting boundary condition for discrete acoustic and 


elastic wave equations}, 1985, Cerjan C, Geophysics 50, doi:10.1190/1.1441945} 

289 
where the solution and the stress are multiplied by a damping function defined 
where the solution and the stress are multiplied by a damping function defined 
290 
on $n$ nodes of the domain adjacent to the boundary, given by; 
on $n$ nodes of the domain adjacent to the boundary, given by; 
291 
\begin{equation} 
\begin{equation} 
338 
Note that the boundary conditions are not applied to the surface, as this is 
Note that the boundary conditions are not applied to the surface, as this is 
339 
effectively a free surface where normal reflections would be experienced. 
effectively a free surface where normal reflections would be experienced. 
340 
Special conditions can be introduced at this surface if they are known. The 
Special conditions can be introduced at this surface if they are known. The 
341 
resulting boundary damping function can be viewed in Figure 
resulting boundary damping function can be viewed in 
342 
\ref{fig:abconds}. 
\autoref{fig:abconds}. 
343 


344 
\section{Second order Meshing} 
\section{Second order Meshing} 
345 
For stiff problems like the wave equation it is often prudent to implement 
For stiff problems like the wave equation it is often prudent to implement 
390 
\sslist{example08c.py} 
\sslist{example08c.py} 
391 
To make the problem more interesting we will now introduce an interface to the 
To make the problem more interesting we will now introduce an interface to the 
392 
middle of the domain. Infact we will use the same domain as we did for heat flux 
middle of the domain. Infact we will use the same domain as we did for heat flux 
393 
in Chapter \ref{CHAP HEAT 2}. The domain contains a syncline with two set of 
in \autoref{CHAP HEAT 2}. The domain contains a syncline with two set of 
394 
material properties on either side of the interface. 
material properties on either side of the interface. 
395 


396 
\begin{figure}[ht] 
\begin{figure}[ht] 