Franjcf / hybridPorousInterFoam

OpenFOAM solver for performing single- and two-phase flow simulations on hybrid-scale porous media.
GNU General Public License v3.0
91 stars 36 forks source link

gravity in porous media #4

Closed longhuang123 closed 3 years ago

longhuang123 commented 3 years ago

Hello, I found that the gravity setting is only effective when eps is 0.999, but not in porous media. I would like to know how to consider gravity in porous media, thank you

Franjcf commented 3 years ago

Hi.

Gravity is considered both in the porous medium and in the free fluid. Please refer to the JCP paper at the end of the README file for a complete derivation of the equations. In short, the "rho"-dependent gravity term in pEqn.H is defined differently depending on the domain that each grid cell is on, this is controlled by the "Solid" variable (equal to 1 in porous media and 0 in solid-free domains). rho itself is defined at the end of the alphaEqnSubCycle.H file and is in agreement with Eqn. 39 shown in the paper.

longhuang123 commented 3 years ago

Hi. I want to run some examples of coupling free flow and porous media flow. In fact, the fluids in porous media will produce gravitational differentiation due to density difference, but I can't simulate this phenomenon. I changed a lot of parameters, but it has no effect.

longhuang123 commented 3 years ago

Gravity differentiation only occur when eps is 0.999

Franjcf commented 3 years ago

Hi. I suggest you look at the tutorial case within Darcy_Flow_Cases/Gravity_Capillarity_Equilibrium and the associated explanation the paper I referenced. In this particular tutorial you can clearly see that the density difference between the fluids creates fluid separation in the column (which is then balanced by capillary forces). If I were you, I would play around with this case just to get a feel of how this would work and then apply/modify it to your own system.

The reason why the solver "works" at eps =0.999 is because the solver switches to the solid-free gravity formulation at this point (i.e. Volume-of-Fluid formulation, not the Darcy formulation). I would also check your particular case just to make sure you are not trying to simulate something that is not physical.

longhuang123 commented 3 years ago

Thanks for your reply. I will try to design other examples according to your suggestions.