Inhomogeneous Porous Media
I want to define a source term field via the fvOptions on the rhs of a momentum equation. I know my porous intertial and viscous resistance tensor as a function of space dimensions: D_.value(x,y) and F_.value(x,y), so in each cell, the resulting resistance tensor has different values. How could I create a tensor field, that I can hand over to the momentum equation? Is it possible to create a function that will fill the tensorField? E.g. where could I define something like this, preferably without having to recompile the solver:
Code:
porosity1 |
Ok, i found the solution to my problem. I modified the original DarcyForchheimerTemplates.C file and added a function that returns the coefficients based on some of the flow parameters in each cell (http://foam.sourceforge.net/docs/cpp/a04765_source.html).
Code:
forAll(cellZoneIDs_, zoneI) |
Now, another thing that I dont't really understand:
Can someone explain what the sense behind this method of adding the source term is? Code:
Udiag[cellI] += V[cellI]*isoCd; Code:
(template<class RhoFieldType> |
Quote:
I am facing a similar problem like you, I need to simulate the flow past the porous media where permeability is not uniform over space. "DarcyForchheimerTemplates.C" is in src folder, are there any other solutions to this problem? Because as I know if you change the source code you have to recompile it which is not so easy for me. Cheers |
Hi,
Did you find a way to use a permeability dependent position? |
All times are GMT -4. The time now is 10:26. |