Fixed-value boundary condition General scalar transport equation: $ \underbrace{\frac{\partial(\rho c_p T)}{\partial t}}_\text{steady}+\underbrace{\nabla\cdot(\rho c_p T\boldsymbol{U})}_\text{convection}=\underbrace{\nabla\cdot(k\nabla T)+S}_\text{diffusion} $ Neglecting unsteady and convection terms results in: $ 0=\nabla\cdot(k\nabla T)+S $ Expanding this results in: $ 0=\frac{\partial}{\partial x}\left(k\frac{\partial T}{\partial x}\right)+\frac{\partial}{\partial y}\left(k\frac{\partial T}{\partial y}\right)+\frac{\partial}{\partial z}\left(k\frac{\partial T}{\partial z}\right)+S $ Simplifying to one dimension (x): $ 0=\frac{\partial}{\partial x}\left(k\frac{\partial T}{\partial x}\right)+S $ This is the 1D diffusion equation for temperature. To solve, integrate: $ 0=\int_V\left[\frac{\partial}{\partial x}\left(k\frac{\partial T}{\partial x}\right)+S\right]dV $ Integrals are commutative: $ 0=\int_V\left[\frac{\partial}{\partial x}\left(k\frac{\partial T}{\partial x}\right)\right]dV+\int_V[S]dV $ Note the [[Gauss Divergence Theorem]]: $ \int_V(\nabla\cdot\boldsymbol{B})=\int_A(\boldsymbol{B}\cdot\hat{\boldsymbol{n}})dA $ Expanding this: $ \int_V\left(\frac{\partial B_x}{\partial x}+\frac{\partial B_y}{\partial y}+\frac{\partial B_z}{\partial z}\right)dV=\int_A\left(B_xn_x+B_yn_y+B_zn_z\right)dA $ Restricting to 1D: $ \int_V\left(\frac{\partial B_x}{\partial x}\right)dV=\int_A\left(B_xn_x\right)dA $ For the 1D heat diffusion equation, $B=k\nabla T$, and $B_x=k\left(\partial T/\partial x\right)$. Applying this results in: $ 0=\int_Ak\frac{\partial T}{\partial x}n_xdA + \int_V[S]dV $ The source term can be averaged over the control volume, and can be moved out of the integral: $ 0=\int_Ak\frac{\partial T}{\partial x}n_xdA+\bar{S}V $ Taking the x-axis to point to the right, the diffusion term can be written as: $ 0=\left[kA\frac{\partial T}{\partial x}\right]_r-\left[kA\frac{\partial T}{\partial x}\right]_l+\bar{S}V $