CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   BuoyantFoam and total pressure bc problem is a bug (http://www.cfd-online.com/Forums/openfoam-bugs/62506-buoyantfoam-total-pressure-bc-problem-bug.html)

ariorus January 23, 2008 05:22

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

http://www.cfd-online.com/cgi-bin/Op...9416#POST19416

Thanks.

Rosario.

ariorus January 27, 2008 15:22

Hello, I'm writing here a s
 
Hello,

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
(
IOobject
(
"pd",
runTime.timeName(),
mesh
),
p - rho*gh - pRef,
p.boundaryField().types()
);


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.

Thanks.

Rosario.

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.

Henry

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.

Rosario.


All times are GMT -4. The time now is 02:34.