- **Phoenics**
(*http://www.cfd-online.com/Forums/phoenics/*)

- - **On P' equation
**
(*http://www.cfd-online.com/Forums/phoenics/51222-p-equation.html*)

On P' equation
Hi All,
Recently I underwent a training on Phoenics software( till now I have been writing my own codes). I noticed that convergence of P' equation is good. Can anyone tell me (possibly the developers) what algorithm is used.(I use ADI for P'equn but convergence isn't as good as Phoenics.) Also what boundary condition is used for P' on an exit boundary ? Thanks Abhijit Tilak |

Re: On P' equation
Dear Abhijit Tilak
Yes, the convergence of a solution is related to the solver you use, but, in my oppinion, it is mostly related to how you use this solver. Anyway, I will try to give you an idea about what PHOENICS does with "p" eq. I have to tell you (estrictly speaking) that I am not a PHOENICS' developer, but I will try to do my best. PHOENICS uses SIMPLEST method, which is a variation of SIMPLE. The method was developed by Professor B. Spalding, after his contribution to SIMPLE with Professor Patankar. With SIMPLEST you take explicitly the convective contribution and implicitly the diffusive term (in every iteration), so you accelerate the convergence with respect the original SIMPLE. You can find a lot of information about those methods (SIMPLE related family) almost everywhere. For outlet/inlet BC PHOENICS works with pressure. If you are sure that you have an outgoing flow, in PHOENICS you can fix the mass flux thought the boundary (via pressure BC) or outlet velocity (by using velocity BC). Otherwise, if you have "open" BC you can fix a reference value for pressure over your BC. Depending on its calculated value for a given boundary cell and the reference value fixed by the BC, there is outgoing or incoming flow. It is a very short (maybe useless) explanation. You can see into the PHOENICS manuals that this topic takes several pages, so it is not trivial. I think that BCs are important points in every course of CFD, so I am sure you can ask your PHOENICS professor for a detailed info. Regards Kike |

Re: On P' equation
Dear Kike ,
Thanks for your mail. Well I don't really think specifying mass flux at exit is a good option. You may have one inlet & mulitple outlets,in that case u don't know what mass-flux to specify on which outlet.Currently, in my code I assume (??) that i have sufficient length of domain for flow to devlop & give dp'/dx_i=0 & same for P on all boundaries.(what ever they are ) although u can in principle evaluate div.(grad P) for boundary cells from momentum equations & then specify dp'dx_i & dp/dx_i. Let me know what do you think. Regards Abhijit Tilak |

Re: On P' equation
Hi, Abhijit Tilak
Of course, in the case you mention (one inlet BC - several outlet BC) to specify mass flux is worst than a "bad option", it is wrong. In your first message you have asked about "an exit boundary" and I have mentioned you (very shortly) what are the options you have in PHOENICS. Now you are talking about "open" or "free" BC, ie. BCs where there are outgoing and/or incoming flow. So, you are more specific this time and I can answer you in a more detailed way; although I don't know exactly what should I talk about: your outlets BCs, PHOENICS' outlet BCs or general methods for outlets BCs. If you let the flow depelop through your calculation domain you are wasting time and resources. You don't need to extend the length of your domain to impose an outlet BC. Here I send you two papers in which you will find a long discussion about this topic and good proposals for outlet BCs. (a) "Résumé and remarks on the open boundary condition minisymposium" Sani and Gresho, Int. Jour. for Num. Meth. in Fluids, Vol 18, 983-1008 (1994) (b) "Effective downstream boundary conditions for incompressible Navier-Stokes equations" Bruneau and Fabrie, Int. Jour. for Num. Meth. in Fluids, Vol. 19, 693-705, (1994) This kind of BC is, in my oppinion, the most difficult to impose. Nevertheless, the procedure you have into PHOENICS works and it works very well. Almost all the problems I had solved with PHOENICS had boundaries like this. If you want to use PHOENICS we can talk about its implementation, otherwise, I think those papers will help you as they had helped me once. Btw, you can add any BCs to any calculated variable into PHOENICS. Regards Kike |

Re: On P' equation
Dear Kike,
Thanks for the reply, more so for the references. you know I am much more interested in the references than phoenics (??? ). I will look in to those. BTW I just found out that Phoenics uses Modified Strongly Implicit Procedure (MSIP) for P' equation (by Schnider & Zedan ). This was originally known as Stone's Algorithm. Thanks & Best Regards Abhijit |

Re: On P' equation
Dear Abhijit Tilak
Please, let me know the reference in which you had found that PHOENICS uses MSIP. Thanks a lot in advance. Kike |

Re: On P' equation
In PHOENICS, the default solver for p' is indeed a modified form of the Stones solver. However, the convergence can be slow and/or erratic for some applications. Therefore, the option exists to use the Conjugate Gradient Residuals (CGR) solver for p', and for that matter any other equation. This option increases the runtime per sweep, but generally less sweeps are needed for convergence, or one gets convergence whereas one could not before. There was a paper in the PHOENICS Journal some years ago by Slava Semin & Igor Poliakov which exemplified this solver and its variants by comparison with the default PHOENICS solver.
As Kike has discussed, the pressure-velocity coupling plays a more important role and in PHOENICS the SIMPLEST method is used. At entrainment boundaries where flow may enter or leave PHOENICS computes the mass flow rate m crossing the boundary cell from: m = Cm*T*(Pext - P) where T is the type (say area), Cm is the resistance coefficient, P is the in-cell pressure, and Pext is the prescribed external pressure. The user selects Cm and Pext according to his requirements. The p' equation will require terms including dm/dP and the source/sink m. The foregoing formula is a very powerful formula allowing great flexibility, as the correct choice of Cm and Pext allows it to also handle fixed-inflow and fixed-outflow boundaries. |

Re: On P' equation
Dear Mike,
Thanks for your explaination. I still have one question, say for example i I am solving a 2d laminar flow between parallel plates & I don't know what external pressure is, what do you put Pext then? although in principle I can compute mass influx on inlet boundaries & force mass conservation at exit (not a good choice always), How do you then choose Cm & Pext. ( this question is not about Phoenics but in general about Open boundaries treatment! Say, I want to implement the formula in my own code:) ) Thanks Abhijit |

Re: On P' equation
The coefficient-value method embodied in PHOENICS for handling pressure and mass-flow boundaries is for general application, and could be implemented in other CFD codes.
I cannot comment about methods employed in other codes, but as Kike has remarked, the PHOENICS method can certainly handle open boundaries very well. How to choose Cm and Pext? This depends on the application, and sometimes it can be a bit of a black art requiring engineering knowledge, insight and on occasion, invention. The Cm-Pext method is very flexible because Cm and Pext have the option to vary with position in the PHOENICS implementation. Note that a large value of Cm sets the in-cell pressure to the external pressure Pext, i.e. very little flow resistance, and a small value of Cm implies significant flow resistance at the boundary. Either the mass flow rate or Pext is usually known, and for the latter, guidelines for estimating Cm can be found in the on-line documentation at: http://www.cham.co.uk/phoenics/d_polis/d_enc/coval.htm For Poseuille flow, Pext can be taken as zero and Cm set to pass the require mass flow rate, say 1E3. If we have compressible flow in the channel and the external pressure is not known, then the problem is not uniquely defined. Then you must extend the solution domain downstream to a position where the pressure is known, or estimate the pressure by the application of some engineering knowledge. If you cannot specify a downstream boundary condition, then you cannot make a simulation, unless of course when the flow is parabolic or hyperbolic and the CFD can truly operate in these modes. I think you need to implement the method and try it, or run PHOENICS and experiment with the method if you still have access to the code. |

Re: On P' equation
Dear Mike ,
Thanks for your answer. Well I tried the Coval approach in flow in parallel plates. It works excellent.By the way I have coded SIMPLE for unstructured grids (currently triangles & quads). I am currently solving a "Flow in a sharp 90-degree bend", basically a "Dirty Problem " & acid test of my code. My L/D ratio for outlet section is 5.0. I am using Gauss Siedel. What values of Cm & Pext you suggest?. Just Last question Mike ! I won't need help any further. Thanks & Best Regards Abhijit Tilak Aero Engg Dept IIT Bombay India. |

Re: On P' equation
Presumably the flow is incompressible.
The outlet boundary should be located far enough downstream of the bend for a uniform pressure distribution to applied across the exit. Advice on setting Cm and Vm is given at: http://www.cham.co.uk/phoenics/d_polis/d_enc/coval.htm As a start, try setting set Cm=1.e3 and Vm=0.0. |

All times are GMT -4. The time now is 13:14. |