Immersed Dirichlet BC on complicated geometry

Hi!
It is very easy to apply a no-slip BC on complicated geometry in 2D using the boolean mask.
How can I apply a dirichlet BC for velocity on the same geometry? It seems that the boolean mask does not work here.
Any suggestions?
Many thanks!