adapting "debuggedPorousInterFoam" to OF version 2.1
Hi!
First of all, I want to give a short overview over the problem I'm facing. The porousInterFoam solver shipped with OF 2.1.1 does not take the porosity into account. Therefore, the solution the solver computes does not coincide with the (analytical) solution of the corresponding problem, i.e. the penetration of a porous medium by a liquid. This fact is known and a corresponding bug report has been filed at http://openfoam.org/mantisbt/view.php?id=477. However, a debugged version of porousInterFoam has been published at http://sourceforge.net/apps/mantisbt...iew.php?id=129 by Niels which differs from the "original" porousInterFoam version by the construction of the porosity field and the corresponding integration of the porosity in the alphaEquation. However, this code has been written to be integrated into the OpenFoam 1.6ext version and so I face certain compatibility problems. The first major problem I encounter is that in the file "createPorousZones.H" the porosity field is created by Code:
volScalarField porosity Then I have another question, mainly to Niels if he is somewhere around :) The same piece of code I posted above  the creation of the porosity field  is not only found in createPorousZones.H but also in the file alphaEqn.H  why is it defined doubly? Furthermore, I found no difference in the UEqn.H to the original file ../multiphase/interFoam/porousInterFoam.H/UEqn.H . However, I believe that in the volumeaveraged NavierStokes equation describing the flow through porous media the porosity also enters the time derivative? I.e. the NSequation goes d/dt(rho * U * gamma) = ... where gamma denotes the porosity. However, this does not enter the calculation even in debuggedPorousInterFoam? I hope anyone reads this although its quite a long post :)) Kind regards, Natalie 
Hi Natalie,
Let me try to answer your questions onebyone. 1. Compilation problems. The following bit of code is written from the top of my head without compilation (targeted for 2.1), so it might not be completely successful. I have modified the code, which you posted, as it differs a bit from the debugged version. However, try the following: Code:
forAll( pZones, zoneI ) 3. With respect to adding a constant on the temporal derivative, yes, it is true that there should be a correction. We came across this fact after the debugged version was submitted, and since no one responded to the bug report, we left it at the most significant problem. Please note that the correction in OF2.1 might not be correct, however, I cannot remember, if we did something different in the end. Good luck Niels 
It compiles!! Great, thank you so much!
What do you mean by Quote:

Good.
I meant that Code:
pZones.ddt(rho, U) Kind regards Niels 
P.S. Remember to visualise the porosity field written in the first time folder. This will help you to check, whether the code works.

Hi Natalie,
may I suggest you a reference? http://www.sciencedirect.com/science...78383912000245 In this paper you can find a very comprehensive review of the porous media equations. Best, Pablo 
Quote:
Is it possible for you share the debuggedPorousInterFoam solver you have modified for the 2.1.0 version. I started modifying the original version from Mantis to able to work with version 2.2.0, and landed up with same compilation trouble you have posted above in createPorousZones.H file. I tried with above suggested modification as well, but still facing compilation errors. Code:
createPorousZones.H: In function ‘int main(int, char**)’: 
All times are GMT 4. The time now is 07:10. 