Mixed Dirichlet/Neumann

Asked by S Wood

Let us assume that we approximate "u", the velocity field in the Navier-Stokes equation, over a vector function space V defined by:

V = VectorFunctionSpace(mesh, ’CG’, 2)

How can I define zero Dirichlet boundary condition in the "x" direction of an edge and Neumann boundary condition in the "y" direction of the same edge?

Thanks

S

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
S Wood
Solved:
Last query:
Last reply:
Revision history for this message
Joachim Haga (jobh) said :
#1

If your mesh is aligned with the axes, I believe it should work to set Dirichlet conditions on the subspace V.sub(0), and add regular Neumann conditions to the same boundary. Otherwise, you'll need a more general linear constraint, I don't know how that would be expressed in DOLFIN.

Revision history for this message
Joachim Haga (jobh) said :
#2

Sorry, got a bit confused there. If you always want to zero the x direction, you don't care about the mesh orientation. OTOH, if you want to do the tangential direction the comment applies.

Revision history for this message
S Wood (sarah2425) said :
#3

Thanks Joachim. The subspace V.sub(0) trick solved my problem.

Revision history for this message
shriram (me-shriram) said :
#4

A couple of follow-up questions along the same lines: I wish to impose v_y =0 and no traction along x , i.e., t_x =0.
 #############
V = VectorFunctionSpace(mesh, "CG", 2)
Q = FunctionSpace(mesh, "CG", 1)
W = V*Q
v0 = Constant(0)
bc1 = DirichletBC(W.sub(0).sub(1), v0, bparts, 1 )
#####################

1. Is this a valid code to enforce the Dirichlet condition ?
2. If its a general domain where the normal direction isnt aligned with a coordinate axis, what do we do then ?