CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   BuoyantFoam and total pressure bc problem is a bug (

ariorus January 23, 2008 05:22

Can anybody just comment this
Can anybody just comment this please?



ariorus January 27, 2008 15:22

Hello, I'm writing here a s

I'm writing here a short summary and an update of the issue.

I discovered that using totalPressure bc in buoyantFoam solver is not possible. The problem is that when pd is constructed via

volScalarField pd
p - rho*gh - pRef,

the boundaryField types are not completely copied from p: i.e. the name for U phi and gamma are set to "undefined" and so the bc is made unusable.

I have seen that this is due the a precise constructor of totalPressureFvPatchScalarField.C, so I think there must be a reason why Devolopers did so.

By the way I realized that using this bc in buoyantFoam, choosing the isentropic relation to relate p and p0, would be misleading since the bc is used for the pd field which actually is a relative pressure: the isentropic relation would be wrong in this case.

I'm not sure whether I'm right or whether I misunderstood something: any comments to sustain or deny what I said would be much appreciated.



henry January 27, 2008 15:58

The easiest way around such in
The easiest way around such initialization problems is to change the constructor to pd to a "read" constructor which would then allow you to specify all the information necessary for totalPressure and other complex BCs and then set the initial field values to p - rho*gh - pRef using an assignment statement. Also to apply a totalPressure BC to pd you will need to take into account the fact that it is pd rather than p in the formulation of the BC.


ariorus January 28, 2008 05:20

Ok. It is more or less what I
Ok. It is more or less what I did.

Thank you very much.


All times are GMT -4. The time now is 16:25.