CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   unexpected flow speeds within porous zones (http://www.cfd-online.com/Forums/openfoam/98175-unexpected-flow-speeds-within-porous-zones.html)

MasterCooler March 5, 2012 06:56

unexpected flow speeds within porous zones
 
1 Attachment(s)
Dear openFoam-Community,

I am just analyzing flows through porosities and thereby I have found out that the flow speed within the porosity seems to have a strange and unexpected characteristic.

For example in the case attached (see picture, x direction flow speed in lila with values on the left vertical axes, pressure in black with values on the right vertical axes, picture of the porosity in x direction in the top part in order to show the cell resolution) the flow through the porosity is in x-direction only. Flows in y and z dirction are very close to 0. So I would expect that the flow through the porosity is at constant level and independly from the x coordinate.

But the result from plot over a line shows another behaviour whereby the flow speed degreases first and come only back to a stable behaviour (as expected) after 4 or 5 cells in x direction. Briefly before the flow leaves the porosity a similar beahviour can be observed. At the same time velocities in y and z direction are very close to 0 (not shown in the picture) what also seems to be a conflict in continuity from my point of view. On the other side pressure behaviour is close to the expectations.

At the beginning I assumed that that resolution of my porosity wasn't fine enough and only the first cell in x direction would be affect so to speak as a transition effect but now I have refined the mesh and can see that the effect doesn't depend from the mesh fineness too much.

Therefore I want to kindly ask the following questions:
1) How can the observed effect be explained?
2) What about law of continuity conservation, is it violated?
3) Can I trust in the flow speed values reached in the center of the porosity or which flow speed can be seen as representative?

Many thanks in advance for your helping!

Cheers
Ben Theobald

gschaider March 5, 2012 16:04

Quote:

Originally Posted by MasterCooler (Post 347668)
Dear openFoam-Community,

I am just analyzing flows through porosities and thereby I have found out that the flow speed within the porosity seems to have a strange and unexpected characteristic.

For example in the case attached (see picture, x direction flow speed in lila with values on the left vertical axes, pressure in black with values on the right vertical axes, picture of the porosity in x direction in the top part in order to show the cell resolution) the flow through the porosity is in x-direction only. Flows in y and z dirction are very close to 0. So I would expect that the flow through the porosity is at constant level and independly from the x coordinate.

But the result from plot over a line shows another behaviour whereby the flow speed degreases first and come only back to a stable behaviour (as expected) after 4 or 5 cells in x direction. Briefly before the flow leaves the porosity a similar beahviour can be observed. At the same time velocities in y and z direction are very close to 0 (not shown in the picture) what also seems to be a conflict in continuity from my point of view. On the other side pressure behaviour is close to the expectations.

At the beginning I assumed that that resolution of my porosity wasn't fine enough and only the first cell in x direction would be affect so to speak as a transition effect but now I have refined the mesh and can see that the effect doesn't depend from the mesh fineness too much.

Therefore I want to kindly ask the following questions:
1) How can the observed effect be explained?
2) What about law of continuity conservation, is it violated?
3) Can I trust in the flow speed values reached in the center of the porosity or which flow speed can be seen as representative?

Many thanks in advance for your helping!

Cheers
Ben Theobald

Is it possible that what you're seeing is the same problem as this one I reported some time ago http://www.openfoam.org/mantisbt/view.php?id=134 ?

It seems that OpenCFD doesn't think that it is a problem (we can discuss about the fix that was provided, but the problem is there)

MasterCooler March 6, 2012 04:15

Many thanks for the hint. I'll check if the described fix helps in OF2.1 as well and give a feedback.

Kalas April 13, 2012 07:29

Have you tested the proposed fix? I think I have encountered the same bug. I have a case which I tested in both OpenFOAM and Fluent and the velocity profile looks very different in the porous interfaces.

MasterCooler April 16, 2012 04:50

Hey Kalas,

I am sorry but I haven't tested it so far. So it is still on my to do but not forgotten. In coming weeks I will have simulation projects again and then I will test the fix and report the result. If you should test it before it would be nice to read the result on your side.

Cheers
Ben

Kalas April 20, 2012 02:29

Hello again!

Now I have tested the proposed fix, but my results were the same as before. I am not sure I applied it correctly though. I am using rhoPorousMRFSimpleFoam and changed pEqn.H as suggested above, is that the correct way to implement the fix?

Cheers,
Klas

gschaider April 20, 2012 04:10

Quote:

Originally Posted by Kalas (Post 355748)
Hello again!

Now I have tested the proposed fix, but my results were the same as before. I am not sure I applied it correctly though. I am using rhoPorousMRFSimpleFoam and changed pEqn.H as suggested above, is that the correct way to implement the fix?

Cheers,
Klas

- Apply patch
- Check that it really hit the files (strange things happen)
- recompile all the relevant libraries (or do ./Allwmake in $FOAM_SRC. That should recompile everything affected
- recompile the solver (not sure whether the relevant code parts are inlined or in the binary of the library)

Kalas April 20, 2012 05:08

Hmm ok,

I don't have access to the global installation and hoped it would suffice to make a new binary for the solver. But just to be clear what I did, I edited $FOAM_SOLVERS/compressible/rhoPorousFoam/rhoPorousMRFSimpleFoam/pEqn.H where I changed the line U -= trAU()*fvc::grad(p); to U = (fvc::reconstruct(phi))/rho;. Im pretty sure this made it into the file because i changed some output text which was changed in the solver output after I ran the recompiled solver from my $FOAM_USER_APPBIN. This solver works but gives exactly the same solution as the original..

MasterCooler April 20, 2012 07:02

Hey Kalas,

besides, which version are you using? OF2.1?

Regards
Ben

Kalas April 20, 2012 08:33

Yep, I'm using 2.1.

gschaider April 23, 2012 19:22

Quote:

Originally Posted by Kalas (Post 355774)
Hmm ok,

I don't have access to the global installation and hoped it would suffice to make a new binary for the solver. But just to be clear what I did, I edited $FOAM_SOLVERS/compressible/rhoPorousFoam/rhoPorousMRFSimpleFoam/pEqn.H where I changed the line U -= trAU()*fvc::grad(p); to U = (fvc::reconstruct(phi))/rho;. Im pretty sure this made it into the file because i changed some output text which was changed in the solver output after I ran the recompiled solver from my $FOAM_USER_APPBIN. This solver works but gives exactly the same solution as the original..

Forgot. The fix is only in the solver code. So the part about $FOAM_SRC was unnecessary

You should see some difference. Make sure with 'which rhoPorousFoam' that the new solver is actually used (or add some output to make sure)

Kalas May 2, 2012 07:48

Hi again!

I changed some output text so that I'm sure it is the changed solver being used. The solution is not exactly the same, but I still have oscillating velocities in the interface when entering the porous zone.


All times are GMT -4. The time now is 09:04.