[firedrake] Enforcing slip boundary condition strongly

Justin Chang jychang48 at gmail.com
Mon Jul 13 12:51:25 BST 2015


Thanks y'all for getting to this.

Yes my question was indeed about setting one component of a
VectorFunctionSpace to a Dirichlet BC.

Have the bc-components branches been merged with master? If not, how do I
manually switch into those branches via git?

Thanks,
Justin

On Fri, Jul 10, 2015 at 11:01 AM, Lawrence Mitchell <
lawrence.mitchell at imperial.ac.uk> wrote:

> Hi Justin,
>
> > On 9 Jul 2015, at 21:28, Justin Chang <jychang48 at gmail.com> wrote:
> >
> > Hi everyone,
> >
> > I am solving a mixed poisson (aka: Darcy) problem using the VMS
> formalism (Masud and Hughes, CMAME, 2002) which enables one to use equal
> order lagrangian interpolation. In this formulation, the flux/velocity is
> prescribed strongly and the pressure is prescribed weakly, like how it's
> done with RT0 elements.
> >
> > The main difference is that velocity is now a VectorFunctionSpace as
> opposed to a FunctionSpace. My question is, how would I implement the flux
> boundary condition in a Dirichlet sense? Say I am working with a unit
> square for now. I want to enforce v_x = some value(s) for x=0/x=1, and v_y
> - some values(s) for y = 0/y = 1. How would this be done in Firedrake?
>
>
> I /believe/ the combination of the two branches in PyOP2 and Firedrake
> described below will do what you want.
>
> PyOP2, branch bc-components (pull request
> https://github.com/OP2/PyOP2/pull/450)
>
> Firedrake, branch bc-components (pull request
> https://github.com/firedrakeproject/firedrake/pull/551)
>
> With these, you can do:
>
> V = VectorFunctionSpace(mesh, "CG", 1)
> P = VectorFunctionSpace(mesh, "CG", 1)
>
> W = V*P
>
> # boundary condition for x-component of velocity space.
> bcvx = DirichletBC(W.sub(0).sub(0), scalar_value, boundary_ids)
> # and for y-component
> bcvy = DirichletBC(W.sub(0).sub(1), scalar_value, boundary_ids)
>
> solve(..., bcs=[bcvx, bcvy])
>
> You can either try using those branches directly or else wait until
> they're merged and update to a newer master.  But if you try them and find
> problems, please do update the pull requests with comments.
>
> Cheers,
>
> Lawrence
>
> _______________________________________________
> firedrake mailing list
> firedrake at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the firedrake mailing list