phorgue / porousmultiphasefoam Goto Github PK
View Code? Open in Web Editor NEWA porous multiphase toolbox for OpenFOAM
License: Other
A porous multiphase toolbox for OpenFOAM
License: Other
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
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
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
Develop new solver coupling groundwater2DFoam with porousScalarTransport2DFoam
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
?
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.
I believe we need to divide on mesh.V()
only once here:
porousMultiphaseFoam/solvers/anisoImpesFoam/CoatsNo.H
Lines 18 to 25 in bd371c9
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
porousMultiphaseFoam/solvers/anisoImpesFoam/CoatsNo.H
Lines 28 to 40 in bd371c9
// 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));
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?
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.
Update solver with last improvements of porousScalarTransportFoam and groundwaterFoam
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
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’
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.
Does this supports OpenFOAM dynamicMesh? Thanks
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 : )
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,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.