Hi Wolfgang, thanks for a swift reply.
and apologies, I wasn't very clear.
when I'm imposing dirichlet conditions everywhere, i don't have a condition
for pressure (those were two separate test cases - sorry i was unclear).
and i'm using:
VectorTools::interpolate_boundary_values (dof_handler,
0,
BoundaryValues<dim>(),
constraints,
fe.component_mask(velocities));
where the boundary values are just 1.0 so that u is a constant vector field.
this still gives me the bizarre 22 factor in my pressures solution (which
is just linear in z - the resulting pressure solution is atleast linear),
but the pressure solution aside, both the x and y components of the
velocity are 0.0 ON the boundaries and 1.0 everywhere else.
Yup sorry that was a mistake on my part - my real problem has total stress
conditions so I naively just related it to pressure which isn't correct.
would appreciate any help with why my interpolating boundary values aren't
quite working.
Thanks again
On Wednesday, February 1, 2017 at 1:11:12 PM UTC, Wolfgang Bangerth wrote:
>
>
> > I'm trying to solve a stokes system with some funny boundary conditions
> > so I've stripped the code to make sure I was getting the correct answers
> > to a very simple system as follows:
> > governing equations are:
> > div grad u + grad p = f
> > div u = 0
> > i'm setting u=0 on the boundaries, giving u=0 (or close enough)
> everywhere.
> > setting f = -(0,1), i should get a linear profile with pressure
> > increasing with depth at the same rate going downwards.
>
> Yes. But if you impose Dirichlet boundary values for the velocity all
> around the boundary, then the pressure is only determined up to a
> constant, i.e., the pressure should be a linear function but the offset
> is not determined by the equation.
>
>
> > I'm clearly not understanding how to use
> > VectorTools::interpolate_boundary_values correctly, and I would
> > appreciate some clarification on it.
> >
> > I'm imposing a zero pressure at the top of my rectangle with height of
> > 10, which means I should get 10 at the bottom for pressure.
>
> You can't do that. If you have Dirichlet boundary conditions for the
> velocity, then you can't impose anything on the pressure. In fact, for
> the incompressible Stokes equations, you can never impose any pressure
> boundary conditions.
>
> There is a description of boundary conditions for the Stokes equations
> in the introduction of step-22. Take a look there to see what you can
> and cannot impose for the Stokes equations.
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> <javascript:>
> www: http://www.math.colostate.edu/~bangerth/
>
--
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].
For more options, visit https://groups.google.com/d/optout.