!syntax description /BCs/PenaltyDirichletBC
PenaltyDirichletBC
is a NodalBC
used for enforcing Dirichlet boundary conditions
which differs from the DirichletBC
class in the way in which it handles the enforcement.
It is appropriate for partial differential equations (PDEs) in the form
\begin{equation} \begin{aligned} -\nabla^2 u &= f && \quad \in \Omega \ u &= g && \quad \in \partial \Omega_D \ \frac{\partial u}{\partial n} &= h && \quad \in \partial \Omega_N \end{aligned} \end{equation}
Instead of imposing the Dirichlet condition directly on the basis by replacing the
equations associated with those degrees of freedom (DOFs) by the auxiliary equation
PenaltyDirichletBC
is based on the variational statement:
find penalty
corresponds to
Benefits of the penatly-based approach include simplified Dirichlet boundary condition enforcement for non-Lagrange finite element bases, maintaining the symmetry (if any) of the original problem, and avoiding the need to zero out contributions from other rows in a special post-assembly step. Integrating by parts "in reverse" from [weakform], one obtains
\begin{equation} \label{weakform2} \int_{\Omega} \left( -\nabla^2 u - f \right) v ,\text{d}x +\int_{\partial \Omega_N} \left( \frac{\partial u}{\partial n} - h \right) v ,\text{d}s +\int_{\partial \Omega_D} \left[ \frac{\partial u}{\partial n} + \frac{1}{\epsilon} (u-g) \right] v ,\text{d}s = 0 \end{equation}
We therefore recover a "perturbed" version of the original problem with the flux boundary condition
\begin{equation} \frac{\partial u}{\partial n} = -\frac{1}{\epsilon} (u-g) , \in \partial \Omega_D \end{equation}
replacing the original Dirichlet boundary condition. It has been shown
[cite!juntunen2009nitsche] that in order for the solution to this perturbed
problem to converge to the solution of the original problem in the
limit as
!bibtex bibliography
!listing test/tests/bcs/penalty_dirichlet_bc/penalty_dirichlet_bc_test.i block=BCs
!syntax parameters /BCs/PenaltyDirichletBC
!syntax inputs /BCs/PenaltyDirichletBC
!syntax children /BCs/PenaltyDirichletBC