# How to calculate the heat flux on boundary with a fixed temperature?

I want to calculate the heat conduction problem, not with Laplacian of temperature

$\frac{dT}{dt}=\nabla^2 T$,

but its decomposition formula:

$\frac{dT}{dt}=\nabla \cdot(\nabla T)$.

In this case, to solve a simple heat conduction with fix boundary temperature, the value of $\nabla T$ on boundary should be obtained to calculate the divergence of inner solid.

But I'm not sure about $\nabla T$ on the boundary, is it equal to 0 or same as heat flux near boundary? how can I calculate this value?

Also, is the direction of heat flux normal to the boundary?

Really appreciate anyone who can help!

Generally, to compute flux through a surface $S$, you need to take the divergence of the vector field and dot it with a unit vector $\vec{n}$ normal to the surface $S$. The key insight here is that we know what this unit normal vector $\vec{n}$ is: It must be equal to $\dfrac{\nabla T}{\|\nabla T\|}$ (up to sign). This is because the surface $S$ has a fixed temperature. (Think about this point, this is the critical insight of this problem.)
So to answer your questions: $\nabla T$ on the boundary $S$ is just whatever you compute it to be: Just evaluate $\nabla T$ at points on $S$, nothing special going on here.
Next question: "is the direction of heat flux normal to the boundary?". First, remember that "flux" is a scalar quantity so it does not have any direction. But what I think you're getting at is what I just explained above: $\nabla T$ on the surface $S$ is normal to $S$.