CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   rasInterFoam appears to give erroneous results for “pd”. (https://www.cfd-online.com/Forums/openfoam-bugs/62668-rasinterfoam-appears-give-erroneous-results-pd.html)

richard_kenny March 16, 2009 23:20

rasInterFoam appears to give erroneous results for “pd”.
 
rasInterFoam appears to give erroneous results for “pd”.

I am relatively new to CFD and have recently begun experimenting with OpenFOAM. I have no C++ programming experience. I am reluctant to say there is an error in OpenFoam and therefore use the term apparent error.

I am a civil engineer with a government department and I have attempted to use rasInterFoam to analyse dam spillway flows. Specifically, I am interested in the static pressures over the spillway crest. My intention is to manually calculate the static pressures at specific locations. I intend to calculate the static pressure as the total pressure, “p”, minus the dynamic pressure, “pd”. However, I note that the “pd” results are much greater than I expected. I found a similar phenomenon occurred in other OpenFoam models developed by external engineering consultants.

To confirm my suspicions I have analysed a static water column. The velocities are practically zero, however the “pd” values are relatively high. This phenomenon can also be seen in the dambreak tutorial case. If the dambreak simulation is run for a long time the velocities reduce to very small values (i.e. practically zero). Therefore, the “pd” should be practically zero. However, the “pd” on the floor of the domain is about 760 Pa. Whilst the dambreak tutorial is only an example, it illustrates the apparent discrepancy in the “pd” values. This apparent discrepancy becomes much more significant for dam spillways if one attempts to manually calculate the static pressure from the total and dynamic pressures.

The following four points summarise my understanding of the "p" and "pd" fields (based on my reading of the message board, OpenFOAM manuals and the rasInterFoam.C file).
1) "p" is the total pressure in Pascals [1 -1 -2 0 0 0]
2) p = pd + rho*gh (from rasInterFoam.C file)
3) rho*gh = static pressure in Pascals [1 -1 -2 0 0 0]
4) "pd" = dynamic pressure in Pascals [1 -1 -2 0 0 0] = 0.5*rho*U^2

Can someone please confirm whether this apparent discrepancy with the "pd" results is an error in OpenFoam? Any assistance or advice provided would be greatly appreciated.

Regards,
Richard Kenny

henry March 17, 2009 04:02

2) p = pd + rho*gh (from rasInterFoam.C file)

This defines pd.

4) "pd" = dynamic pressure in Pascals [1 -1 -2 0 0 0] = 0.5*rho*U^2

This has nothing to do with the above definition of pd. Note that pd is a variable constructed for numerical advantage not by physical reasoning and only has useful physical meaning for the case of uniform density where it is the pressure less the hydrostatic pressure.

If you are interested in the dynamic pressure construct it from 0.5*rho*U^2. If you are interested in the static pressure it is available from pd + rho*gh.

H


H

richard_kenny March 31, 2009 04:48

Henry,

Thanks for taking the time to respond to my post. I am a civil engineer and therefore wish to use CFD for practical applications. Unfortunately, I do not have an in-depth background in CFD theory and have no C++ programming skills. Therefore, I sometimes struggle to understand the details of OpenFoam. I apologise if my questions are very basic but I do appreciate your time and patience. I was hoping you could elaborate on your previous explanation about rasInterFoam pressures.

1) You mentioned that the following equation defines pd:
(p = pd + rho*gh) (from the rasInterFoam.C file)
Could you please explain your comment in more detail? For example, it appears to me as though the field values for total pressure (p) are set equal to the sum of dynamic pressure (pd) plus static pressure (rho*gh). How does the above equation define “pd”?

2) Does OpenFoam calculate the total pressure (p) as the dynamic pressure (pd) plus the static pressure (rho*gh)?

3) You mentioned that “pd” is constructed for numerical advantage. How is “pd” calculated. That is, what fields/formula are used?

4) You mentioned that “pd” has useful physical meaning for the case of uniform density where it is the pressure less the hydrostatic pressure.

I would expect the water density to remain constant for the rasInterFoam solver for free surface, two phase (water and air) flow (eg. the dambreak tutorial). Does “pd” have useful physical meaning in such a case? If so, why are the “pd” values so high for the dambreak tutorial?

5) What do you mean when you say that the static pressure is available from (pd + rho*gh)? Do you mean that I can calculate the static pressure as (p – (0.5*rho*U^2)), where (p = pd + rho*gh)?

Thanks in advance,
Richard Kenny

lin March 31, 2009 11:41

Hi,I try to give some explanation.

p = pd + rho*gh.This one seems to be hard to comprehend.Try this one:

pd = p - rho*gh.Though it's the same,this is the definition of pd.As Herry said,This has nothing to do with the definition of dynamic pressure.

prapanj August 14, 2009 04:01

Hi,

this is my understanding now. See if it makes sense.

Total Pressure P0 = P (static press) + 0.5*rho*U^2 (dynamic) + rho*g*h

Some one please put in the pd definition here :)

Thanks
Prapanj.

jploz August 16, 2009 11:14

The pressure pd is a 'modified' pressure and is not the dynamical pressure. The definition reads: p = pd + rho*gh (from rasInterFoam.C file) as already stated in this thread. The reason for using pd is numerical efficiency.

Regards.

musahossein August 2, 2013 18:12

dynamic and static pressure
 
Quote:

Originally Posted by henry (Post 209709)
2) p = pd + rho*gh (from rasInterFoam.C file)

This defines pd.

4) "pd" = dynamic pressure in Pascals [1 -1 -2 0 0 0] = 0.5*rho*U^2

This has nothing to do with the above definition of pd. Note that pd is a variable constructed for numerical advantage not by physical reasoning and only has useful physical meaning for the case of uniform density where it is the pressure less the hydrostatic pressure.

If you are interested in the dynamic pressure construct it from 0.5*rho*U^2. If you are interested in the static pressure it is available from pd + rho*gh.

H


H

Hi Henry: So based on what you are saying above, there is no way that one can obtain the dynamic pressure from the above equation. The only way to obtain the dynamic pressure is to use read the velocity field and then construct it using 0.5*rho*u^2. I am running sloshingtank2d. The wall pressure I get is indicated as "p" in the output files. So this "p" is the p=pd+rho*gh? A clarification would be greatly appreciated. Thanks!!


All times are GMT -4. The time now is 22:36.