this is my first post, I hope it’s in the right category. I’m using the level-set method to describe a moving interface between a liquid and a solid. In each phase I’m solving different PDE’s. I want to use unfitted finite element methods on a triangular/tetrahedral mesh and on the liquid side of the interface I want to impose a Dirichlet condition weakly.
I’ve briefly looked into different methods of how this can be achieved, e.g. with Nitsche’s method and XFEM using Heaviside enriched basis functions in elements that are intersected by the interface [1]. Before looking deeper into these methods my question is: Is it (more or less straightforwardly) possible to implement such an XFEM approach with weakly imposed Dirichlet conditions in FEniCSx?
XFEM is really difficult to implement in FEniCSx in a straightforward fashion. To complement @francesco-ballarin answer, you should look at references regarding CutFEM methods. There is an old CutFEM library with legacy FEniCS, probably here Bitbucket
My library is only for allowing the use of the special element-wise quadrature, for example to enforce the weak Dirichlet conditions you mention. For boundary value problems, not much more is needed. For your interface problems, you need to double the dofs on the elements containing the interface. This is a bit non-standard and not (yet) covered in my library. It was covered using the MultiMesh framework in the old FEniCS though, and it should be very possible to port the key parts of this to FEniCSx.