Implicit heat conduction
For constant diffusivity, $\alpha$, in space,
$$ \frac{\partial T}{\partial t} = \alpha \left(\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2}\right) + H $$For spatially varying diffusivity,
$$ \frac{\partial T}{\partial t} = \frac{\partial \left(\alpha \frac{\partial T}{\partial x} \right)}{\partial x} + \frac{\partial \left(\alpha \frac{\partial T}{\partial y} \right)}{\partial y} + H $$We use finite differences to approximate the second order spatial derivatives. Since we are using a centred differencing scheme, then the diffusivities should be located at half space steps centred on their specific gradients
$$ \begin{equation} \frac{\partial \left(\alpha \frac{\partial T}{\partial x} \right)}{\partial x} = \frac{1}{\Delta x} \left( \frac{ \alpha_{i+1/2,j} (T_{i+1,j}-T_{i,j}) }{\Delta x} - \frac{ \alpha_{i-1/2,j} (T_{i,j}-T_{i-1,j}) }{\Delta x} \right) \end{equation} $$next
$$ \frac{\partial \left(\alpha \frac{\partial T}{\partial y} \right)}{\partial y} = \frac{1}{\Delta y} \left( \frac{ \alpha_{i,j+1/2} (T_{i,j+1}-T_{i,j}) }{\Delta y} - \frac{ \alpha_{i,j-1/2} (T_{i,j}-T_{i,j-1}) }{\Delta y} \right) $$where $\alpha_{i+1/2,j}$ can be averaged by,
$$ \alpha_{i+1/2,j} = \frac{\alpha_{i+1,j} + \alpha_{i,j}}{2} $$Expanding out the difference and collecting like-terms (
$$T_{i+1,j}, T_{i,j}, T_{i-1,j}$$) in one dimensions gives,
$$ \begin{align} 2H \Delta x^2 \frac{\partial T}{\partial t} =& [\alpha_{i+1,j}T_{i+1,j} + \alpha_{i,j}T_{i+1,j}] \\ & - [\alpha_{i+1,j},T_{i,j} - 2\alpha_{i,j}T_{i,j} - \alpha_{i-1,j}T_{i,j}] \\ & + [\alpha_{i-1,j}T_{i-1,j} + \alpha_{i,j}T_{i-1,j}] \end{align} $$Boundary conditions
Surface boundary condition a constant temperature is assigned
$$T(0,t)=T0$$.
Left and right boundaries are assigned as insulated boundary conditions
$$\frac{\partial T}{\partial x}(0,t)=0$$.
$$ \frac{D_{N}+D_{N-1}}{2 \Delta x^2} - \frac{H_{N}+H_{N-1}}{2} $$- Bottom boundary condition is a Neumann (flux) boundary condition $$\frac{\partial T}{\partial x}(0,t)=Q$$.
Matrix notation
This can be expressed in matrix form to solve algebraically,
$$Ax = b$$where
$$A$$is the coefficient matrix. In 1D,

I am an ARC Industry Research Fellow in the School of Geography, Earth and Atmospheric Sciences at The University of Melbourne. I am an expert in fusing Earth evolution models with data to understand how groundwater moves critical minerals through the landscape. Related research interests include the cycling of volatiles within the Earth, probabilistic thermal models of the lithosphere to unravel past tectonic and climatic events, and understanding the how enigmatic volcanoes form.
I am a vocal advocate for the integral role of geoscience in responding to challenges we face in transitioning to the carbon-neutral economy. As an expert in my field, I have been interviewed in national and international print media, TV, and radio on a wide variety of subjects including earthquakes, volcanoes, groundwater, and critical minerals.