Boundary condition for an linear elastic problem

11 months ago by

Good evening every one,

I am new in Fenics and I try to solve an elastic problem.
As it is classical in solids mechanics, I would like to prescribe the displacement in one direction (say x) and force in the two others directions (say y and z) on the same boundary (prescribed normal displacement and no friction contact in a compression test for example).
I do not find in the fenics tutorial how to prescribe boundary condition for only one component of the displacement.

It is necessary to define three trial functions (Ux, Uy and Uz) for the displacement field or does it exist a command to do that ?
I apologize if the question has already been asked and I than you in avance for your answer.


Community: FEniCS Project

2 Answers

11 months ago by
Say the displacement u is in
V = VectorFunctionSpace(mesh, 'P', 1)​

Then, you prescribe the boundary condition for the first component as

bc = DirichletBC(V.sub(0), Expression(...), 'on_boundary')
11 months ago by

Thank you very much.

Please login to add an answer/comment or follow this question.

Similar posts:
Search »