# Question on implementing boundary conditions

Let's consider a 1D heat diffusion problem,

$$\frac{dT}{dt} = \alpha\frac{\partial^2T}{\partial x^2}$$ This is most often discretized in space.The discretization results in a tridiaginal matrix.

Assuming $$\alpha=1$$ for simplicity, $$\frac{dT}{dt} = M T$$.

M is the tridiagonal matrix.

The matrix M, differs depending on the boundary condition that is used.

For example,

While formulating the above heat equation in the form of diffusion through a graph network, the equation is often expressed in terms of the Laplacian,

$$\frac{dT}{dt} = L T$$ where,L is the laplacian which is degree - adjacency. For example, when a rod that transmits heat is discretized into 4 nodes the laplacian is

L =

1    -1     0     0
-1     2    -1     0
0    -1     2    -1
0     0    -1     1


The Laplacian is always similar to the system with Neumann boundary conditions. I would like to ask for suggestions /references to understand how the other boundary conditions are implemented while solving heat flow through a graph network.

• Please care to explain why the question has been downvoted – Natasha Jan 7 at 10:10