
[Sponsors] 
July 10, 2005, 20:25 
I'm new to OpenFoam, and my ap

#1 
New Member
Arturo O
Join Date: Mar 2009
Location: Mexico
Posts: 3
Rep Power: 10 
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 Nphase model. So far I think there is only 2 phase Eulerian model, am I right? Thanks folks in advance Thanks. Arturo O. 

July 11, 2005, 07:20 
Hi,
I have done a number of

#2 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,790
Rep Power: 23 
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 toplevel example code for porous media, because it's "too simple" and interesting only with some other phenomena. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

July 11, 2005, 07:50 
I implemented the generalised

#3 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
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 catalyticconverter 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.


July 11, 2005, 11:35 
I have completed a multiphase

#4 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 15 
I have completed a multiphase version of interFoam but haven't yet done the same for the Eulerian twophase code although it is perfectly possible.


July 13, 2005, 00:17 
My main interest are chemical

#5 
New Member
Arturo O
Join Date: Mar 2009
Location: Mexico
Posts: 3
Rep Power: 10 
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 

July 13, 2005, 00:24 
BTW I work also with multiphas

#6 
New Member
Arturo O
Join Date: Mar 2009
Location: Mexico
Posts: 3
Rep Power: 10 
BTW I work also with multiphase flows on porous media.
Thnx Arturo 

January 17, 2006, 16:39 
Hi
@Hrvoje Jasak: How did y

#7 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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 

January 17, 2006, 19:38 
Several things: please note th

#8 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,790
Rep Power: 23 
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
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

January 18, 2006, 04:32 
Thank you very much.
But th

#9 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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 NavierStokesBrinkman 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 

January 18, 2006, 05:52 
That's all fine: you can knock

#10 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,790
Rep Power: 23 
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 pU 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
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

January 18, 2006, 08:52 
I see it's getting more compli

#11 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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? 

January 18, 2006, 08:56 
P.S. What do accurately mean w

#12 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
P.S. What do accurately mean with pressure laplacian?


January 24, 2006, 12:14 
Hi Hrv!
Is it right, that I

#13 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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 

January 24, 2006, 12:26 
Better, but there's no flux to

#14 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,790
Rep Power: 23 
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
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

January 24, 2006, 12:37 
Sorry, but i don't know what y

#15 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
Sorry, but i don't know what you mean with rhs...


January 24, 2006, 12:42 
Ok,i think with rhs you mean r

#16 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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. 

January 24, 2006, 12:43 
Sorry: that would be the "righ

#17 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,790
Rep Power: 23 
Sorry: that would be the "righthandside" of the equation. In other words:
fvScalarmatrix pEqn ( fvm::laplacian(K/nu, p) ); pEqn.solve(); Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

January 28, 2006, 10:31 
Hi Hrvoje Jasak,
you told m

#18 
Member
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 10 
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, NavierStokes 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.unikl.de/volltexte.../bericht51.pdf Thanks a lot for all your help and efforts. Nico 

February 26, 2009, 04:38 
Hello, all
I'm new to OpenF

#19 
New Member
fan
Join Date: Mar 2009
Location: langfang, hebei, china
Posts: 1
Rep Power: 0 
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 pressurevelocity 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 

September 11, 2010, 06:26 

#20  
New Member
Zinedine
Join Date: Sep 2010
Posts: 18
Rep Power: 8 
Quote:
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. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Porous media model in OpenFOAM 14  gac  OpenFOAM Running, Solving & CFD  21  August 5, 2013 17:49 
POROUS MEDIA  Sean Cody  FLUENT  8  March 6, 2013 11:33 
Free media&porous media.Big changes in properties.  Isi  Main CFD Forum  1  July 14, 2008 07:18 
porous media  Kurt Malinski  FLUENT  3  September 13, 2004 12:31 
Porous baffle and porous media  Jan  CDadapco  0  June 8, 2002 09:23 