How to get normal / tangential vectors at nodes, not at quadrature points?

33 views
Skip to first unread message

Lex Lee

unread,
Jun 4, 2020, 2:09:08 PM6/4/20
to deal.II User Group
Hello Deal.II Users,


I am working on setting a constraint: (V - v_s ) \cdot n =  \phi_f (v_f - v_s) \cdot n  on three vector variables at the interface with affine constraint class in Deal.II's library.

(Where, V, v_s, and v_f are velocity vectors on two different domains,  and they are coupled with each other at the interface; n is the normal vector; \phi_f is the volume fraction.)


I decided to constrain either V_x= -(...) / n_x  or  V_y= -(...) / n_y depending on the absolute values of n_x or n_y (n_x and n_y are the components at x, y directions of the normal vector n).

Now, I have a problem with getting the normal vectors at nodes when playing with affine constraint within the fe_nothing and hp:finite element framework. The relevant function/class I have found in Deal.II's library all return the normal vector at quadrature points, not at nodes.

Have you ever encountered a problem like this? Could you kindly share me your idea of handling this problem? Thousand of thanks. 


Best,

Lei Li


Simon Sticko

unread,
Jun 5, 2020, 7:49:56 AM6/5/20
to deal.II User Group
Hi,
I suspect that the condition you have would be easier to enforce weakly by adding terms to the weak formulation, as is done in e.g. discontinuous Galerkin.

Nevertheless, if you still want the normals at the nodes you can create a "dummy" quadrature which has the nodes on the face as quadrature points:

const FiniteElement<dim> &fe = ... // some element

const Quadrature<dim - 1> quadrature(fe.get_unit_face_support_points());

You can then use this quadrature in FEFaceValues to get the normals. Here, the weights of the dummy quadrature are inf, but if the normals are everything you need that isn't a problem.

Best,
Simon

Lex Lee

unread,
Jun 5, 2020, 12:21:46 PM6/5/20
to deal.II User Group
Brilliant! Thanks a lot. -Lei Li
Reply all
Reply to author
Forward
0 new messages