# Zero internal Neumann boundary

**URL:** <https://fenicsproject.discourse.group/t/zero-internal-neumann-boundary/7261>\
**Category:** Uncategorized\
**Created:** [December 7, 2021, 1:32pm UTC](https://fenicsproject.discourse.group/t/zero-internal-neumann-boundary/7261 "2021-12-07T13:32:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hawkspar](https://avatars.discourse-cdn.com/v4/letter/h/b487fb/32.png) [@hawkspar](https://fenicsproject.discourse.group/u/hawkspar)\
**Post date:** [October 12, 2022, 6:17pm UTC](https://fenicsproject.discourse.group/t/zero-internal-neumann-boundary/7261/4 "2022-10-12T18:17:25Z")

</div>

Hello all, I have a similar problem with dolfinx 0.5.0 and I can’t seem to apply the method above without throwing an `AssertionError`. I can’t get my form to compile.

The idea is to have 2D Navier-Stockes with a 1D wall inside the domain. I’d like the pressure to verify \partial\_yp^+=\partial\_yp^-=0 at the wall but allowing for discontinuities through, as in the picture below.

 ![p_jump](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/9/967b141272eac39e5a45ac2b715520a5f4ca8d0e.png)

The relevant part of my current code is largely taken from [dokken’s tutorial](https://jorgensd.github.io/dolfinx-tutorial/chapter3/robin_neumann_dirichlet.html) and looks like this :

```python
boundaries = [(1, lambda x: np.logical_or(top(x),outlet(x))), (2, symmetry), (3, nozzle)]

facet_indices, facet_markers = [], []
fdim = spy.mesh.topology.dim - 1
for (marker, locator) in boundaries:
	facets = dfx.mesh.locate_entities(mesh, fdim, locator)
	facet_indices.append(facets)
	facet_markers.append(np.full_like(facets, marker))
	
facet_indices = np.hstack(facet_indices).astype(np.int32)
facet_markers = np.hstack(facet_markers).astype(np.int32)
sorted_facets = np.argsort(facet_indices)

face_tag = dfx.mesh.meshtags(mesh, fdim, facet_indices[sorted_facets], facet_markers[sorted_facets])
ds = ufl.Measure("ds", domain=mesh, subdomain_data=face_tag)
n = ufl.FacetNormal(mesh)
weak=ufl.inner(p.dx(1)('+')*spy.r,s('+')*n[1])*ds(3)

```

`p` is a `DG` type element, which seemed the simplest way to allow for such sharp jumps.

I have looked around this forum but not yet managed to find anything related to this specific problem - i.e. a Neumann or no-flux condition inside the domain.

---

_[View the full topic](https://fenicsproject.discourse.group/t/zero-internal-neumann-boundary/7261)._
