12 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
13 


14 
\section{Two Dimensional Heat Diffusion for a basic Magmatic Intrusion} 
\section{Two Dimensional Heat Diffusion for a basic Magmatic Intrusion} 
15 

\sslist{twodheatdiff001.py and cblib.py} 
16 
%\label{Sec:2DHD} 
%\label{Sec:2DHD} 
17 
Building upon our success from the 1D models it is now prudent to expand our domain by another dimension. For this example we will be using a very simple magmatic intrusion as the basis for our model. The simulation will be a single event where some molten granite has formed a hemisphericle dome at the base of some cold sandstone country rock. A hemisphere is symmetric so taking a crosssection through its centre will effectively model a 3D problem in 2D. New concepts will include nonlinear boundaries and the ability to prescribe location specific variables. 
Building upon our success from the 1D models it is now prudent to expand our domain by another dimension. For this example we will be using a very simple magmatic intrusion as the basis for our model. The simulation will be a single event where some molten granite has formed a hemisphericle dome at the base of some cold sandstone country rock. A hemisphere is symmetric so taking a crosssection through its centre will effectively model a 3D problem in 2D. New concepts will include nonlinear boundaries and the ability to prescribe location specific variables. 
18 


49 
\end{verbatim} 
\end{verbatim} 
50 
Our PDE has now been properly established. The initial conditions for temperature are set out in a similar matter: 
Our PDE has now been properly established. The initial conditions for temperature are set out in a similar matter: 
51 
\begin{verbatim} 
\begin{verbatim} 
52 
T= Ti*whereNegative(bound)+Tc*wherePositive(bound) #defining the initial temperatures. 
#defining the initial temperatures. 
53 

T= Ti*whereNegative(bound)+Tc*wherePositive(bound) 
54 
\end{verbatim} 
\end{verbatim} 
55 
The iteration process now begins as before, but using our new conditions for \verb D as defined above. 
The iteration process now begins as before, but using our new conditions for \verb D as defined above. 
56 


86 
\begin{figure}[h!] 
\begin{figure}[h!] 
87 
\centerline{\includegraphics[width=4.in]{figures/heatrefraction050}} 
\centerline{\includegraphics[width=4.in]{figures/heatrefraction050}} 
88 
\caption{2D model: Total temperature distribution ($T$) at time $t=50$.} 
\caption{2D model: Total temperature distribution ($T$) at time $t=50$.} 
89 
\label{fig:twodhdmodel} 
\label{fig:twodhdans} 
90 
\end{figure} 
\end{figure} 