How to enforce a radial displacement Dirichlet boundary condition

I would like to enforce a zero radial displacement boundary condition (Dirichlet) in an elasticity problem using DOLFINx. More generally this is a problem of enforcing a boundary condition on a linear combination of components of a vector valued function.

What is the most straightforward way of doing this?

DOLFINx_MPC offers functionality for this:

See for instance:

that enforces \mathbf{u}\cdot \mathbf{n}=0 on two of the boundaries.

2 Likes