CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   viscoelasticinterfoam installation error (https://www.cfd-online.com/Forums/openfoam-programming-development/127715-viscoelasticinterfoam-installation-error.html)

thejaraju December 18, 2013 06:35

viscoelasticinterfoam installation error
 
Hi foamers

This theja from bangalore,

as i am working on the viscoelasticinterfoam to install this are the error generated during the installation

Code:

theja@theja:~/OpenFOAM/OpenFOAM-2.2.x/applications/solvers/viscoelasticInterFoam$ wmake && cd -
Making dependency list for source file viscoelasticInterFoam.C
SOURCE=viscoelasticInterFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/transportModels -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/incompressible/lnInclude -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/transportModels/interfaceProperties/lnInclude -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/meshTools/cellDist -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/fvMesh/wallDist -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -I./../viscoelasticTwoPhaseModels/lnInclude  -IlnInclude -I. -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/viscoelasticInterFoam.o
In file included from viscoelasticInterFoam.C:75:0:
alphaEqnSubCycle.H: In function ‘int main(int, char**)’:
alphaEqnSubCycle.H:3:15: error: ‘piso’ was not declared in this scope
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:6:15: warning: unused variable ‘nCorr’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
/home/theja/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/viscoelasticInterFoam.o] Error 1
theja@theja:~/OpenFOAM/OpenFOAM-2.2.x/applications/solvers/viscoelasticInterFoam$ ^C
theja@theja:~/OpenFOAM/OpenFOAM-2.2.x/applications/solvers/viscoelasticInterFoam$

So please help me in sorting out the error

Thanking you in advance

Thejaraju

wyldckat December 25, 2013 13:30

Hi thejaraju,

Without access to the source code, it's a bit complicated to help you.

Nonetheless, given the error message, it seems that the problem is related to a change made in the way the "piso" variable was created in the past in older OpenFOAM versions and how it is created now in the current versions.

For example, if I run this command from the "~/OpenFOAM" folder, where I have all of my installations:
Code:

diff -Nur OpenFOAM-1.7.x/src/finiteVolume/cfdTools/general/include/readPISOControls.H OpenFOAM-2.2.x/src/finiteVolume/cfdTools/general/include/readPISOControls.H
I get this output:
Code:

--- OpenFOAM-1.7.x/src/finiteVolume/cfdTools/general/include/readPISOControls.H    2010-10-31 11:54:06.000000000 +0000
+++ OpenFOAM-2.2.x/src/finiteVolume/cfdTools/general/include/readPISOControls.H    2013-03-09 23:25:49.000000000 +0000
@@ -1,15 +1,17 @@
-    dictionary piso = mesh.solutionDict().subDict("PISO");
+    const dictionary& pisoDict = mesh.solutionDict().subDict("PISO");
 
-    int nCorr(readInt(piso.lookup("nCorrectors")));
+    const int nOuterCorr =
+        pisoDict.lookupOrDefault<int>("nOuterCorrectors", 1);
 
-    int nNonOrthCorr =
-        piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
+    const int nCorr =
+        pisoDict.lookupOrDefault<int>("nCorrectors", 1);
 
-    bool momentumPredictor =
-        piso.lookupOrDefault<Switch>("momentumPredictor", true);
+    const int nNonOrthCorr =
+        pisoDict.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
 
-    bool transonic =
-        piso.lookupOrDefault<Switch>("transonic", false);
+    const bool momentumPredictor =
+        pisoDict.lookupOrDefault("momentumPredictor", true);
+
+    const bool transonic =
+        pisoDict.lookupOrDefault("transonic", false);
 
-    int nOuterCorr =
-        piso.lookupOrDefault<int>("nOuterCorrectors", 1);

As you can see, the variable name "piso" has been changed to "pisoDict". Similarly, several other variables were renamed as well, as shown in the comparison of lines that start with a minus "-" and those with a plus "+".

Best regards,
Bruno

arash.heidarian April 13, 2015 14:02

???\
 
what is gamma in this solver?

Supersale April 16, 2015 03:55

Quote:

Originally Posted by arash.heidarian (Post 541498)
what is gamma in this solver?

I think this is the liquid phase? alpha1 in newer versions

arash.heidarian April 17, 2015 10:22

thank you..
yes it is alpha1...
my problem is how adjust the transportproperties file...

Supersale April 19, 2015 20:39

I have found one case file for this solver on sourceforge (http://sourceforge.net/projects/viscoelasticof/). In this case file the transportProperties file is the same as for interFoam, but there is a viscoelasticProperties file. If you happen to have another case file for this solver, please share as i, too, am struggling to make sense of all of this :D


All times are GMT -4. The time now is 19:50.