|
[Sponsors] |
September 2, 2019, 10:21 |
An old story... the p_rgh field
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi everybody,
even though people might think I am good in FOAM, I am having still problems with the p_rgh field and boundary conditions. Well in the numerical point of view it is not a big deal to get the idea of the p_rgh field and even the derivation of the equation. However, letīs talk about that (again) using a relatively simple case. Referring to the attached PDF, we see two tanks (1) and (2) filled with water while on both tanks an atmospheric pressure is given above the fluid level. The filling level difference is given by represents the level difference. Each tank has a pipe to the storage tank shown in the middle of the draft. The area of interest is given in the right bottom corner. Letīs imagine infinite large tanks (1) and (2) which means that the water level does not change during time. Thus, we always have a defined (and fixed) hydrostatic pressure that acts as a driving force for the water (1) and water (2) to flow into the storage tank (3). Let's assume that tank (1) has 30 degC warm water and tank (2) has 45 degC warm water. We take a defined mass flow out of tank (3) while new water is sucked in from tank (1) and tank (2). The ratio depends on the hydrostatic pressures of both streams. Means, if increases (higher water level in the tank (2)), more water from the tank (2) is flowing into tank (3). As in all p_rgh cases, I am struggling with the correct pressure boundary conditions. Questions
Did anybody had similar set-upīs before and can help me out? I was looking into the hydrostatic* pressure boundary conditions but did not find any suitable one for my case. Any hints are welcomed. Thank you in advance Tobi
__________________
Keep foaming, Tobias Holzmann |
|
September 2, 2019, 15:33 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
I think for your case, you have to set fixedValue boundary conditions in your patches (1) and (2) with the value
p_atmosphere - rho(at position of boundary) * g * h_rel h_rel is the hight difference to your reference point (which might be set automatically to 0) |
|
September 2, 2019, 17:04 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi Herb,
thank you for the quick response. One question. hrel is the difference between the level in tank (1) to the reference point as well as the level in tank (2) to the reference point?
__________________
Keep foaming, Tobias Holzmann |
|
September 2, 2019, 17:34 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
Yes, both tanks should have the same reference point.
So if the heights are different, the boundary (fixed)Value should be different. (I am not totally sure about the sign) So for the bigger height, the value of p_rgh is higher (p - rho * (-9.81) * h). Which actually make sense:If there is no flow, the pressure should be the same everywhere. |
|
September 2, 2019, 17:38 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Okay, I will check it tomorrow. Did you ever checked out the following BC:
Code:
This boundary condition provides static pressure condition for p_rgh, calculated as: \f[ p_rgh = ph_rgh - 0.5 \rho |U|^2 \f] Wondering in which szenario we are using it because I never realized the field ph_rgh in any solver.
__________________
Keep foaming, Tobias Holzmann |
|
September 2, 2019, 17:43 |
|
#6 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
I think, you want this:
https://cpp.openfoam.org/v4/classFoa...d.html#details This boundary condition provides static pressure condition for p_rgh, calculated as: Or in the Foundation version: https://github.com/OpenFOAM/OpenFOAM...hScalarField.H |
|
September 2, 2019, 18:07 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Ah okay, right but shouldn't it be a totalPrghPressure somehow, which reduces the pressure at the face based on the kinematic pressure (velocity field).
__________________
Keep foaming, Tobias Holzmann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
External Magnetic Field Data Format for FLUENT MHD Module | eduardvinter | FLUENT | 0 | January 24, 2019 01:54 |
simpleDyMFoam on v1806 | gamemakerh | OpenFOAM Programming & Development | 0 | November 8, 2018 08:15 |
potential flows, helmholtz decomposition and other stuffs | pigna | Main CFD Forum | 1 | October 26, 2017 08:34 |
[General] How to create an additional vector with {Field 4, Field 5, Field 6} | Bombacar | ParaView | 1 | August 15, 2015 18:05 |
Demagnetization field | jan0385 | ANSYS | 0 | April 12, 2012 09:09 |