I have a question regarding a peculiar boundary condition I have come across in a paper. For completeness I will state the notation relevant to my question.
\mathcal{V}_h^r and \mathbf{V}^r_h denote the r th order Lagrange finite element sub-spaces of \mathcal{H}^1(\Omega) and \mathbf{H}^1(\Omega) respectively.
Where, \mathcal{H}^k(\Omega) = \{ u + iv | u,v \in H^k(\Omega)\}
and, \mathbf{H}^k(\Omega) = [H^k(\Omega)]^3
We also have \psi^n_h \in \mathcal{V}^r_h and \mathbf{\sigma}^n_h, \mathbf{A}^n_h \in \mathbf{V}^r_h
The authors then state the variational formulation. The actual variational form is not strictly relevant but I have included the full system for completeness:
Where \stackrel{\circ}{\mathbf{V}}_h^r:=\left\{\mathbf{v}_h \in \mathbf{V}_h^r\left|\mathbf{v}_h \times \mathbf{n}\right|_{\partial \Omega}=\mathbf{0}\right\} and \boldsymbol{\sigma}_h^n \times\left.\mathbf{n}\right|_{\partial \Omega}=\Pi_h \mathbf{H}_e^n \times \mathbf{n}.
My question is what type of boundary condition is this? How can one potentially implement such a boundary condition? I have no problem writing the equations out in UFL but I am struggling to find a way to enforce these boundary conditions. I am very new to FEM so I am still getting used to the notation. Any help would be greatly appreciated.
In a very general sense, it is some sort of Dirichlet condition in that it prescribes the values of the fields themselves. More commonly, one would prescribe either the normal component of the vector (\boldsymbol{v}\cdot\boldsymbol{n} = v_1n_1+v_2n_2 = 0), or the tangential component (...). \boldsymbol{v}\times\boldsymbol{n} might look a bit more complex, but I guess it is fundamentally the same concept.
Because, in the end, it is simply a contraint in the form of a weighted combination of components of \boldsymbol{v}, weighted by components of \boldsymbol{n} (just like \boldsymbol{v}\cdot\boldsymbol{n} is). That means it is a ‘multi-point constraint’, and you would likely need dolfinx_mpc to get this done (see Stokes flow with slip conditions — DOLFINx-MPC: An extension to DOLFINx for multi point constraints)
(( In 2D, with only horizontal and vertical boundaries, the BC equation would simplify, and you could simply use the built-in Dirichletcontraint, but in your problem formulation you indicate it is 3D, so that is probably not relevant. ))
Thanks for the reply @Stein. I feared it might involve dolfinx_mpc. I have spent some time trying to read and understand dolfinx_mpc but I am a bit lost. Is it possible to use weak imposition of the boundary condition in this case?
One thing in particular that confuses me about dolfinx_mpc when applied in this context is setting the masters and slaves dofs.
slaves – List of all slave dofs (using local dof numbering) on this process
masters – List of all master dofs (using global dof numbering) on this process
coeffs – The coefficients corresponding to each master.
owners – The process each master is owned by.
offsets – Array indicating the location in the masters array for the i-th slave in the slaves arrays, i.e
How would I use this to apply the \mathbf{\sigma}^n_h \times n = \Pi_h \mathbf{H}^n_e\times n? \mathbf{H}^n_h is a fem.Function so how would one obtain the master and slave dofs in this situation?
I have not used MPC for anything other than periodic BCs myself, so I’ll let @dokken comment on that.
Regarding your question on weak enforcement; it doesn’t look like those terms show up as natural boundary conditions. So then weak enforcement would require something like Nitsche’s method. You could look into that, but those formulations typically introduce more mathematical complexity, and I’d say your weak form is complex enough as is…
In general, it looks like this is quite a challenging and involved problem for someone uninitiated on FEM. I’d recommend building this up much more slowly. E.g., start off with something like a vector-Poisson equation with similar BCs and try to get that running. Then add the complexity of mixed (=multiple) spaces, then using the curl operator and complex spaces, and then time-stepping.