# Setting Up a Simulation Using Porous Media

**URL:** <https://www.simscale.com/forum/t/setting-up-a-simulation-using-porous-media/36293>\
**Category:** Project Support\
**Created:** [August 4, 2016, 9:11pm UTC](https://www.simscale.com/forum/t/setting-up-a-simulation-using-porous-media/36293 "2016-08-04T21:11:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![varsey](https://www.simscale.com/forum/user_avatar/www.simscale.com/varsey/32/16133_2.png) [@varsey](https://www.simscale.com/forum/u/varsey)\
**Post date:** [August 5, 2016, 9:47am UTC](https://www.simscale.com/forum/t/setting-up-a-simulation-using-porous-media/36293/3 "2016-08-05T09:47:28Z")

</div>

HI @ibrito!

This is a good question, since I haven’t seen anywhere clear description of porous media setup in OpenFOAM.

Quickly answering your questions based on my modest experience:

First of all, if you want to create non-isotropic porous media, you should put the value of ‘f’ and ‘d’ coeffs only in those directions you interested in. So if you media flows in X direction, put values only in ‘x value’ field. Zeroes in other fields will mean that in Darcy-Forchheimer equation drag is being created only on x direction:

![](https://www.simscale.com/forum/uploads/default/original/2X/5/5e67b615ca4a654bda96fb01fd574631cc2df9ad.png)

The second thing: e1, e2 are the principal directions, so your porous media will be aligned along this directions. For example, if you have a porous zone inclined of 45° with respect to the x direction of the reference frame in your mesh, you should replace e1 with something like (in 2D)

e1 (0.70710678 0.70710678 0)

If you keep

e2 (0 0 1)

the second direction is parallel to the z axis.

For example, in my case I set up e1 and e2 vectors the way you can see at the pic:

 ![](https://www.simscale.com/forum/uploads/default/original/2X/4/492f18d18ff6d9ee798151d7316a6377244bcc06.png)

And you can look at this project as a reference as well: [link](https://www.simscale.com/projects/milosav2/gas_flow_through_catalytic_converter_and_exhaust/)

And the last thing I should mention is the exact values of ‘d’ and ‘f’ coefficients calculation. Unfortunately, I didn’t calculate them for my case myself, but used help of colleague of mine. I’m not sure how he did it, but I know that he used reference book with experimental values of porosity for our media and dimensions of ‘d’ and ‘f’ coeffs , after he gave me numbers we made a simple simulation in tube to prove those numbers work fine. I’ll try to reach my colleague and find out more details.

Hope this will give you right direction to move!

---

_[View the full topic](https://www.simscale.com/forum/t/setting-up-a-simulation-using-porous-media/36293)._
