How to set Dirichilet bc on a 2 components variable?

Asked by Qian Han

Hello!
When there is a displacement field u to be solved.
Dim of domain and u is 2d, that is to say, u = {ux uy}
If I want to set the uy on the bottom of the domain to zero.
uy = 0 but dof of ux is free.
May I use the command as followed?

Suppose that coordinate y of bottom is 0.
x = mydomain.getX()
bcs = Vector(value = 0, what = x.getFunctionSpace())
mask = whereZero(x[1])*[0, 1]
pde.setValue(r = bcs, q = mask)

Am I right? Does the rank-2 data bcs really indicate that uy is fixed?

Thank you!

Qian Han

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Ellery
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Ellery (aellery) said :
#1

Hi Qian,

You have set up the boundary conditions correctly. When you solve the PDE, escript will enforce a homogeneous Dirichlet boundary condition at the bottom of the domain (i.e. at y=0).

- Adam

Revision history for this message
Qian Han (hanqian) said :
#2

Thanks Adam Ellery, that solved my question.