CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM News & Announcements > OpenFOAM Announcements from Other Sources

A porous multiphase toolbox for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree31Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2016, 11:54
Default
  #21
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by ksfbangbangda View Post
Now, there are 2 porosity zones with different parameters in my case, how can I define porosityProperties/constant ?
Quick request: Please provide more details, because at least I cannot see what exactly are referring to.

In addition, I advise you to follow the instructions given here: http://www.cfd-online.com/Forums/ope...-get-help.html
wyldckat is offline   Reply With Quote

Old   February 1, 2016, 06:02
Default
  #22
Member
 
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 16
Pedro24 is on a distinguished road
Quote:
Originally Posted by ksfbangbangda View Post
Now, there are 2 porosity zones with different parameters in my case, how can I define porosityProperties/constant ?
The toolbox has been updated and now accept heterogeneous porosity field "eps" for the two solvers impesFoam and anisoImpesFoam.

1) As before, you can define porosity as a scalar (eps is defined in transportProperties)
2) If you put a volScalarField "eps" in the time directory, it will be used by the solver to compute the two flows. Use setFields to generate your heterogeneous porosity field.

I update the tutorial "injectionAniso_case2" to give an example.

Regards,

Pierre

PS: Please note that porosity time derivative is not included in the conservation equations and must be constant.
wyldckat likes this.
Pedro24 is offline   Reply With Quote

Old   May 24, 2016, 07:57
Default
  #23
New Member
 
Ingmar
Join Date: May 2016
Posts: 2
Rep Power: 0
Ingmar is on a distinguished road
Hey,

I have different zones in my geometry with different porosity and pore diameter. Different pore diameter leads to different capillary pressure. Is it possible to define different pc_max (for the linear model) or different pc0 (for brooks and corey) in different regions?

Thanks for your help!

Ingmar
Ingmar is offline   Reply With Quote

Old   May 24, 2016, 08:55
Default
  #24
Member
 
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 16
Pedro24 is on a distinguished road
Hi Ingmar,

Currently, the parameters of capillary pressure models are defined as scalar so you can not simulate what you need directly. You should modify the files:

porousModels/capillarityModels/BrooksAndCorey/pcBrooksAndCorey.H
porousModels/capillarityModels/BrooksAndCorey/pcBrooksAndCorey.C

to indicate that parameters (alpha, pc0, Sminpc, Smaxpc in that case) are volScalarField and not dimensionedScalar anymore (you should read these files in timeDirectory or, better, in constant).
Note that you will have probably some errors in compilation (due to the fact that BrooksAndCorey use "pow" function which has some issues when dealing with VolScalarFields).

I think that even if it is not a big change in the toolbox, you should know correctly openfoam to implement it.

Good luck :-)

Pierre
Pedro24 is offline   Reply With Quote

Old   May 25, 2016, 09:48
Default
  #25
Member
 
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 16
Pedro24 is on a distinguished road
Hi,

I had several foamers having similar requests so i just updated the toolbox to allow heterogeneous model parameters.

The Kr and Pc models now look in the folder "constant/porousModels" to see if parameters are present (for example a pc0 file for the Brooks and Corey model).

Case 1: file is present so the parameter is heterogeneous (define for each computation cell)
Case 2: file is not present so it reads "BrooksAndCoreyCoeffs_" in transportProperties if it is present
Case 3: set a default value (0 for most cases).

Each parameters is independent so you can define a partly heterogeneous model. Example is given in tutorials (BuckleyLeverett/BrooksAndCorey and 1Dinfiltration)

You should use the setFields function to correctly initialize your parameters in the time directory and then move parameters-files to the "constant/porousModels" folder (I don't want parameter fields in the time directory because they are constant).

Please let me know if you find bugs in the code so that I can improve/correct it .

Sincerely,

Pierre

Source code : https://github.com/phorgue/porousMultiphaseFoam.git
Pedro24 is offline   Reply With Quote

Old   May 30, 2016, 07:02
Default
  #26
New Member
 
Ingmar
Join Date: May 2016
Posts: 2
Rep Power: 0
Ingmar is on a distinguished road
Hi Pierre,

thanks for the update its working fine in 1D and 2D cases.
Currently I'm trying to calculate a 3D case and I'm always getting a saturation higher than 1. I created a wedge for a cylinder and I'm using the linear solver for a flow of Ub through the pipe (so basically its flow through a pipe filled with porous media). Any Ideas what the problem might be?

Ingmar
Ingmar is offline   Reply With Quote

Old   June 1, 2016, 08:37
Default
  #27
Member
 
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 16
Pedro24 is on a distinguished road
Quote:
Originally Posted by Ingmar View Post
Hi Pierre,

thanks for the update its working fine in 1D and 2D cases.
Currently I'm trying to calculate a 3D case and I'm always getting a saturation higher than 1. I created a wedge for a cylinder and I'm using the linear solver for a flow of Ub through the pipe (so basically its flow through a pipe filled with porous media). Any Ideas what the problem might be?

Ingmar
This issue is generally related to the timestep which may be too big (explicit computation of the saturation equation). Maybe you should try to reduce the maxCo in your 3D case.

Pierre
Pedro24 is offline   Reply With Quote

Old   August 21, 2016, 01:39
Default Compilation Problem using OpenFOAM-3.0.1
  #28
New Member
 
chemcfd
Join Date: Jun 2015
Posts: 2
Rep Power: 0
chemcfd is on a distinguished road
Hi,

I tried to compile the solvers using standard OF-3.0.1 version but compilation was not successful. Could you please help me to fix the issue in compilation? Thank you in advance.

Please find below the compilation errors:
Attached Images
File Type: jpg Czli46.jpg (189.4 KB, 23 views)

Last edited by chemcfd; August 21, 2016 at 01:42. Reason: including the error message
chemcfd is offline   Reply With Quote

Old   March 13, 2017, 08:17
Default
  #29
Member
 
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 16
Pedro24 is on a distinguished road
Hi CHiller,

The message :
Code:
C:/BLUECF~1/ofuser-of4/platforms/mingw_w64GccDPInt32Opt/bin/impesFoam.exe: error while loading shared libraries: libporousModels.dll: cannot open shared object file: No such file or directory
means that the library libporousModels.so does not compile correctly in the toolbox (the file is not present).

I do not know precisely the c++ structure of dynamic meshes in openfoam and probably there are some deep changes to implement in the toolbox to use it. Probably you should not only change solver "impesFoam" but also the associated libraries (porousModels and maybe porousBoundaryConditions).

Sincerely,

Pierre
Pedro24 is offline   Reply With Quote

Old   April 28, 2017, 07:00
Default
  #30
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Hello,
I am new to openFoam and using twoPhaseEulerfoam (two phase flow or air in the water). I added a porous baffle in the (air-water) path using fvOptions. Is it possible to add relative permeability into DarcyForchheimer model. I am using explicitPorositySource by using fvOptions but trying to add relative permeabuility or (K=kkr where kr can be alpha - phase fraction) in it.

I also tried this model but i don't understand how impesFoam will work when there is no porous media e.g. gas dispersion through sediments into water column (no porous media). it would be really great if you can give me any idea how can i do this or your solver (impesFoam) ok to use in my case?

Kind Regards
Umer
us7 is offline   Reply With Quote

Old   May 1, 2017, 12:56
Default
  #31
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi Ulmer,

In impesFoam, you solve generalized Darcy laws. Which means that by construction, there are always solid in the cells. This is a prerequisite.

Cheers,
Cyprien
Cyp is offline   Reply With Quote

Old   May 1, 2017, 14:04
Default
  #32
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Thanks Cyprien. Can you recommend me any solver related to this case?

Regards,
Umer
us7 is offline   Reply With Quote

Old   May 1, 2017, 14:16
Default
  #33
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
You can probably customize twoPhaseEulerFoam to add relative permeability in the porous regions.
Cyp is offline   Reply With Quote

Old   May 1, 2017, 14:28
Default
  #34
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Thanks. Yes i am already trying that solver but i have few questions related to that if you may like to give some suggestion. I am using twophaseEulerfoam and using explicitPorosity source term in fvOptions. Currently i am using two phase air and water. The source term in openfoam just let me to put values for D and F.

-Currently source term is Si = -(μ D + 1/2ρ|u|F)ui where D = 1/K , K= intrinsic permeability but in case of two fluids how is it calculating K.

-is K=KKre in case of two phase or its taking absolute permeability which is mentioned in fvOption "d d [0 -2 0 0 0 0 0] (2e11 2e11 2e11)"?

-if yes, then is it ok to use this explicit porosity source term for two phases because this source term is not calculating relative permeability for each phase.

Here, i am struggling to add relative permeability into this explicitPorositySource term like

Si = -(μ D/kre + 1/2ρ|u|F)ui

so it will start taking effect of both phases where Kre is a function of saturation or volume fraction alpha. and for this what i could understand so far is, i have to modify DarcyForchheimer.C and all related files. Please correct if i am wrong here.

Regards,
Umer
us7 is offline   Reply With Quote

Old   May 1, 2017, 15:05
Default
  #35
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Actually, what I am suggesting is that you give up with this fvOption feature. Instead you clone twoPhaseEulerFoam and you implement your own source term with the dependency you want.
Cyp is offline   Reply With Quote

Old   June 25, 2019, 09:30
Default
  #36
New Member
 
Faizal
Join Date: May 2018
Posts: 1
Rep Power: 0
Faiz498 is on a distinguished road
I downloaded the toolbox from git link

After running ./Allwmake command inside porousMultiphaseFoam directory, I got a long error. I am attaching initial part of the error. Can anyone help me how to proceed from here?
The error says it is could not open x.H files for y.C files
I am using Foam-extend4.0 in Ubuntu16Screenshot from 2019-06-25 18-54-14.jpgScreenshot from 2019-06-25 18-54-42.jpg
Faiz498 is offline   Reply With Quote

Old   November 9, 2019, 19:12
Default Local porosity variation
  #37
New Member
 
Pratyush Kumar
Join Date: Jun 2019
Location: Mumbai
Posts: 19
Rep Power: 6
PRATBHARAT is on a distinguished road
hi,
I am using OpenFOAM 6. I have a case in which porosity is varying along width and length having empirical relation found by using DEM. Can anyone help me?
Thanks in Advance.

Regards,
Pratyush
PRATBHARAT is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase Porous Media Flow - Convergence Issues VT_Bromley FLUENT 7 May 14, 2020 16:34
Multiphase flow in porous media and relative permeabilities sirpolar Fluent Multiphase 1 July 24, 2016 05:41
Multiphase porous media model:inertial and viscous resistance button doesn't show up Tanjina Fluent Multiphase 3 July 21, 2013 12:08
multiphase flow in porous media zhou FLUENT 2 August 9, 2012 07:10
Multiphase flow & porous media Hisham OpenFOAM 3 April 10, 2011 07:04


All times are GMT -4. The time now is 05:33.