The step-22 code uses the stress form of the NS equations. If you use the form
-mu*Laplace(u) + grad(p) = 0
and use the same dirichlet+neumann bc, then it seems to give the correct
solution. Please check it.
These are the lines to be changed
std::vector<Tensor<2, dim>> symgrad_phi_u(dofs_per_cell);
symgrad_phi_u[k] =
fe_values[velocities].gradient(k, q);
local_matrix(i, j) +=
(scalar_product(symgrad_phi_u[i], symgrad_phi_u[j]) // (1)
- div_phi_u[i] * phi_p[j] // (2)
- phi_p[i] * div_phi_u[j]) // (3)
* fe_values.JxW(q); // * dx
Best
praveen
> On 18-Apr-2020, at 10:55 PM, Patrick Eastham <[email protected]>
> wrote:
>
> Praveen,
>
> Thanks for the suggestion on adding tolerance to assigning boundary
> conditions -- that could come back to bite me in the future.
>
> I also appreciate your other suggestions, although I'd like to get this
> working without those conditions. I know that the FEM problem of assigning
> dirichlet velocity BC on 3 inflow and walls, and neumann conditions on the
> outflow is well-posed and leads to the exact solution (as the exact velocity
> is quadratic and exact pressure is linear, just like my element family) as
> I've done this same problem in a different FEM code.
>
> It seems like the cell at the intersection of the dirichlet and neumann
> conditions is not being handled correctly based on how I have assigned
> constraints/boundary conditions. Has anyone else had any experience with this?
>
> Best,
> Patrick
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/6FFA86D0-8241-4E8B-82B6-C6AFBAB159E2%40gmail.com.