194 |
\end{verbatim} |
\end{verbatim} |
195 |
The problem is now solved and plotting is required to visualise the data. |
The problem is now solved and plotting is required to visualise the data. |
196 |
|
|
197 |
|
\subsection{Line profiles of 2D data} |
198 |
|
It is possible to take slices or profile sections of 2d data using \mpl. To acheive this there are three major steps, firstly the solution must be smoothed across the domain using the \verb projector() function. |
199 |
|
\begin{verbatim} |
200 |
|
proj=Projector(mymesh) |
201 |
|
smthT=proj(T) |
202 |
|
\end{verbatim} |
203 |
|
The data must then be moved to a regular grid. |
204 |
|
\begin{verbatim} |
205 |
|
xi,yi,zi = toRegGrid(smthT,mymesh,200,200,width,depth) |
206 |
|
\end{verbatim} |
207 |
|
The profile can then be plotted by taking a slice of the data output \verb zi . |
208 |
|
\begin{verbatim} |
209 |
|
cut=int(len(xi)/2) |
210 |
|
pl.clf() |
211 |
|
pl.plot(zi[:,cut],yi) |
212 |
|
pl.title("Heat Refraction Temperature Depth Profile") |
213 |
|
pl.xlabel("Temperature (K)") |
214 |
|
pl.ylabel("Depth (m)") |
215 |
|
\end{verbatim} |
216 |
|
This process can be repeated for various variations of the solultion. In this case we have temperature, temperature gradient, thermal conductivity and heat flow \reffig{figs:dps}. |
217 |
|
\begin{figure} |
218 |
|
\centering |
219 |
|
\subfigure[Temperature Depth Profile]{\includegraphics[width=3in]{figures/heatrefraction001tdp.png}\label{fig:tdp}} |
220 |
|
\subfigure[Temperature Gradient Depth Profile]{\includegraphics[width=3in]{figures/heatrefraction001tgdp.png}\label{fig:tgdp}} |
221 |
|
\subfigure[Thermal Conductivity Profile]{\includegraphics[width=3in]{figures/heatrefraction001tcdp.png}\label{fig:tcdp}} |
222 |
|
\subfigure[Heat Flow Depth Profile]{\includegraphics[width=3in]{figures/heatrefraction001hf.png}\label{fig:hf}} |
223 |
|
\caption{Depth profiles down centre of model.} |
224 |
|
\label{figs:dps} |
225 |
|
\end{figure} |
226 |
|
|
227 |
|
|
228 |
|
|
229 |
|
|
230 |
\subsection{Quiver plots in \mpl} |
\subsection{Quiver plots in \mpl} |
231 |
To visualise this data we are going to do three things. Firstly we will generate the gradient of the solution and create some quivers or arrows that describe the gradient. Then we need to generate some temperatur contours and thirdly, we will create some polygons from our meshing output files to show our material boundaries. |
To visualise this data we are going to do three things. Firstly we will generate the gradient of the solution and create some quivers or arrows that describe the gradient. Then we need to generate some temperatur contours and thirdly, we will create some polygons from our meshing output files to show our material boundaries. |
232 |
|
|
278 |
pl.savefig(os.path.join(saved_path,"heatrefraction001_contqu.png")) |
pl.savefig(os.path.join(saved_path,"heatrefraction001_contqu.png")) |
279 |
\end{verbatim} |
\end{verbatim} |
280 |
The data has now been plotted. |
The data has now been plotted. |
281 |
\begin{figure}[h] |
\begin{figure}[ht] |
282 |
\centerline{\includegraphics[width=4.in]{figures/heatrefraction001contqu}} |
\centerline{\includegraphics[width=4.in]{figures/heatrefraction001contqu}} |
283 |
\caption{Heat refraction model with gradient indicated by quivers.} |
\caption{Heat refraction model with gradient indicated by quivers.} |
284 |
\label{fig:hr001qumodel} |
\label{fig:hr001qumodel} |
287 |
\newpage |
\newpage |
288 |
\subsection{Fault and Overburden Model} |
\subsection{Fault and Overburden Model} |
289 |
A slightly more complicated model can be found in the examples \textit{heatrefraction_mesher002.py} and \textit{heatrefractoin002.py} where three blocks are used within the model. |
A slightly more complicated model can be found in the examples \textit{heatrefraction_mesher002.py} and \textit{heatrefractoin002.py} where three blocks are used within the model. |
290 |
\begin{figure}[h] |
\begin{figure}[ht] |
291 |
\centerline{\includegraphics[width=4.in]{figures/heatrefraction002contqu}} |
\centerline{\includegraphics[width=4.in]{figures/heatrefraction002contqu}} |
292 |
\caption{Heat refraction model with three blocks and gradient quivers.} |
\caption{Heat refraction model with three blocks and gradient quivers.} |
293 |
\end{figure} |
\end{figure} |