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\overrightarrow{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\displaystyle \overrightarrow{P} =F\displaystyle {} = \overrightarrow{F}+a2s\displaystyle {} + a^2 \overrightarrow{s}=(a2g0F1F2F3a2g4).\displaystyle {} = \begin{pmatrix} a^2 g_0 \\ F_1 \\ F_2 \\ F_3 \\ a^2 g_4 \end{pmatrix}.

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 \overrightarrow{q}_n =ΔtF\displaystyle {} = \Delta t \cdot \overrightarrow{F}+Dqn1\displaystyle {} + D \cdot \overrightarrow{q}_{n-1}+Δta2s.\displaystyle {} + \Delta t \cdot a^2 \overrightarrow{s}.

The modified right-hand side vector:

P\displaystyle \overrightarrow{P} =ΔtF\displaystyle {} = \Delta t \cdot \overrightarrow{F}+Dqn1\displaystyle {} + D \cdot \overrightarrow{q}_{n-1}+Δta2s\displaystyle {} + \Delta t \cdot a^2 \overrightarrow{s}=ΔtF\displaystyle {} = \Delta t \cdot \overrightarrow{F}+Dqn1\displaystyle {} + D \cdot \overrightarrow{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)\,\overrightarrow{1}=D1{} = D \overrightarrow{1}0{} \neq 0), so the non-stationary Neumann problem is solvable even without Dirichlet conditions.