# Rotational IPC keeps diverging

**URL:** <https://fenicsproject.discourse.group/t/rotational-ipc-keeps-diverging/19522>\
**Category:** variational formulation\
**Created:** [February 20, 2026, 10:43pm UTC](https://fenicsproject.discourse.group/t/rotational-ipc-keeps-diverging/19522 "2026-02-20T22:43:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [February 21, 2026, 12:42pm UTC](https://fenicsproject.discourse.group/t/rotational-ipc-keeps-diverging/19522/2 "2026-02-21T12:42:13Z")

</div>

Your code is not really properly formatted.  
Furthermore, starting with a zero fluid flow (`unm1=0`), and without a ramping in time for the inlet:

> [@mhadidy](#):
>
> ```auto
> 
> def eval(self, values, x):
> 
> d = np.array(x, dtype=np.float64) - self.c
> 
> rvec = d - np.dot(d, self.n) * self.n
> 
> r = np.linalg.norm(rvec)
> 
> if r <= self.R:
> 
> values[:] = self.Umax * (1.0 - (r / self.R) ** 2) * self.n
> 
> else:
> 
> values[:] = 0.0
> 
> ```

you will get a pressure shock in the first time steps.  
I would suggest that you ramp up the inflow gradually (see: [Nonzero pressure Navier Stokes - #2 by dokken](https://fenicsproject.discourse.group/t/nonzero-pressure-navier-stokes/18264/2))

---

_[View the full topic](https://fenicsproject.discourse.group/t/rotational-ipc-keeps-diverging/19522)._
