I’ve been running the code in ‘Test problem 1: Channel flow (Poiseuille flow)’ and don’t seem to be getting nice spatial convergence.
I’ve linked a graph where dx =1/2,1/4,1/8,1/16,1/32,1/64 and dt = T/num_steps = 4/40,000. This should be enough time for the flow to develop and a small enough dt so that the temporal error does not dominate the spatial error. The graph takes the error calculated from the solution at 4secs. The plot is log-log.
Is this irregularity in convergence normal in the IPCS or is it more likely an error in my code?
For poiseuille, you will hit the issue that splitting schemes usually aren’t good at approximating time-independent solutions.
Additionally, using pressure conditions to drive the flow is also frowned upon, as one really doesn’t have any strong mathematical foundation for this.
I discuss this in more detail at:
I have kept the Poiseuille flow example due to its place in the original tutorial, but leaning more and more towards removing it.