View Issue Details

IDProjectCategoryView StatusLast Update
0003457OpenFOAMBugpublic2020-02-25 20:56
Reportersjohn2 Assigned Tohenry  
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Versiondev 
Fixed in Versiondev 
Summary0003457: Error in boundary condition prghTotalPressure
DescriptionThe field varible 'p' picks up a uniform value of p0 specified in prghTotalPressure boundary condition in field p_rgh. At the inlet p_rgh is a non uniform scalar field while p is a uniform field. This leads to abnormality in the internalField.
Steps To Reproducere-run case files attached
TagsNo tags attached.



2020-02-19 20:09



2020-02-20 21:47

reporter   ~0011199

solver is reactingTwoPhaseEulerFoam


2020-02-21 12:48

manager   ~0011200

In a p_rgh solver p should have calculated BCs so that it is calculated from the current p_rgh and rho distributions. It is not clear why you the field varible 'p' picks up a uniform value of p0 if the 'p' BCs are calculated.


2020-02-21 14:56

reporter   ~0011201

Please check the boundary field 'p' after 0.01 seconds
It is picking up INLET
        type calculated;
        value uniform 514174;

instead of values based p_rgh.

On a seperate note, in the p_rgh file after 0.01 seconds, if I uncomment lines
// phi phi.liquid;
// rho thermo:rho.liquid;
in the inlet field at initial time, I found that p_rgh also picked up
   value uniform 514174; which is basically p0
at the inlet after 0.01 secs.

Note : there is not volume fractions of gas phase in the inlet


2020-02-21 15:11

manager   ~0011202

In what way are the p values not based on p_rgh?

Can you provide a patch which changes the BC how you want it to be for us to consider?


2020-02-21 15:29

reporter   ~0011203

I did not mean to say that the p values are not based on p_rgh.
Can you run the original case till 0.001 secs and check the boundary field p. They are taking a uniform value of 'p0' and please compare it with the boundary field of p_rgh at the same time.


2020-02-21 15:32

manager   ~0011204

Last edited: 2020-02-21 15:33

I am not aware of any problem in either the prghTotalPressure BC or the evaluation of p. See if you can reproduce the problem in one of the tutorial cases with uses the prghTotalPressure BC.
Alternatively can you provide a patch which corrects the problem for your case which we can study?


2020-02-21 16:25

reporter   ~0011206

I have checked all tutorials for multiphase solvers and all of them use prghPressure at the outlet, which is different from my case, so I am not sure how I can reporduce my problem from it. I will detail my problem:
I am trying to simulate phase change in a nozzle using reactingTwoPhaseEulerFoam using pressure based boundary conditions. I have used prghTotalPressure at the inlet and prghPressure at outlet and pressure based boundary conditions for the velocity field. Rest BC are standard.
I have set a total pressure p0 514174 at the inlet and 454700 at the outlet. The p BC's are set to be calculated based in internal field.
In this particular case,
As p =p_rgh - rho g x
At the inlet p = p_rgh as x=0;
IF you check the attached file in the note here:
you can find in the boundary field 0.001/p

        type calculated;
        value uniform 514174; <----- is the value of total pressure I have given in the problem.

while in the 0.001/p_rgh file we can se that

        type prghTotalPressure;
        U U.liquid;
        rho rho;
        psi none;
        gamma 1;
        p0 uniform 514174;
        value nonuniform List<scalar>

Shouldn't be p =p_rgh? and how can p have a value of total pressure when there is some value of velocity pressure in the inlet face.


2020-02-21 16:28

reporter   ~0011207

correction in this first line:
I have checked all tutorials for multiphase solvers and all of them use "prghTotalPressure" at the outlet, which is different from my case, so I am not sure how I can reporduce my problem from it.


2020-02-23 22:24

manager   ~0011209

The issue does not relate to the boundary condition prghTotalPressure but the use of pressureInletOutletVelocity for inlet velocity which was not explicitly supported for multiphase.
I have now generalised support for derived fixedValue BCs using the assignable() member function which should resolve this problem and potential problems with other derived fixedValue BCs.

Resolved by commit 5b4e84c97bf272104f432406b22fc8728d751da2


2020-02-25 20:21

reporter   ~0011211

i think this issue has been resolved, works correctly for 3D cases.


2020-02-25 20:56

manager   ~0011212

Resolved by commit 5b4e84c97bf272104f432406b22fc8728d751da2

Issue History

Date Modified Username Field Change
2020-02-19 20:08 sjohn2 New Issue
2020-02-19 20:09 sjohn2 File Added:
2020-02-20 21:47 sjohn2 Note Added: 0011199
2020-02-21 12:48 henry Note Added: 0011200
2020-02-21 14:56 sjohn2 File Added:
2020-02-21 14:56 sjohn2 Note Added: 0011201
2020-02-21 15:11 henry Note Added: 0011202
2020-02-21 15:29 sjohn2 Note Added: 0011203
2020-02-21 15:32 henry Note Added: 0011204
2020-02-21 15:33 henry Note Edited: 0011204
2020-02-21 16:25 sjohn2 File Added:
2020-02-21 16:25 sjohn2 Note Added: 0011206
2020-02-21 16:28 sjohn2 Note Added: 0011207
2020-02-23 22:24 henry Note Added: 0011209
2020-02-25 20:21 sjohn2 Note Added: 0011211
2020-02-25 20:56 henry Assigned To => henry
2020-02-25 20:56 henry Status new => resolved
2020-02-25 20:56 henry Resolution open => fixed
2020-02-25 20:56 henry Fixed in Version => dev
2020-02-25 20:56 henry Note Added: 0011212