# Boundary conditions There are different boundary condition that can be encountered in the physical processes that the model describes. Below we state all boundary conditions that are currently implemented: ## No heat flux Neumann type boundary condition. Often used to describe the bottom boundary condition of a region where no heat flux into deeper depths can be expected on the modelled time scales. It is a special case of the general prescribed heat flux condition, in which the zero on the left hand side would be replaced by a known source term $$\frac{\partial T}{\partial x} \bigg\vert_{x = x_{\text{max}}} = 0$$ ## Surface energy balance equation (SEB) The standard SEB form reads as $$Q_{\text{sol.}} + k \, \frac{\partial T}{\partial x} \bigg\vert_{\text{top}} = \sigma \, \varepsilon \, T_{\text{top}}^4 \quad,$$ but within the Finite Element Method framework, the capacitance, and stiffness matrix have to be altered, in order to retain the shape of equation. Further, we have to linearize the Stefan-Boltzmann radiation term in order to retain a linear system of equations, for the cases in which no temperature-dependent physical parameters are used. We linearize around the surface temperature of the last known time step to obtain $$\sigma \, \varepsilon \, \left(T^{n+1}_{\text{top}}\right)^4 \approx \sigma \, \varepsilon \, \left(T^{n}_{\text{top}}\right)^4 + 4 \, \sigma \, \varepsilon \left(T^{n}_{\text{top}}\right)^3 \, \left(T^{n+1}_{\text{top}} - T^{n}_{\text{top}}\right)\\ \approx S_c + S_{fo} \, T^{n+1}_{\text{top}} \quad,$$ with $S_c = - 3 \, \sigma \, \varepsilon \, \left(T^{n}_{\text{top}}\right)^4$ and $S_{fo} = 4 \, \sigma \, \varepsilon \, \left(T^{n}_{\text{top}}\right)^3$. The resulting matrix elements read $$\boldsymbol{C_m} = \frac{c_p \, \rho \, A_{m+1/2} \, l_m}{6} \begin{bmatrix} 0 & 0 \\ 1 & 2 \end{bmatrix} \\ \boldsymbol{K_m} = \frac{k \, A_{m+1/2}}{l_m} \begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix} + S_{fo} \, A_{m+1/2} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \\ \overrightarrow{f} = \frac{A_{m+1/2} \, Q \, l_m}{2} \begin{bmatrix} 0 \\ 1 \end{bmatrix} + \left(S_c + Q_{\text{sol.}}\right) \, A_{m+1/2} \begin{bmatrix} 1 \\ 0 \end{bmatrix} \quad.$$ Substituting these matrices into the discretization equation one obtains the SEB equation again for the top temperature in the case of no source or sink terms.