This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to constraint only one component in DG method

0 votes

I am trying to solve linear elastic equation with discontinuous galerkin method, and in that i want to restrict the displacement in only one direction. But as BCs are weakly imposed in DG method i don't know how to restrict only one component. Any help is appreciated.

asked Jan 31, 2017 by shr FEniCS Novice (160 points)

1 Answer

0 votes

A similar question was previously addressed here:

https://fenicsproject.org/qa/12184/prescribed-normal-velocity-and-tangential-traction

Basically, you want to have a boundary condition of the form:

bc0 = DirichletBC(W.sub(0).sub(1), Constant(0), somewhere)
answered Jan 31, 2017 by radbiv_kylops FEniCS Novice (680 points)

Thank you sir for your reply. But I don't think we can directly impose the boundary condition in Discontinuous Galerkin method. It is imposed weakly through integration in the weak formulation itself.

weak formulation for linear elastic equation by DG method is:
a = inner(nabla_grad(v), sigma(u))dx \
- inner(avg(sigma(v)
n), jump(u))dS \
+ inner(jump(v), avg(sigma(u)
n))dS \
- inner(sigma(v)
n, u)ds(1) \
- inner(v, sigma(u)
n)*ds(1)

L= inner(v,f)dx + inner(v,g)ds(2) - inner(u0,sigma(v)n)ds(1)

Here u0 is the initial condition. But I am unable to give it in only one direction.
So I needed the help. Thanks in advance.

...