# Diff of /trunk/doc/cookbook/twodheatdiff001.tex

revision 2645 by ahallam, Thu Sep 3 02:20:33 2009 UTC revision 2681 by ahallam, Thu Sep 24 03:04:04 2009 UTC
# Line 12  Line 12
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 cross-section through its centre will effectively model a 3D problem in 2D. New concepts will include non-linear 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 cross-section through its centre will effectively model a 3D problem in 2D. New concepts will include non-linear boundaries and the ability to prescribe location specific variables.
18
# Line 48  mypde.setValue(A=A*kronecker(model),D=D, Line 49  mypde.setValue(A=A*kronecker(model),D=D,
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
# Line 84  pl.clf() Line 86  pl.clf()
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}

Legend:
 Removed from v.2645 changed lines Added in v.2681