Code Monkey home page Code Monkey logo

porousmultiphasefoam's Introduction

porousMultiphaseFoam (PMF) for OpenFOAM

About

PMF is an open-source toolbox dedicated to simulation of flow and transport processes in porous media.

It is based on the OpenFOAM environment and therefore benefits from its multiple feature such as pre-and post-processing tools or parallel efficiency for example.

Read the PMF documentation for more information.

This toolbox needs only a standard OpenFOAM installation and is compatible with the two main forks: www.openfoam.com and www.openfoam.org.

Documentation

For information about installation, usage or numerical details, you should read the PMF documentation

Improvements and bugs fixes are registered in the ReleaseNotes.txt file.

How to cite PMF

If your are using the PMF toolbox (directly or as a base-code) for a scientific publication, please cite at least one of the main references.

The initial paper :

and/or the hydrological module:

porousmultiphasefoam's People

Contributors

avlmachado avatar gerlero avatar jmkerloch avatar matteoicardi avatar phorgue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

porousmultiphasefoam's Issues

How to simulate the rainfall Infiltration

I now use the groundwaterFoam to simulate the groundwater flow,but i do not know how to simulate the rainfall infiltration.
Rainfall infiltration is a neumann boundary condition.
I'm trying to modify the U values in the Utheta file and to use the U to simulate rainfall conditions,but it seems to be ineffective and wrong.
How can i simulate the rainfall Infiltration ?
thanks.

About viscous-fingering case

Hello professor:
I am very interested in solving the viscous fingering calculation example with impesFoam solver in your article, but I have tried for a long time without getting the desired result (sometimes errors are reported). May I take the liberty of asking if you can provide this calculation example? If you can provide this will be a great help to me!

Best wishes : )

unnecessary fields allocated both in solvers and in the porous models

hi @phorgue , I have run into memory problems and noticed in all your porous models you allocate all fields inside the class but then also inside the solvers. is there a reason for that? I have tested some modifications using only references to the fields with allocation happening only in the solver and it seems to work well. if you are interested I am happy to submit a pull request

Fix `SrcExt` calculation in `impesFoam` and `anisoImpesFoam`

The current implementation says:

SrcExt =  qExtraction/(Vinj+dimensionedScalar("",dimVol,SMALL));

Which works fine on test cases (injection/extraction) mainly because Vinj.value() == Vext.value() is true.

The line should spell out like:

SrcExt =  qExtraction/(Vext+dimensionedScalar("",dimVol,SMALL));

instead (Last line in createWellbores.H file)

I'm impressed no "Unused Variable" warning was issued when compiling as I can't see you disabled it anywhere, but a grep for "Vext" in "impesFoam" directory only displays the declaration, hence no using!!

I would appreciate any thoughts on this! Because I really like to think I'm "safe" against such bugs while working on OpenFOAM solvers!!

Also, I think It's better to immediately assign SrcExt value instead of init. to zero then assign
(It's not that long 😄 ):

dimensionedScalar SrcExt("SrcExt",qExtraction/(sum(Wext*mesh.V())+dimensionedScalar("",dimVol,SMALL)));

As it may reduce the risk of having such bugs; Just my opinion though.

Compilation error

Hello,
I've tried to install porousMultiphaseFoam but get the following compilation error :

g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1712 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/finiteVolume/lnInclude 	-I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/meshTools/lnInclude -IlnInclude -I. -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/OpenFOAM/lnInclude -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/OSspecific/POSIX/lnInclude   -fPIC -c darcyGradPressureAniso/darcyGradPressureAniso.C -o Make/linux64GccDPInt32Opt/darcyGradPressureAniso/darcyGradPressureAniso.o
darcyGradPressure/darcyGradPressure.C: Dans la fonction membre ‘virtual void Foam::darcyGradPressure::write(Foam::Ostream&) const’:
darcyGradPressure/darcyGradPressure.C:134:5: erreur : ‘writeEntryIfDifferent’ was not declared in this scope
     writeEntryIfDifferent<word>(os, "Mf", "Mf", MfName_);
     ^~~~~~~~~~~~~~~~~~~~~
darcyGradPressure/darcyGradPressure.C:134:31: erreur : expected primary-expression before ‘>’ token
     writeEntryIfDifferent<word>(os, "Mf", "Mf", MfName_);
                               ^

I've installed the latest 1712 OpenFoam version and the latest git porousMultiphaseFoam version. I'm using gcc-6.2.0 compilator.

Thank you

Bug in `CoatsNo.H` in anisotropic version

I believe we need to divide on mesh.V() only once here:

CFLCoats.ref() /= mesh.V();
// - capillarity part of CFL
if(activateCapillarity)
{
CFLCoats += (runTime.deltaT()/eps)*2*mag(pcModel->dpcdS())*fvc::surfaceSum(Kf*mesh.magSf()/mag(mesh.delta()))*(kra*krb/(mub*kra+mua*krb));
CFLCoats.ref() /= mesh.V();
}

This should be done in this order (With line 18 postponed after capillarity is taken into account)

// - capillarity part of CFL 
if(activateCapillarity) 
{ 
     CFLCoats += (runTime.deltaT()/eps)*2*mag(pcModel->dpcdS())*fvc::surfaceSum(Kf*mesh.magSf()/mag(mesh.delta()))*(kra*krb/(mub*kra+mua*krb)); 
}
CFLCoats.ref() /= mesh.V(); 

Let me if I'm missing anything...

Also, from what I understand, the lines

CFLUse = CFLCoats[0].component(0);
forAll(mesh.C(),celli)
{
scalar tmp0 = CFLCoats[celli].component(0);
for(int i=1; i<9 ; i++)
{
if(CFLCoats[celli].component(i)>tmp0) tmp0 = CFLCoats[celli].component(i);
}
if(CFLUse<tmp0) CFLUse = tmp0;
}

are meant to find maximal CFL value in all tensor directions. Yeah, this can be retrieved with

// I'm assuming CFLCoats is a tensorField, didn't test with it being volTensorField but I imagine .ref() would then work :)
// gMax returns a tensor of component-wise maximum values for CFLCoats in all cells
// cmptMax then returns maximal algebraic value (not in magnitude) in the tensor
// which should represent the global max in all tensor directions.
CFLUse = cmptMax(gMax(CFLCoats));

Any solutions or suggestions of Convergence problem with tetrahedral grids?

Hello, everyone
I meet the converge problem that there is no converge with the tetrahedral grids. I have tried to change the cell size, the time step dt and also I changed the CFL number, but no good results... I find a link which is discussion about the "Convergence problem with tetrahedral grids?" https://www.cfd-online.com/Forums/openfoam-solving/82696-convergence-problem-tetrahedral-grids.html
I found that somebody tried to change the solver and schemes to solve it. but there is not a reasonable solution....anybody used the tetrahedral grids and did you meet this problem?

Error when running ./Allwmake to install porousMultiphaseFoam

Hello,

I am trying to install these solvers into my v2006 version of OpenFOAM. I am running wsl on a windows 10 and using ubuntu. Every time I try to run the command: ./Allwmake, it goes through the whole process but seems to find errors at every turn. For example:

It says this a bunch of times:

In file included from /home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/finiteVolume/lnInclude/fvCFD.H:29:0, from setFieldsFromMNT.C:44: /home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/argList.H:719:14: note: declared here bool optionFound(const word& optName) const ^~~~~~~~~~~ setFieldsFromMNT.C:72:26: error: ‘class Foam::argList’ has no member named ‘option’; did you mean ‘options’? nameField = args.option("field"); ^~~~~~ setFieldsFromMNT.C:81:67: warning: ‘T Foam::argList::optionLookupOrDefault(const Foam::word&, const T&) const [with T = double]’ is deprecated: Since 2018-01; use "getOrDefault() method" [-Wdeprecated-declarations] scalar offset = args.optionLookupOrDefault<scalar>("offset",0.);

A lof of things like this:

`/home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/finiteVolume/lnInclude/fvMatrixSolve.C:325:31: note: candidate expects 0 arguments, 1 provided
make: *** [/home/jhougaard/OpenFOAM/OpenFOAM-v2006/wmake/rules/General/transform:35: /home/jhougaard/OpenFOAM/OpenFOAM-v2006/build/linux64Gcc63DPInt32Opt/pura/porousMultiphaseFoam/solvers/groundwaterTransportFoam/groundwaterTransportFoam.o] Error 1

  • wmake solvers/stationaryGroundwater2DFoam
    wmake solvers/stationaryGroundwater2DFoam
    g++ -std=c++11 -m64 -pthread -DOPENFOAM=2006 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -DFULLDEBUG -g -O0 -I/home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/finiteVolume/lnInclude -I/home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/meshTools/lnInclude -I../../libraries/porousModels/lnInclude -I../../libraries/toolsGIS/lnInclude -iquote. -IlnInclude -I/home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude -I/home/jhougaard/OpenFOAM/OpenFOAM-v2006/src/OSspecific/POSIX/lnInclude -fPIC -c stationaryGroundwater2DFoam.C -o /home/jhougaard/OpenFOAM/OpenFOAM-v2006/build/linux64Gcc63DPInt32Opt/pura/porousMultiphaseFoam/solvers/stationaryGroundwater2DFoam/stationaryGroundwater2DFoam.o
    In file included from stationaryGroundwater2DFoam.C:50:0:`

Or:
In file included from groundwaterTransportFoam.C:77:0: setDeltaT.H:160:17: error: ‘class Foam::Time’ has no member named ‘setDeltaTNoAdjust’; did you mean ‘setDeltaT’? runTime.setDeltaTNoAdjust(timeToNextEvent/nStepsToNextEvent); ^~~~~~~~~~~~~~~~~ setDeltaT.H:198:17: error: ‘class Foam::Time’ has no member named ‘setDeltaTNoAdjust’; did you mean ‘setDeltaT’? runTime.setDeltaTNoAdjust(min(runTime.deltaTValue(),timeToCloseEvent)); ^~~~~~~~~~~~~~~~~ In file included from groundwaterTransportFoam.C:106:0: setDeltaT.H:160:17: error: ‘class Foam::Time’ has no member named ‘setDeltaTNoAdjust’; did you mean ‘setDeltaT’? runTime.setDeltaTNoAdjust(timeToNextEvent/nStepsToNextEvent); ^~~~~~~~~~~~~~~~~ setDeltaT.H:198:17: error: ‘class Foam::Time’ has no member named ‘setDeltaTNoAdjust’; did you mean ‘setDeltaT’? runTime.setDeltaTNoAdjust(min(runTime.deltaTValue(),timeToCloseEvent));

Any idea what I could be doing wrong or why it's producing so many errors when I try to run ./Allwmake?

Thanks,
Jake

incompatibility with OpenFOAM 3.0.1 for impesFoam

If we compile porousMultiphaseFoam/solvers/impesFoam/SEqn.H with aforementioned version, at least the newly introduced 'boundaryFieldRef' makes trouble:
SEqn.H:9:18: Fehler: »Foam::surfaceScalarField {aka class Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>}« has no member named »boundaryFieldRef« phia.boundaryFieldRef()[patchi] = Ua.boundaryField()[patchi] & mesh.Sf().boundaryField()[patchi];

How to solve this issue without switching to porousMultiphaseFoam/commits/foam-extend/solvers/impesFoam/SEqn.H?

Développements

  • Groundwater2DFoam : ajouter la gestion de l'épaisseur mouillée minimale, pour éviter l'assèchement des cellules en transitoire d'écoulement
  • GroundwaterFoam : ajout de la condition d'infiltration transitoire homogène et sortie WaterBalance.csv
  • GroundwaterTransportFoam : à mettre à jour avec les nouvelles CL
  • GroundwaterTransport2DFoam : à développer
  • condition d'infiltration transitoire hétérogène
  • améliorer la gestion du pas de temps pour diminuer les temps de calcul
  • publication

Error on compilation

When compiling with OpenFOAM-5.0, the following error occurs:

phaseModels/incompressiblePhase/incompressiblePhase.C:54:19: error: ‘class Foam::IOobject’ has no member named ‘headerOk’

sourceEventFileWater with a time-variable injection position.

I just want to test the source function, so I changed the injection.evt file in the tutorial directory ("tutorials/impesFoam-tutorials/injectionExtraction/injection") to be

`date 0

2.0 8.1 0.5 -5e-5

2.1 8.1 0.5 -5e-5

date 20000

4.95 8.1 0.5 -5e-5

5.05 8.1 0.5 -5e-5

date 40000

8.0 8.1 0.5 -4e-5

8.10 8.1 0.5 -4e-5`

What I expect to see is that the source location changes at different time, so that when the simulation continues, the water stream location changes. It will clearly prove that the source term work. But I only see the source term at date 0 happens but the succeeding sources does not. If I change the location of date 0, it did change the location of the source.

Thank you.

porousBoundaryConditions library compiling error

Hi,

When compiling porousMultiphaseFoam master branch (I have OpenFoam6 v1806) using the steps provided on
https://openfoamwiki.net/index.php/Contrib/porousMultiphaseFoam
I encountered an error in the compiler log file.

/usr/bin/ld: cannot find -lporousBoundaryConditions
collect2: error: ld returned 1 exit status

This error is very similar to the one posted a few years back on the CFD-online forums.
https://www.cfd-online.com/Forums/openfoam-community-contributions/159443-difficulties-trying-install-porousmultiphasefoam-openfoam-windows-15-06-a.html
The compiler finishes, however the impesFoam solver is not compiled properly and so OpenFoam does not recognize the solver.

I was wondering if I am doing something wrong, and if there is a fix for this issue.

Thanks in advance,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.