L. Imposing Neumann boundary conditions

Neumann boundary conditions are handled much more simply than Dirichlet ones: the flux prescribed at the boundary immediately gives the vector s\vec{s} (nonzero only at the boundary nodes), which enters only the right-hand side of the system — the stiffness matrix a2Ka^2 K need not be changed.

Stationary case

For the five-node example (the fluxes g0g_0 and g4g_4 are prescribed; the source on the end simplices is zero, F0F_0 =F4= F_4 =0= 0) the modified right-hand side vector is:

P=F+a2s=(a2g0F1F2F3a2g4).\begin{gathered}\vec{P} = \vec{F} + a^2 \vec{s} = \begin{pmatrix} a^2 g_0 \\ F_1 \\ F_2 \\ F_3 \\ a^2 g_4 \end{pmatrix}.\end{gathered}

Non-stationary case

For the non-stationary problem the operator is DD +Δta2K+ \Delta t \cdot a^2 K, and the flux enters the right-hand side with the factor Δt\Delta t:

[D+Δta2K]qn\displaystyle \left[D + \Delta t \cdot a^2 K\right] \cdot \vec{q}_n =ΔtF\displaystyle = \Delta t \cdot \vec{F} +Dqn1\displaystyle + D \cdot \vec{q}_{n-1} +Δta2s.\displaystyle + \Delta t \cdot a^2 \vec{s}.

The modified right-hand side vector:

P\displaystyle \vec{P} =ΔtF\displaystyle = \Delta t \cdot \vec{F} +Dqn1\displaystyle + D \cdot \vec{q}_{n-1} +Δta2s\displaystyle + \Delta t \cdot a^2 \vec{s} =ΔtF\displaystyle = \Delta t \cdot \vec{F} +Dqn1\displaystyle + D \cdot \vec{q}_{n-1} +(Δta2g0000Δta2g4).\displaystyle + \begin{pmatrix} \Delta t \cdot a^2 g_0 \\ 0 \\ 0 \\ 0 \\ \Delta t \cdot a^2 g_4 \end{pmatrix}.

The operator DD +Δta2K+ \Delta t \cdot a^2 K is already nonsingular (the damping matrix DD is positive definite, (D+Δta2K)1(D + \Delta t \cdot a^2 K)\,\vec{1} =D1= D \vec{1} 0\neq 0), so the non-stationary Neumann problem is solvable even without Dirichlet conditions.