> On Jul 30, 2016, at 9:10 AM, [email protected] wrote:
> 
> Dear developer,
> 
> For solving a Navier-Stokes equation by a P2P1 FEM, I want to impose specific 
> pressure values on the outflow boundary condition.
> The following treatment may cause error since the degrees of freedom of 
> pressure is that using first order, which is smaller than the second order 
> DOF for velocity.  Can I loop over only vertices of an element so that the P1 
> DOFs are accessed?  Using elem->n_vertices() rather than
> elem->n_nodes()? Thank you!
> 
> 
> 
>        for (unsigned int s=0; s<elem->n_sides(); s++)
>          if (elem->neighbor(s) == NULL)
>            {
>              AutoPtr<Elem> side (elem->build_side(s));
>              for (unsigned int ns=0; ns<side->n_nodes(); ns++)
>                {
>                     ... ...
>                  for (unsigned int n=0; n<elem->n_nodes(); n++)
>                    if (elem->node(n) == side->node(ns))
>                      {
>                                Kpp(n,n) += penalty;
>                      }
>                } // end face node loop
>            } // end if (elem->neighbor(side) == NULL)
> 


You can probably do this in libmesh but I don't think it's well-posed unless 
you are solving an alternate "split" formulation of the NS equations which 
involves a pressure-Poisson equation.  See also the paper by Gresho & Sani on 
this topic.
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to