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 Nphase model. So far I think there is only 2 phase Eulerian model, am I right? Thanks folks in advance Thanks. Arturo O. 
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 toplevel example code for porous media, because it's "too simple" and interesting only with some other phenomena. Hrv 
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 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.

I have completed a multiphase
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.

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 
BTW I work also with multiphas
BTW I work also with multiphase flows on porous media.
Thnx Arturo 
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 
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 
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 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 
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 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 
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? 
P.S. What do accurately mean w
P.S. What do accurately mean with pressure laplacian?

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 
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 
Sorry, but i don't know what y
Sorry, but i don't know what you mean with rhs...

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. 
Sorry: that would be the "righ
Sorry: that would be the "righthandside" of the equation. In other words:
fvScalarmatrix pEqn ( fvm::laplacian(K/nu, p) ); pEqn.solve(); Hrv 
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, 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 
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 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 
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. 
All times are GMT 4. The time now is 04:02. 