previous up next print clean
Next: Sources for the heat Up: Claerbout: The adjoint of Previous: Basic ideas and notation

HEAT FLOW EQUATION

The one-dimensional heat flow equation is  
 \begin{displaymath}
{\partial q \over \partial t} \quad =\quad\sigma
{\partial^2 q \over \partial x^2} \ +\ s(x,t)\end{displaymath} (2)
where q is temperature, $\sigma$ is heat conductivity divided by heat capacity and s is a possible source of heat. Discretizing equation (2) with the usual explicit finite difference operator gives  
 \begin{displaymath}
q_{t+1}^x \quad +=\quad q_t^x \ +\ \sigma ( q_t^{x-1}-2q_t^x+q_t^{x+1} ) \ +\ s_t^x\end{displaymath} (3)
where t takes integer values, $\sigma$ is like the $\sigma$ in the differential equation but here it includes $\Delta t/\Delta x^2$.Ignoring the source stx, the adjoint of (3) is
\begin{displaymath}
\begin{array}
{lcr}
q_t^x &\quad +=\quad& q_{t+1}^x \\ q_t^{...
 ...+1}^x \\ q_t^{x+1} &\quad +=\quad& \sigma q_{t+1}^x \end{array}\end{displaymath} (4)

Below is a Ratfor subroutine that transforms between qt and qt+1, denoted by qq() and rr(). (Unfortunately Ratfor does not admit the += notation.)

subroutine heatstep( adj, add, sigma, qq,nx,  rr   )
integer              adj, add,           nx,      x
real			       sigma, qq(nx), rr(nx)
call        adjnull( adj, add,        qq,nx,  rr,nx)
do x= 2, nx-1 {
	if( adj == 0) {
		rr(x) = rr(x) + qq(x) + ( qq(x-1) - 2*qq(x) + qq(x+1)) * sigma
	} else {
		qq(x  ) = qq(x)   + rr(x)
		qq(x-1) = qq(x-1) + rr(x) * sigma
		qq(x  ) = qq(x  ) - rr(x) * sigma * 2
		qq(x+1) = qq(x+1) + rr(x) * sigma
		}
	}
return; end

Let us think about the adjoint calculation. It says we can consider in turn each temperature value qt+1x. From this value we augment (or diminish) neighboring temperatures according to the adjoint prescription. Strangely, for constant $\sigma$ and far from boundaries, this adjoint process is equivalent to the usual heat flow process itself (but backwards in time). The reason it is equivalent is that each process, forward and adjoint, is the same matrix multiplication, the forward grouped by rows and the adjoint grouped by columns.



 
previous up next print clean
Next: Sources for the heat Up: Claerbout: The adjoint of Previous: Basic ideas and notation
Stanford Exploration Project
11/12/1997