# Axisymmetric Hertz Contact

**URL:** <https://fenicsproject.discourse.group/t/axisymmetric-hertz-contact/19348>\
**Category:** dolfinx\
**Created:** [January 13, 2026, 3:45pm UTC](https://fenicsproject.discourse.group/t/axisymmetric-hertz-contact/19348 "2026-01-13T15:45:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Jo\_A](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/jo_a/32/8444_2.png) [@Jo\_A](https://fenicsproject.discourse.group/u/Jo_A)\
**Post date:** [January 14, 2026, 11:13am UTC](https://fenicsproject.discourse.group/t/axisymmetric-hertz-contact/19348/2 "2026-01-14T11:13:29Z")

</div>

So here the solution.  
I had to rewrite the boundary conditions as follows:

```auto
facets_axis = mesh.locate_entities_boundary(domain, fdim, axis)
facets_bottom = mesh.locate_entities_boundary(domain, fdim, bottom)
# Locate dofs (IMPORTANT tuple syntax)
dofs_axis = fem.locate_dofs_topological(V.sub(0), fdim, facets_axis)
dofs_bottom = fem.locate_dofs_topological(V.sub(1), fdim, facets_bottom)
# Ur = 0 on axis (ID 3)
bc_axis = fem.dirichletbc(fem.Constant(domain, default_scalar_type(0.0)), dofs_axis, V.sub(0))
# Uz = 0 on bottom (ID 2)
bc_bottom = fem.dirichletbc(fem.Constant(domain,default_scalar_type(0.0)), dofs_bottom, V.sub(1))

```

meaning using the dofs and not directly the boundaries

---

_[View the full topic](https://fenicsproject.discourse.group/t/axisymmetric-hertz-contact/19348)._
