# Bad convergence of stokes problem

**URL:** <https://fenicsproject.discourse.group/t/bad-convergence-of-stokes-problem/13795>\
**Category:** Errors\
**Created:** [March 3, 2024, 12:48pm UTC](https://fenicsproject.discourse.group/t/bad-convergence-of-stokes-problem/13795 "2024-03-03T12:48:50Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [March 6, 2024, 3:42pm UTC](https://fenicsproject.discourse.group/t/bad-convergence-of-stokes-problem/13795/12 "2024-03-06T15:42:06Z")

</div>

Poisseuille flow in a pipe or annulus is typically good for a convergence check since the analytical solutions do not belong to a polynomial space.  
However, this is typically solved in a cylindrical coordinate system. See, e.g.,

> **[Hagen–Poiseuille equation | Poiseuille flow in an annular section](https://en.wikipedia.org/wiki/Hagen%E2%80%93Poiseuille_equation#Poiseuille_flow_in_an_annular_section)**
>
> If R1 is the inner cylinder radii and R2 is the outer cylinder radii, with constant applied pressure gradient between the two ends G = −dp/dx, the velocity distribution and the volume flux through the annular pipe are

and the code developed by @kamilova-maths

> [@Stokes equations from Cartesian to Cylindrical, results mismatch](https://fenicsproject.discourse.group/t/stokes-equations-from-cartesian-to-cylindrical-results-mismatch/4694/5):
>
> Turns out my maths was wrong, which is unfortunate. I have fixed it, so if anyone has a similar issue, this is the working code: from dolfin import \* import numpy as np # Define mesh and geometry - We solve for half of the domain we need, and impose symmetry mesh = RectangleMesh(Point(0, 0), Point(1, 1), 100, 100) n = FacetNormal(mesh) # Define Taylor--Hood function space W V = VectorElement("CG", triangle, 2) Q = FiniteElement("CG", triangle, 1) W = FunctionSpace(mesh, MixedElement([V, Q])) …

---

_[View the full topic](https://fenicsproject.discourse.group/t/bad-convergence-of-stokes-problem/13795)._
