CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Wrong calculation of hydrostatic pressure (InterFoam)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2017, 07:47
Default Wrong calculation of hydrostatic pressure (InterFoam)
  #1
New Member
 
Lorena Fernández Fernández
Join Date: May 2016
Location: Spain
Posts: 21
Rep Power: 9
Lorena2fdez is on a distinguished road
Hi foamers!

Currently, we are working on rivulets. In our case we have an uniform distribution of liquid on a inclined plane. It doesn't matter if you are on the top or on the bottom of the inclined plane, the rho*g*h distribution must be almost the same (only depends on the liquid above), because liquid height is the same.

HydrostaticPressure ({\bf x}) = \int_L \rho(h) g \, dh

Where L is the line between ({\bf x} \cdot {\bf g}/g) and {\bf x_0} \cdot {\bf g}/g.

Currently, openFoam simplify the problem, It is assumed than \rho doesn't depend on h. And we get:

HydrostaticPressure ({\bf x}) = hg\, \rho({\bf x}) + P_{ref}

where hg ={\bf x} \cdot {\bf g}-{\bf x}_0 \cdot {\bf g}.

In the attached image you can see four points. On OpenFoam the hydrostatic pressure is calculated:

HydrostaticPressure ({\bf x_1}) = h_1 g\, \rho_{air} + P_{ref}
HydrostaticPressure ({\bf x_2}) = h_2 g\, \rho_{water} + P_{ref}
HydrostaticPressure ({\bf x_3}) = h_3 g\, \rho_{water} + P_{ref}
HydrostaticPressure ({\bf x_4}) = h_4 g\, \rho_{water} + P_{ref}

If my {\bf x}_0 is on the interface, (1) and (4) are well calculated. If {\bf x}_0 is on the top, (4) is wrong. No matter what {\bf x}_0 I selected, (2) and (3) have the same hydrostatic pressure (in OpenFoam), and that is not true.

Does anyone know how to fix this problem?

Greetings,
Lorena
Attached Images
File Type: png sketch_pressure.png (29.2 KB, 54 views)
Lorena2fdez is offline   Reply With Quote

Old   October 17, 2017, 00:42
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Well, “works for me”...

Joking aside: this must work because if it did not my ships would not float.

Are you sure you are looking at the right thing?
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 17, 2017, 03:33
Default
  #3
New Member
 
Lorena Fernández Fernández
Join Date: May 2016
Location: Spain
Posts: 21
Rep Power: 9
Lorena2fdez is on a distinguished road
Hi Jasak,

I have taken a second view at the code.

The wrong calculation is for p as it is assume that p=p_rhg-rhg where is rgh is a wrong aproximation (for my case) of the hydrostatic pressure. However, p is not used on the calculation. It is p_rhg, and this is correct evalueated. My fear was that the wrong value of p could affect the simulation.

On the attached image you can see rho*g*h where rho*g*h = p-p_rgh.
In our case (an uniform distribution of liquid on a inclined plane), if rho*g*h must be the hydrostatic pressure, the estimation is wrong.

I have seen that exist interFoamPressure on Foam-extend, This utility is used for take a good calculation of p.

Thanks and greetings,
Lorena
Attached Images
File Type: png inclined.png (22.7 KB, 45 views)
Lorena2fdez is offline   Reply With Quote

Old   October 17, 2017, 07:54
Default
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Hi Lorena,

D0 not worry; the decomposition is fine. Please look for some recent papers by Vukčević and Jasak and you will find a detailed derivation. Sorry, I do not recall,exactly which one it is...
sharonyue likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Hydrostatic Boundary Backflow with interFoam KTG OpenFOAM Running, Solving & CFD 0 November 15, 2016 21:32
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC Endel OpenFOAM Running, Solving & CFD 3 September 11, 2014 16:29
vof + hydrostatic pressure ariorus FLUENT 0 August 7, 2009 10:57
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


All times are GMT -4. The time now is 23:50.