Discrepancy in Pressure Driven Flow Behaviour in 211 vs 221, solver: rhoCentralFoam
3 Attachment(s)
Not sure if this should be posted under Bugs, but I'm hoping someone can verify/clarify an issue I'm having when transitioning from OF 211 to 221.
I spent some time investigating kOmega SST wall function behaviour over a flat plate using the rhoCentralFoam solver and pressure driven flow. I wanted to ensure that the kOmega SST wall functions would follow closely the standard loglaw for a mesh with yPlusRAS of roughly 75 in the area of interest. However, in the process of investigating this, I discovered a more fundamental issue that hopefully someone might be able to clarify. The case was set up as shown in the image below. The inlet uses totalPressure and totalTemperature boundary conditions, and the outlet is fixed pressure with all else being zeroGradient. The case was set up to approximate Ma = 0.8 subsonic, compressible flow. Attachment 25592 The mesh was created in ICEM and converted for use in OF using fluent3DMeshToFoam. Pressure driven flow was chosen to match as closely as possible the simulation setup in ANSYS, as we sought to compare results of both utilities. A number of issues came up, not least of which being that the wall shear stress calculated using the wallShearStress utility was significantly impacted by the chosen fvSchemes (mainly, the Interpolation Schemes). However, more importantly to this post, when plotting the inlet pressure/velocity distributions there is a significant difference between the versions tested of OpenFOAM, all else being equal between the cases. In version 2.2.1 inlet pressure and velocity was significantly impacted by changes to the Gamma differencing value specified in the interpolationSchemes of the fvSolution dictionary. The plots below illustrate the differences in each of the tested cases, for pressure and velocity plotted over the inlet. Summarised, in version 2.1.1 the sensitivity to changes in the gamma differencing (or vanLeer) was negligible, while for 2.2.1 the sensitivity was severe. For reference, Fluent yielded an inlet P = 101683 Pa, U = 273 m/s. OpenFOAM v2.1.1: U = 274 m/s (Gamma 1.0) U = 274 m/s (Gamma 0.5) U = 274 m/s (vanLeer) P = 101665 Pa (Gamma 1.0) P = 101589 Pa (Gamma 0.5) P = 101583 Pa (vanLeer) OpenFOAM v2.2.1: U = 316 m/s (Gamma 1.0) U = 292 m/s (Gamma 0.5) U = 292 m/s (vanLeer) P = 102845 Pa (Gamma 1.0) P = 101771 Pa (Gamma 0.5) P = 101737 Pa (vanLeer) Inlet Pressure: Attachment 25590 Inlet Velocity: Attachment 25591 As is obvious from the plots, the pressure and velocity change at the inlet is negligible in 2.1.1 but is quite drastic in 2.2.1. The totalPressure boundary condition has not changed  the only change I can find is in the rhoCentralFoam energy equation: two previously "corrective" terms have been removed (appropriately). So why is there such a sensitivity suddenly to the interpolationSchemes? v2.1.1 matches very well with Fluent, but v.2.2.1 is all over the place. Any ideas? 
I hate to dredge up old posts, but I was hoping someone may have some insight into the above issue.

Hello cdm,
have you tried to reinsert the two terms you mentioned into the solver? So one could see, if these terms are the source for the differences? I used rhoCentralFoam for validation as well. I always got better results with the vanLeer scheme compared to results with the gamma scheme. I think, the vanLeer scheme is also used in the paper, where rhoCentralFoam was presented. Regards, maHein 
Hi maHein,
Thanks for your reply. While I haven't added the two terms back into the energy equation, they should not be there anyway, so if their removal is what is causing this discrepancy, there is a worse underlying issue in rhoCentralFoam. That said, I haven't gotten into the world of compiling my own solvers nor have I had time to learn how to do so. Which version of OF did you use for your validations with rhoCentralFoam? Did you encounter any discrepancies? 

Quote:
Have you been able to check if this change corrects your initial case? Should we now assume that the latest version of OF correctly validates, for instance, in your case? Regards, caduqued 
All times are GMT 4. The time now is 01:07. 