# Symmetry Boundary conditions in Dolfin DG

**URL:** https://fenicsproject.discourse.group/t/symmetry-boundary-conditions-in-dolfin-dg/6100
**Category:** Uncategorized
**Created:** [June 29, 2021, 8:01am UTC](https://fenicsproject.discourse.group/t/symmetry-boundary-conditions-in-dolfin-dg/6100 "2021-06-29T08:01:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DGarciaLahuerta](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dgarcialahuerta/32/2673_2.png) [@DGarciaLahuerta](https://fenicsproject.discourse.group/u/DGarciaLahuerta)
#### Post date: [June 29, 2021, 8:01am UTC](https://fenicsproject.discourse.group/t/symmetry-boundary-conditions-in-dolfin-dg/6100/1 "2021-06-29T08:01:39Z")

</div>

Hello everyone,

I am using [dolfin-dg](https://bitbucket.org/nate-sime/dolfin_dg/src/master/) to study an euler-like problem:

\partial\_t q\_j + \nabla\_i F\_{ij}=0 \\

where:

q = (\rho, \rho u\_1 , \rho u\_2)^T

F = (\rho \vec{u}, \rho\vec{u} \otimes \vec{u} + \rho I\_{2\times 2})^T

I was solving the problem in a rectangular mesh of 30 by 15 with an inflow centered in the lower wall and outflow everywhere else:

 ![boundary_original](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/f/f87b18b28d7a39a4033a3445414edf7c9be5ceb4.png)

The inflow conditions are symmetric with respect to the x = 0 axis. I am imposing boundary conditions with:

```auto
bcs = [DGDirichletBC(ds(INLET), gD_inlet),
       DGNeumannBC(ds(OUTFLOW), g_out)]

```

Therefore my question is, is there any way I can solve the problem just in one half of the domain (say x\>0) to improve spatial resolution without increasing computation time like they do in [here](https://comphysblog.wordpress.com/2019/07/15/assuming-symmetry-with-boundary-conditions/)? The domain should look like:

 ![boundary_sym](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/1/1a8fa47b6c623dabd62366a623c586002e8a4256.png)

with the left wall beeing a symmetry plane. I think the boundary conditions there should be zero horizontal velocity and \frac{\partial \rho}{\partial y} = 0. But I am not sure of how to implement this.

Thanks.

---

<div class="post-metadata">

### Author: ![nate](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/nate/32/17_2.png) [@nate](https://fenicsproject.discourse.group/u/nate)
#### Post date: [June 29, 2021, 1:42pm UTC](https://fenicsproject.discourse.group/t/symmetry-boundary-conditions-in-dolfin-dg/6100/2 "2021-06-29T13:42:21Z")

</div>

There are a few things to consider:

- Your problem is a first order PDE, so you’ll be over prescribing boundary data with a condition like \frac{\partial \rho}{\partial y} = 0 on some boundary. The link you’ve provided isn’t applicable for your case.
- If the facets marked in red are outlet BCs, and your inlet condition is well behaved, I expect your solution to be symmetric about x = 0.
- It may still possible to prescribe \vec{u} \cdot \vec{n} = 0 on the left boundary, depending on your inlet condition.
