CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Porous media in openfoam (https://www.cfd-online.com/Forums/openfoam-solving/57894-porous-media-openfoam.html)

arturo July 10, 2005 20:25

I'm new to OpenFoam, and my ap
 
I'm new to OpenFoam, and my applications are about porous media.
I've searched the forum (not exhaustive, though) without any mention to this application.
So far fluent and the like have tackled the subject by including a source term on the momentum equation and I don't expect this to be too hard to implement in openFoam.
My question is of course if someone has already done that.
Also if it is possible to implement it in a multiphase Eulerian N-phase model.
So far I think there is only 2 phase Eulerian model, am I right?

Thanks folks in advance

Thanks.

Arturo O.

hjasak July 11, 2005 07:20

Hi, I have done a number of
 
Hi,

I have done a number of porous media flow model implementations, including scalar or tensorial resistance, using Darcy's law. They were typically a part of more complex model, like for example the biscuit baking model (mass transfer for air, liquid water and water vapour + heat transfer + stress analysis with large deformations) or similar complex heat/mass transfer models.

In these cases, the flow equations lose the momentum term and you can solve them just by solving for pressure. Currently, there's no top-level example code for porous media, because it's "too simple" and interesting only with some other phenomena.

Hrv

henry July 11, 2005 07:50

I implemented the generalised
 
I implemented the generalised laplacian with tensorial viscosity (currently limited to an orthogonal grid in the region of the porous medium) in version 1.1 which can be used to include porous media effects into any of the basic solvers with a little bit of effort. I have used it to write a catalytic-converter simulation code and other specialised applications but it is a lot of effort to write example codes, FoamX configurations, documentation etc. so until someone is prepared to pay for this work we are unlikely to do it because our spare time is already taken up with basic maintenance and core development tasks.

henry July 11, 2005 11:35

I have completed a multiphase
 
I have completed a multiphase version of interFoam but haven't yet done the same for the Eulerian two-phase code although it is perfectly possible.

arturo July 13, 2005 00:17

My main interest are chemical
 
My main interest are chemical reactions and other physics on porous media, the so called packed bed reactors, so many other phenomena must be accounted for such as heat transfer, chemical reaction and mass transfer, its good to know that OpenFoam can tackle those cases.
Thanks for the answer and I hope I can post my questions if stucked.

Thanks to all

Arturo

arturo July 13, 2005 00:24

BTW I work also with multiphas
 
BTW I work also with multiphase flows on porous media.

Thnx

Arturo

nico January 17, 2006 15:39

Hi @Hrvoje Jasak: How did y
 
Hi

@Hrvoje Jasak: How did you implement darcys law for tensoral resistant? For scalar resistant I simply add +fvm::SuSp(nu*G,U) to the simpleFoam solver, where U is the inverse of K and K is the specific viskosity of my porous media (unit of K :m2). But how to do this for a volTensorField? I tried +nu*(G&U), but it did not converge.

bye

hjasak January 17, 2006 18:38

Several things: please note th
 
Several things: please note that this kind of thing is really consultancy, i.e. I will rarely be prepared to give away this level of explanation for free.

Firstly, when you say fvm::SuSp you mean that the term may be both positive (source) or negative. In your case, we are talking about porous drag (unless you porous medium is capable of producing energy = accelerating the fluid). This the term is always a sink - use fvm::Sp.


Secondly, my Darcy's law says that the velocity field is in equilibrium with the pressure gradient. In other words, U is proportional to grad p. If you read this once again, this means that both the convection and the diffusion term in the momentum equation are negligible and should be thrown out. The last term is left is the ddt term and this is a question of taste: is the equilibrium immediate (no ddt) or is there a relaxation towards the equilibrium (ddt remains and complicates matters a little bit).

With this in mind, could you please temm me why you are solving the momentum equation in the first place: U is proportional to grad p (Darcy's law) and convection and diffusion in the prorous medium should be neglected.

So, now we are in business: no mementum equation and U is in equilibrium with the pressure gradient. Thus, all I need to do is to solve the pressure equation, using the porous resistance (please derive yourself!).

Finally, the story above is valid both for isotropic resistance and directional resistance. When you derive it, you will find that for the latter, the pressure laplace needs a tensorial diffusivity term! There you can use:

template<class>
tmp<fvmatrix<type> > laplacian
(
const volTensorField&,
GeometricField<type,>&
);

(that should now make sense!).

Enjoy (courtesy of),

Hrv

nico January 18, 2006 03:32

Thank you very much. But th
 
Thank you very much.

But there ist still a question. In my case there is a porous region and a non porous region, and therefor I found the Navier-Stokes-Brinkman equation. I understand that the convection and the diffusion term are negligible in the porous region. But only there, so that they cannot be thrown out in my case. Am I right?

I hope it is not too boring for you. I am a real beginner. Sorry

Bye

hjasak January 18, 2006 04:52

That's all fine: you can knock
 
That's all fine: you can knock out the fluxes and diffusion in the porous region and have the complete momentum elsewhere.

However, the primary coupling in the system is p-U and not the momentum equation. Thus, as long as you keep messing about with the sink terms in the momentum equation instead of rewriting the pressure laplacian - this handles the dominant coupling - you won't get this to work (for any serious porous medium).

My advice (step by step, make it work, understand it and then generalise)
1) write a simple porous medium solver, no momentum equation
2) do the same for directional resistance
3) include the ddt term only in the momentum
4) do the same, with the porous medium covering a part of the domain. Beware of continuity problems on the porous interface!!!
5) introduce tensorial resistance. Rinse. Repeat :-)

Have fun,

Hrv

nico January 18, 2006 07:52

I see it's getting more compli
 
I see it's getting more complicated than expected.
Thanks a lot.

Last Question: How can I knock out the fluxes and the diffusion in the porous region and have the complete momentum elsewhere? Define a field for it? Perhaps a volScalarField with the value 0 in the porous medium and the value 1 elsewhere? So that i can use it as a switch?

nico January 18, 2006 07:56

P.S. What do accurately mean w
 
P.S. What do accurately mean with pressure laplacian?

nico January 24, 2006 11:14

Hi Hrv! Is it right, that I
 
Hi Hrv!

Is it right, that I have to solve the following eqaution:

fvScalarmatrix pEqn
(
fvm::laplacian(K/nu, p)
== fcv::div(phi)
);
?

In Simple Foam we solve at first the UEqn. After that we caculate phi. And then we solve the pEqn.
In my case I will at first solve the presserue equation and because of that i don't know how to calculate phi.
I hope you understand my problem.

Thanks

hjasak January 24, 2006 11:26

Better, but there's no flux to
 
Better, but there's no flux to start with: it's all in the pressure gradient. So, just lose the rhs. and you will get the flux when you solve for the pressure.

Keep digging :-)

Hrv

nico January 24, 2006 11:37

Sorry, but i don't know what y
 
Sorry, but i don't know what you mean with rhs...

nico January 24, 2006 11:42

Ok,i think with rhs you mean r
 
Ok,i think with rhs you mean right side?!

like this:

fvScalarmatrix pEqn
(
fvm::laplacian(K/nu, p)
);

??
Isn't it possible that you send me one of your solver.C to understand what to do? I only need this for university. I would be a greate help.

hjasak January 24, 2006 11:43

Sorry: that would be the "righ
 
Sorry: that would be the "right-hand-side" of the equation. In other words:

fvScalarmatrix pEqn
(
fvm::laplacian(K/nu, p)
);

pEqn.solve();

Hrv

nico January 28, 2006 09:31

Hi Hrvoje Jasak, you told m
 
Hi Hrvoje Jasak,

you told me that my first way to solve flow in porous media was wrong. I found an article about different methods to do this. There are two
macroscopic model. One is solving darcys law in the porous region and ns in the fluid region. That is what you told me.
But there is another method. That is what i have done, the socalled "Reformulated problem" :

Brinkman model for the porous media, Navier-Stokes for the fluid region, and continuos stress tensor interface conditions, are reformulated, so that a single system of partial differential equations is govering the flow in the pure liquid and in the porous media. This is done in the fictitious regions method manner.

link:
http://kluedo.ub.uni-kl.de/volltexte.../bericht51.pdf

Thanks a lot for all your help and efforts.

Nico

ultrafast February 26, 2009 03:38

Hello, all I'm new to OpenF
 
Hello, all

I'm new to OpenFoam, and also to CFD problems.
I was used to discretize PDE to ODE and leave everything else to the solver (such as ode15s in matlab).

Now I start to learn algorithms like PISO, and it seems really confusing for me.

One question is, if I'm dealing with flows in porous media governed by simple darcy's law. Is it still necessary to use PISO loop?

Because every textbook said PISO is used to solve the pressure-velocity coupling. But now the velocity can be calculated directly from pressure gradient and we don't even have a momentum balance equation.

I hope this is a corret thread for this question, and thanks a lot for any hints or suggestion.

Fan

Zinedine September 11, 2010 06:26

Quote:

Originally Posted by hjasak (Post 192400)
Hi,

I have done a number of porous media flow model implementations, including scalar or tensorial resistance, using Darcy's law. They were typically a part of more complex model, like for example the biscuit baking model (mass transfer for air, liquid water and water vapour + heat transfer + stress analysis with large deformations) or similar complex heat/mass transfer models.

In these cases, the flow equations lose the momentum term and you can solve them just by solving for pressure. Currently, there's no top-level example code for porous media, because it's "too simple" and interesting only with some other phenomena.

Hrv

Hi,
I have just completed a very useful and interesting Openfoam training.
I was wondering if it would be possible to get some test case files like those used in "Biscuit baking model". It would be kindly appreciated.
Thanks in advance.
Z.

subha_meter December 21, 2010 07:56

Mutiphase_Eulerian_Eulerain_porous media
 
Hi Arturo,

I'm stuck at a packed bed simulation in Fluent. The packed bed model is represented by air/water streams in porous media in Eulerian framework.

I aim at my model to predict pressure drop and liquid volume fraction in the bed.

Kindly let me know,

1) Is viscous resistance needs to be entered for both phase? I've calculated this resistance (1/m2) by Ergun Equation for single phase. But how do we account for two phase here?

I've used "Schiller Naumann" drag law to calculate "interphase coupling" considering 5 mm water bubble dia.

Do you feel it necessary to introduce two momentum source terms instead of entering viscous/inertial resistance?

A technical reply will be highly appreciated.

Regards,

SM



Quote:

Originally Posted by arturo (Post 192404)
BTW I work also with multiphase flows on porous media.

Thnx

Arturo


alberto December 21, 2010 19:19

FLUENT Eulerian packed bed model can be seen as a three-phase Euler-Euler model, where one phase has zero velocity, and represents the porous zone. This makes things a bit easier, since you automatically have sum(vol. Fraction) = 1.

subha_meter December 22, 2010 00:49

fluent_porous media_packed_bed
 
Hi Alberto,

Thanks for your reply. I've implemented 3 phase E-E model in Fluent, patching solid phase with constant packing factor 0.63 in the computational domain. But this 3 phase strategy is really computationally expensive and time consuming.

All I'm looking at is replacing the solid phase with "porous media" incorporating the suitable momentum sink terms in 2 phase E-E simulation. This saves time yet gives reasonable accuracy.

Any technical suggestion is more than welcome.

Regards,

SM



Quote:

Originally Posted by alberto (Post 288053)
FLUENT Eulerian packed bed model can be seen as a three-phase Euler-Euler model, where one phase has zero velocity, and represents the porous zone. This makes things a bit easier, since you automatically have sum(vol. Fraction) = 1.


alberto December 22, 2010 15:08

I don't see why it is so much more computationally expensive of the two-phase simulation you have to run anyway, since you are not solving for the particle phase (it has constant zero velocity and constant volume fraction). The proper momentum sink is given by the drag coefficient, which should be based on the Ergun law for the phase pairs involving the porous zone.

oky February 1, 2011 20:58

Hi everyone,

I'm trying simulation porous media in rectangular channel, but the result isn't suitable with any research.

So, would you help me. I wish someone can check my simulation and give some reports if there is something wrong.

Thank you for your help.
Please send your e-mail, than i will send you my works to to your email.
my e-mail: oky.andytya.net@gmail.com

Regrads,
OKY Andytya P

note:
I use ANSYS Fluent 6.3 [CFD]

makaveli_lcf February 2, 2011 01:43

Oky,
1E+06 $ please

oky February 17, 2011 21:57

To: Dr. Alexander VAKHRUSHEV

I have been visited the website and make some contact. Theres is a problem with the address.

Would you like give your personal e-mail / website, because it's very helpfull. Tjanh you.

Regrads
Oky Andytya
oky.andytya.net@gmail.com

run_cfd May 24, 2011 10:54

help in modeling compressible flow through porous media with heat transfer
 
Quote:

Originally Posted by hjasak (Post 192400)
Hi,

I have done a number of porous media flow model implementations, including scalar or tensorial resistance, using Darcy's law. They were typically a part of more complex model, like for example the biscuit baking model (mass transfer for air, liquid water and water vapour + heat transfer + stress analysis with large deformations) or similar complex heat/mass transfer models.

In these cases, the flow equations lose the momentum term and you can solve them just by solving for pressure. Currently, there's no top-level example code for porous media, because it's "too simple" and interesting only with some other phenomena.

Hrv




Hi Hrv,

I was looking for some help in modeling compressible flow in porous media, and to me you seem to be a senior member in this field. i would appreciate any help in this regard, if it does distract you from your schedule, I would understand,


In my problem I hava a vertical cylindrical domain and the complete domain is filled with porous media of porosity 0.6. Air inters to the domain at a velocity of 0.3 Mach no. and temp of 1000 degree centigrade, through 18 thin pipes mounted circumferentially at the side. and Air comes out from the top of the cylinder after passing through the porous media.

Actually I was facing problem in definig a porous zone on a tetrahedral mesh which I imported to discretize-setup as a *.stl import from star-CD mesh file. Also the imported mesh shows an extra patch "patch0", which has 0 face, and the rhoPorousSimpleFoam solver complains about this patch 0, and gives fatal error.

Please help me in getting some way to overcome this error. Also I would be grateful if you could suggest a solver for such kind of problems.

Regards,

MLD

oky May 24, 2011 23:06

Hi, everyone

How to get the value of convection coefficient [h] from Fluent directly ??

Regrads,

Oky

hakostar March 15, 2013 18:25

chemical reaction into porous media openfoam
 
Quote:

Originally Posted by arturo (Post 192403)
My main interest are chemical reactions and other physics on porous media, the so called packed bed reactors, so many other phenomena must be accounted for such as heat transfer, chemical reaction and mass transfer, its good to know that OpenFoam can tackle those cases.
Thanks for the answer and I hope I can post my questions if stucked.

Thanks to all

Arturo

hello, i'm new with openfoam and i'm using only the tutorials but for my preoblem i need a chemical reaction into a porous media so how can i do that like you did ?

Thank you in advance

Santiago March 16, 2013 15:23

Have you checked porousSimpleFoam?

hakostar March 16, 2013 16:07

yeah but there is not chemical reaction in porousSimpleFoam
how can i modify


All times are GMT -4. The time now is 06:49.