- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Pressure correction problem**
(*https://www.cfd-online.com/Forums/openfoam-solving/58404-pressure-correction-problem.html*)

Hi,
at present I'm try to deHi,
at present I'm try to develop a pressure based algorithm for compressible fluid flow. Following the state of the art for this kind of algorithm, I formulate pressure equation in term of pressure correction equation. Thus I add a convective transport term in pressure correction equation to take in account density correction at high Mach flow. Well I've several problems with boundary condition for pressure correction. For example for subsonic flow in 2D tube with inlet velocity boundary and outlet pressure boundary what kind of boundary I have to impose? I try zero gradient for pressure correction at inlet and fixed value for pressure correction at outlet but it doesn't work. For very low Mach value the algorithm works properly. Please help me! Best regards Richard Larson |

This is textbook stuff: you prThis is textbook stuff: you problem is that the correct definition of the boundary conditions changes with the Mach number.
Basics first: 1) The boundary condition on the pressure equation is the same as on the pressure, but the value of pressure correction on the fixedValue boundary is zero 2) Altogether, you have 3 boundary conditions to specify: rho (call it p), U and T 3) The method of characteristics tells you how to do it. On each boundary, figure out how many characteristics point into the domain - this is how many b.c.-s you are allowed to specify. In short: supersonic inlet: 3 characteristics pointing inwards supersonic outlet: 0 characteristics going in subsonic inlet: 2 going in subsonic outlet 1 going in Thus: supersonic inlet + supersonic outlet: specify everything at the inlet subsonic inlet + supersonic outlet: not allowed (not enough b.c. can be given) supersonic inlet + subsonic outlet: not allowed (over-specified) subsonic inlet + subsonic outlet: specify U and T at the inlet and p at the outlet For you, it seems that subsonic in + subsonic out works (good); for supersonic flow throughout, specify everything at the inlet. (Can I have a piccie of the solution as a reward?) :-) Enjoy, Hrv |

Thanks for the answer.
I agThanks for the answer.
I agree with you, I've formulated only pressure correction equation: p(N) = p(N-1) + pcoor fvm::laplacian(srho*srUA, pcorr) - fvm::div(phiD,pcorr) == fvc::div(phi) where fvm::laplacian(srho*srUA, pcorr) is the same as in incompressible formulation, "phiD" is the flux "U*psi", where "U" is the velocity, "psi" is the compressibility [s^2/m^2] and "phi" is the mass flux. I'm not sure if Mach = 1 is the borderline condition for the characteristics of this equation. Can you tell me somethig about it?! Best regards Richard Larson |

'm not sure if Mach = 1 is theQuote:
Hrv |

The doubt raises since that thThe doubt raises since that the pressure correction is a "quasi-physical" quantity... I'm sorry.
Thus, what kind of boundary conditions for pressure correction do you suggest me?!? I try zero-gradient at inlet velocity patch and fixedvalue 0.0 at outlet pressure. It works only for very low mach number 0.005 while for mach number 0.1 and up the calculation fails. I think that this type of boundary conditions for pressure correction are right only if the convetive term in pressure correction equation become much smaller than diffusive term. I've no idea which is the solution at the problem. The test case is a 2D duct with inlet velocity, pressure outlet and no slip wall and a inlet temperature of 300K. I really need help Best regards RL |

Being learner throught readingBeing learner throught reading, and not an expert in presure not in numerics, thinking at a physical level I think you are using wrong conditions.
In an incompresible flow with one inlet and one outlet, if the velocity is fixed in the inlet, the flow and therefore the presure drop gets mainly defined. Perhaps with the exception of the neighborhood of the oulet. Especifiying a zero gradient condition at outlet may be an apropiate way to have realistic fields in the mentioned neighborhood. But still presure is undetermined (only presure drop gets determined) so it seems reasonable to eliminate that undetermination througt a boundary condition at the inlet that specifies presure as a constant. So I think you have to exchaNge your presure boundary conditions at inlet and outlet. Javier Ros |

Just I've rereaded my post, anJust I've rereaded my post, and I don't agree with myself.
Consider my sugestion as a different posibility. With the same reasoning it seems that the BCs that you are using are apropiate (not wrong as I have said). Javier Ros |

Thank you very much Javier andThank you very much Javier and Hrv, for your suggestions.
Perhaps the problem are not boundary conditions, but it could be the flux "phiD" in the convective term of the pressure correction equation. It has the form of Ma^2/U. It isn't a mass flux and then is not conservative, maybe this can leads problems?!? What do you think about it?!? RL |

Hi, Richard,
Did you figure oHi, Richard,
Did you figure out what is wrong with your problem? I have a similar problem. Please advise if you have a solution for this problem. Regards, iL |

All times are GMT -4. The time now is 19:57. |