# PISO algorithm instability in Python

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 15, 2016, 03:42 PISO algorithm instability in Python #1 New Member   Robyn Povey Join Date: Mar 2016 Posts: 1 Rep Power: 0 Hi there I am trying to code the PISO algorithm in Python (I can't use a CFD package due to the editing I will do in the next step). My algorithm starts off well, begins to converge (for about 4 iterations) and then just diverges really badly. I've picked up on some possible errors for this instability, but I have no idea if they are even the errors, let alone how to solve them. I am using finite volume method and solving the velocity and pressure fields at the cell centers. 1. I used the Upwind Scheme while discretising my equations. Could this result in instability? Should I rather use the Central Difference Method? 2. My velocity solution is very dependent on the size of my step size. Could this be right or have I made a bigger error somewhere else? 3. My velocity update uses the pressure correction and the coefficient of the velocity at the point only (not all the neighbouring points). Could this result in instability? It solves perfectly for any inlet conditions (my boundary conditions are a velocity inlet and a pressure outlet with two symmetry planes) provided that the flow field is uniform. However, as soon as a solid is inserted in the middle of the domain it does not converge (or if there is any disturbance in the flow field). Additionally, when the amount of elements is increased (to above a 25 by 25 square system) the U-velocity field is no longer symmetric. Could this be a symptom of a larger problem? Any advise/suggestions would be greatly appreciated

March 15, 2016, 09:26
#2
New Member

Join Date: Mar 2014
Posts: 14
Rep Power: 11
The only point I can address is this one:

Quote:
 Originally Posted by Nduna Hi there 1. I used the Upwind Scheme while discretising my equations. Could this result in instability? Should I rather use the Central Difference Method?
The upwind scheme is more stable than the central difference scheme due to additional numerical diffusion. Using UDS instead of CDS should help preserve stability.

Good luck, and hopefully someone else with more knowledge will chime in.

 Tags instable, piso, python script, upwind finite volume