|
[Sponsors] |
Local permeability in porousSimpleFoam or icoFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 13, 2014, 12:46 |
Local permeability in porousSimpleFoam or icoFoam
|
#1 |
New Member
James minto
Join Date: Nov 2012
Posts: 3
Rep Power: 14 |
Hi everyone,
I'm using OpenFOAM 2.3.0 and would like to model flow through a porous media such as a sandstone core in which the permeability of the media varies spatially. I think one approach (mentioned here) would be to use porousSimpleFoam but modify the DarcyForchheimer porosityModel so that the d and f coefficients are volume scalar fields that can be set with setFields (instead of being constants specified in the porosityProperties dictionary). I am having two problems with this. Firstly the DarcyForchheimer class is located in src/finiteVolume/cfdTools/general/porosityModel and I am having trouble separating DarcyForchheimer from all the other finiteVolume classes so that it can be compiled separately in my user directory without getting a lot of dependency issues. Secondly I can create the new volume scalar fields for d and f (called d_local and f_local) following the adding temperature to icoFoam tutorial, but don't know where to start with changing references to d and f to d_local and f_local. Another approach may be to modify the icoFoam solver so that d_local and f_local are included within the calculation of p and U in icoFoam.C. This might not be as nice a solution as using the existing porosityModel class but if it is a lot simpler then I would prefer this option as I have been using OpenFOAM for 2 years now but I'm new to modifying solvers. And advice on how to implement either of these solutions (or any other solutions you may know) would be greatly appreciated. If anyone knows of a beginners guide/tutorial for creating your own solver than could you please send me a link to it. If I make any progress on my own I'll post an update here. Thanks a lot James |
|
August 15, 2014, 15:57 |
|
#2 |
New Member
James minto
Join Date: Nov 2012
Posts: 3
Rep Power: 14 |
localDarcyFoam.tar.gz
localDarcyFoam_screenshot2.jpg localDarcyFoam_case.tar.gz I've made a little progress. The attached solver was created following the guidance in this document and solves Darcy's Law for flow through porous media based on pressure head and permeability. I modified the solver so that permeability is a volume scalar field. A random initial permeability field was set with funkySetFields. The results show that velocity and pressure vary with permeability (which is what I am after) but I have doubts about the solver. The next step is to create a new porosityModel based on the existing DarcyForchheimer model and create d_local and f_local volume scalar fields as described in the post above. This should allow the porousSimpleFoam solver to be used. Any advice on how to isolate the porosityModels from finiteVolume so that I can compile a new model without 1) having to re-compile all the finiteVolume class and 2) get lots of dependency issues. |
|
August 21, 2014, 06:39 |
|
#3 |
Member
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0 |
Hi James:
I think that compiling a new library is not difficult. what you need to do is just to copy the file you need to the user directory, and copy the make file in the finite volume directory, and remove the irrelevant stuff in the make file, just keep lines related to the porous media class. And compile it. Best regards Hao |
|
August 26, 2014, 08:57 |
|
#4 |
New Member
James minto
Join Date: Nov 2012
Posts: 3
Rep Power: 14 |
Hi Hao,
Thanks for the advice. I was able to compile just the porousMedia class following your suggestion. But so far I haven't been able to make any meaningful changes to the new class. Instead, I've created lot's of cell zones (16,000), each with a different name, using topoSet and a topoSetDict created in EXCEL. Each of the 16,000 cell zones has a corresponding porosity entry (with its own d and f coefficients) in porosityProperties (again, created in EXCEL). The existing porosity models can then be used without alteration. topoSet with this many cellZones is slow to run but only needs to be run once for each mesh. d and f coefficients can be changed for any/all cellZones by modifying the porosityProperties file. Using EXCEL for this is a bit clumsy... but it works for my purposes. I hope to learn more coding so that I can create a more elegant solution one day. Cheers James |
|
January 16, 2017, 05:03 |
|
#5 |
New Member
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10 |
Hello James, I would like to know if you could improve your coding. I also want to set different permeability for each cell of my porous medium. Unfortunately, doing it in excel would not work for me in this situation
If you have any suggestions, please let me know. Best regards, Roberto |
|
December 6, 2019, 08:02 |
D and F as Volume Tensor Field
|
#6 |
New Member
Pratyush Kumar
Join Date: Jun 2019
Location: Mumbai
Posts: 19
Rep Power: 7 |
Hello Foamers,
To incorporate local porosity, I defined D and F as volume Tensor Field using funkySetFields (where porosity is function of position, and D & F are function of local porosity at each position). I solved UEqn by adding resistance term in UEqn by taking help of https://cimec.org.ar/~mstorti/MECOM2018/paper-5734.pdf However, to test this solver I tried to solve a case where there is no local porosity variation with the available standard OpenFOAM solver. But, both results are not matching. In the case of standard solver, the approx. pressure drop is around 1900 Pa, whereas with developed solver I am getting around 10^6 . I am attaching the developed solver. Please someone solve my issue.3 Thanks in advance. Pratyush |
|
December 9, 2019, 05:22 |
|
#7 |
New Member
Pratyush Kumar
Join Date: Jun 2019
Location: Mumbai
Posts: 19
Rep Power: 7 |
Hello All,
I am still facing the problem. I don't understand the reason I am getting too much high pressure difference? |
|
May 18, 2020, 17:23 |
|
#8 |
Senior Member
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12 |
did u find the mistake?
|
|
Tags |
darcy-forchheimer, local permeability, openfoam 2.3.0, poroussimplefoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |