|
[Sponsors] |
[waves2Foam] Problems compiling waves2foam solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2016, 22:28 |
Problems compiling waves2foam solver
|
#1 |
New Member
Kenric
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
Hello, i've been trying to use the waves2foam solver following the installation guide from https://openfoamwiki.net/index.php/Contrib/waves2Foam. However, i've get the error when i'm trying to compile the solver with wmake command. Would appreciate if I can get any help as this solver is important for my research. The error are as below:
g++ -m64 -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 -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam30/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam30/src/transportModels -I/opt/openfoam30/src/transportModels/incompressible/lnInclude -I/opt/openfoam30/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam30/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam30/src/TurbulenceModels/incompressible/lnInclude -I/opt/openfoam30/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam30/src/finiteVolume/lnInclude -I/opt/openfoam30/src/fvOptions/lnInclude -I/opt/openfoam30/src/meshTools/lnInclude -I/opt/openfoam30/src/sampling/lnInclude -DOFVERSION=300 -DEXTBRANCH=0 -DXVERSION= -I/waves2Foam/lnInclude -I/waves2FoamSampling/lnInclude -I -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -c waveFoam.C -o Make/linux64GccDPInt32Opt/waveFoam.o waveFoam.C:55:28: fatal error: relaxationZone.H: No such file or directory #include "relaxationZone.H" ^ compilation terminated. make: *** [Make/linux64GccDPInt32Opt/waveFoam.o] Error 1 Thank you. |
|
May 15, 2016, 01:55 |
Hi
|
#2 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
At a Glance, I can tell you that the header file
#include "relaxationZone.H" --> is missing from your .C and May be your solver Make/Files Do have included them, hence this conflict may arise |
|
May 15, 2016, 04:25 |
|
#3 |
New Member
Kenric
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
This is my waveFoam.C file and there is #include "relaxationZone.H" there but when i compile it it says no such file directory.
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Application interFoam Description Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. For a two-fluid approach see twoPhaseEulerFoam. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "CMULES.H" #include "EulerDdtScheme.H" #include "localEulerDdtScheme.H" #include "CrankNicolsonDdtScheme.H" #include "subCycle.H" #include "immiscibleIncompressibleTwoPhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "CorrectPhi.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" #include "relaxationZone.H" #include "externalWaveForcing.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" pimpleControl pimple(mesh); #include "createTimeControls.H" #include "createRDeltaT.H" #include "initContinuityErrs.H" #include "readGravitationalAcceleration.H" #include "readWaveProperties.H" #include "createExternalWaveForcing.H" #include "createFields.H" #include "createMRF.H" #include "createFvOptions.H" #include "correctPhi.H" if (!LTS) { #include "readTimeControls.H" #include "CourantNo.H" #include "setInitialDeltaT.H" } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { #include "readTimeControls.H" if (LTS) { #include "setRDeltaT.H" } else { #include "CourantNo.H" #include "alphaCourantNo.H" #include "setDeltaT.H" } runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; externalWave->step(); // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { #include "alphaControls.H" #include "alphaEqnSubCycle.H" relaxing.correct(); mixture.correct(); #include "UEqn.H" // --- Pressure corrector loop while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { turbulence->correct(); } } runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } // Close down the external wave forcing in a nice manner externalWave->close(); Info<< "End\n" << endl; return 0; } // ************************************************** *********************** // |
|
May 15, 2016, 06:22 |
|
#4 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
Can you post the Make/Files & Options too?
|
|
May 15, 2016, 22:27 |
|
#5 |
New Member
Kenric
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
this is the make files
waveFoam.C EXE = $(FOAM_APPBIN)/waveFoam whereas this is the options file EXE_INC = \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -DOFVERSION=300 \ -DEXTBRANCH=0 \ -DXVERSION=$(WAVES_XVERSION) \ -I$(WAVES_SRC)/waves2Foam/lnInclude \ -I$(WAVES_SRC)/waves2FoamSampling/lnInclude \ -I$(WAVES_GSL_INCLUDE) EXE_LIBS = \ -limmiscibleIncompressibleTwoPhaseMixture \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ -lsampling \ -L$(WAVES_LIBBIN) \ -lwaves2Foam \ -lwaves2FoamSampling \ -L$(WAVES_GSL_LIB) \ -lgsl \ -lgslcblas Really thank you for your time sir. |
|
May 16, 2016, 07:36 |
Hi Kenric
|
#6 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
It looks like
a. In Make/files: Do not make the executable named waveFoam, unless you want to overwrite the non-meshmoving solver. Furthermore, place the executable in FOAM_USER_APPBIN instead of FOAM_APPBIN b. Make sure all the paths mentioned in your make files/options are intact. |
|
March 22, 2018, 04:43 |
W2F installation
|
#7 |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 9 |
I was installing Wave2Foam but failed to excute Allwmake in wave2Foam folder at the last step.
it reporting the following msg: ben@ben:~/waves2Foam$ ./Allwmake ===================================== ENVIRONMENTAL VARIABLES ===================================== EXTBRANCH=0 FOAMEXTENDPROJECT=0 OFPLUSBRANCH=0 WAVES_APPBIN=/home/ben/OpenFOAM/ben-4.1/platforms/linux64GccDPInt32Opt/bin WAVES_DIR=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam WAVES_GSL_INCLUDE=/usr/include WAVES_GSL_LIB=/usr/lib64 WAVES_LIBBIN=/home/ben/OpenFOAM/ben-4.1/platforms/linux64GccDPInt32Opt/lib WAVES_POST=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/applications/utilities/postProcessing WAVES_PRE=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/applications/utilities/preProcessing WAVES_SOL=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/applications/solvers/solvers410 WAVES_SRC=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/src WAVES_TUT=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/tutorials WAVES_UTIL=/home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam/applications/utilities WAVES_XVERSION=0 WM_PROJECT_VERSION_NUMBER=410 FATAL ERROR. The directory path /home/ben/OpenFOAM/ben-4.1/applications/utilities/waves2Foam does not exist. Correct the path in bin/bashrc This means that you should correct the environmental variable $WAVES_DIR such that it is pointed (in absolute sense) to the path, where waves2Foam is located. Please note that once bin/bashrc is created, bin/bashrc.org is only an inactive file. The latter is also the only of the two files, which is updated through the SVN-repository. EXITING Would appreciate your support. Thx! |
|
July 13, 2020, 23:40 |
|
#8 |
New Member
LinxiaoJin
Join Date: Jul 2020
Posts: 2
Rep Power: 0 |
hello,Have you solved this problem? Because I have a similar problem.
|
|
August 2, 2020, 02:04 |
|
#9 |
Member
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 35
Rep Power: 11 |
You need to be in the waves2Foam directory and then do ./Allwmake again. The reason for the error is that it cannot find the relaxationZones.H unless you are at the correct path. I had a similar issue when I was trying to compile the code and its no longer an issue.
hth Regards, Akshay |
|
August 4, 2020, 00:25 |
|
#10 |
New Member
LinxiaoJin
Join Date: Jul 2020
Posts: 2
Rep Power: 0 |
Thank you very much for your response, I have resolved the issue.
|
|
August 14, 2020, 12:28 |
Compling error for wave2foam
|
#11 |
New Member
irwin
Join Date: Apr 2014
Location: New Delhi, India
Posts: 19
Rep Power: 12 |
I have been trying to compile wave2foam however getting stuck at several points . Kindly look into the error and please suggest .
irwin@irwin-Precision-Tower-3420:~/OpenFOAM/irwin-dev/applications/utilities/waves2Foam$ ./Allwmake dev ===================================== COMPILE SOLVERS ===================================== ls: cannot access '/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/applications/solvers/solversde_PLUS/*': No such file or directory ===================================== COMPILE PRE-PROCESSING ===================================== ./Allwmake: line 123: [: de: integer expression expected ./Allwmake: line 123: [: de: integer expression expected ./Allwmake: line 123: [: de: integer expression expected wmake faceSetToSTL make[1]: Entering directory '/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL' Making dependency list for source file faceSetToSTL.C could not open file foamTime.H for source file faceSetToSTL.C due to No such file or directory could not open file faceTriangulation.H for source file faceSetToSTL.C due to No such file or directory could not open file triSurface.H for source file faceSetToSTL.C due to No such file or directory g++ -std=c++14 -m64 -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/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/meshTools/lnInclude -I/opt/openfoam-dev/src/surfMesh/lnInclude -I/opt/openfoam-dev/src/finiteVolume/lnInclude -DOFVERSION=de -DEXTBRANCH=1 -IlnInclude -I. -I/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/OSspecific/POSIX/lnInclude -fPIC -c faceSetToSTL.C -o Make/linux64GccDPInt32Opt/faceSetToSTL.o faceSetToSTL.C:56:10: fatal error: faceTriangulation.H: No such file or directory #include "faceTriangulation.H" ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. /opt/openfoam-dev/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/faceSetToSTL.o' failed make[1]: *** [Make/linux64GccDPInt32Opt/faceSetToSTL.o] Error 1 make[1]: Leaving directory '/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL' /opt/openfoam-dev/wmake/makefiles/apps:39: recipe for target 'faceSetToSTL' failed make: *** [faceSetToSTL] Error 2 ===================================== COMPILE POST-PROCESSING ===================================== ./Allwmake: line 170: [: de: integer expression expected wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries: wmakeLnInclude error: base directory /home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/src/waves2Foam/src/ does not exist Making dependency list for source file postProcessWaves2Foam.C could not open file foamTime.H for source file postProcessWaves2Foam.C due to No such file or directory g++ -std=c++14 -m64 -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/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/meshTools/lnInclude -I/opt/openfoam-dev/src/finiteVolume/lnInclude -I/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/src/waves2Foam/src/lnInclude -I/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/src/waves2FoamProcessing/lnInclude -I/usr/include -DOFVERSION=de -DEXTBRANCH=1 -IlnInclude -I. -I/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/OSspecific/POSIX/lnInclude -fPIC -c postProcessWaves2Foam.C -o Make/linux64GccDPInt32Opt/postProcessWaves2Foam.o g++ -std=c++14 -m64 -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/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/meshTools/lnInclude -I/opt/openfoam-dev/src/finiteVolume/lnInclude -I/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/src/waves2Foam/src/lnInclude -I/home/irwin/OpenFOAM/irwin-dev/applications/utilities/waves2Foam/src/waves2FoamProcessing/lnInclude -I/usr/include -DOFVERSION=de -DEXTBRANCH=1 -IlnInclude -I. -I/opt/openfoam-dev/src/OpenFOAM/lnInclude -I/opt/openfoam-dev/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/postProcessWaves2Foam.o -L/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/lib \ -lOpenFOAM -lfiniteVolume -L/home/irwin/OpenFOAM/irwin-dev/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -lwaves2FoamProcessing -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/irwin/OpenFOAM/irwin-dev/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam /usr/bin/ld.bfd: cannot find -lwaves2Foam /usr/bin/ld.bfd: cannot find -lwaves2FoamProcessing collect2: error: ld returned 1 exit status /opt/openfoam-dev/wmake/makefiles/general:140: recipe for target '/home/irwin/OpenFOAM/irwin-dev/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam' failed make: *** [/home/irwin/OpenFOAM/irwin-dev/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam] Error 1 ===================================== COMPILE BREEDER ===================================== ./Allwmake: line 194: [: de: integer expression expected Nothing available for compilation in the breeder directory. ===================================== COMPILATION DONE ===================================== irwin@irwin-Precision-Tower-3420:~/OpenFOAM/irwin-dev/applications/utilities/waves2Foam$ |
|
August 14, 2020, 21:39 |
|
#12 |
Member
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 35
Rep Power: 11 |
Hi Irwin,
You need to copy the solvers_1912 folder to your correct solvers_<yourVersion> and then compile from the right place. The compiler solvers section should be fixed if you do that. The reason why it complains is that it cannot find the the right solver folder. |
|
January 2, 2021, 01:48 |
|
#13 | |
New Member
Join Date: Jan 2021
Posts: 5
Rep Power: 5 |
Quote:
Hi Akshay, I have compiled waves2Foam without reporting the errors. But when I type 'waveFoam' in my console, it says 'waveFoam: command not found'. below is part of my setting in the waves2Foam/bin bashrc file; ### USER DEFINED ENVIRONMENTAL VARIABLES export WAVES_DIR=$HOME/OpenFOAM/OpenFOAM-v2012/applications/utilities/waves2Foam export WAVES_APPBIN=$FOAM_USER_APPBIN export WAVES_LIBBIN=$FOAM_USER_LIBBIN export WAVES_GSL_INCLUDE=/usr/include export WAVES_GSL_LIB=/usr/lib64 Could you have any idea about the problem i encounter, pls? thk a lot jie |
||
January 2, 2021, 02:39 |
Copy Solvers to the version
|
#14 |
Member
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 35
Rep Power: 11 |
You need to copy the solvers from "applications/solvers/solvers1812_PLUS" to "applications/solvers/solvers2012_PLUS". That is my best guess!
If you can confirm whenever you compile something make sure you do something like "./Allwmake > make.log" , this way you can confirm that the solvers have been compiled and there were no errors. Happy to help! |
|
January 2, 2021, 03:46 |
|
#15 |
New Member
Join Date: Jan 2021
Posts: 5
Rep Power: 5 |
Hi Akshay,
Thanks very much for your prompt reply. Following your suggestion, i have copied the solvers from "applications/solvers/solvers1812_PLUS" to "applications/solvers/solvers2012_PLUS". I then type "./Allwmake > make.log. There is still no error in my console, but only a failure info in the section "COMPILE SOVERS" of 'make.log', which says "/home/user/OpenFOAM/OpenFOAM-v2012/wmake/rules/General/transform:34: recipe for target '/home/user/OpenFOAM/OpenFOAM-v2012/build/linux64GccDPInt32Opt/applications/utilities/waves2Foam/applications/solvers/solvers2012_PLUS/waveIsoFoam/waveIsoFoam.o' failed" I then go to the tutorial folder of waves2Foam, e.g., /home/user/OpenFOAM/OpenFOAM-v2012/applications/utilities/waves2Foam/tutorials/waveFoam, and type './Allrun'. the problem still occurs, and in the file 'log.waveFoam', it says, Hi --> FOAM FATAL IO ERROR: (openfoam-2012) Entry 'inletCoeffs' not found in dictionary "/home/user/OpenFOAM/OpenFOAM-v2012/applications/utilities/waves2Foam/tutorials/waveFoam/standingWave/constant/waveProperties" file: /home/user/OpenFOAM/OpenFOAM-v2012/applications/utilities/waves2Foam/tutorials/waveFoam/standingWave/constant/waveProperties at line 17 to 21. From const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&, Foam::keyType:ption) const in file db/dictionary/dictionary.C at line 537. FOAM exiting" As the tutorial files are well prepared by others, i assume the problem is still from my side, where i could make something wrong in compiling the waves2Foam. Hope to hear your future instructions, many thanks again Akshay, jie |
|
January 2, 2021, 03:58 |
|
#16 |
New Member
Join Date: Jan 2021
Posts: 5
Rep Power: 5 |
Hi Akshay,
another thing is that after i have copied the solvers from "applications/solvers/solvers1812_PLUS" to "applications/solvers/solvers2012_PLUS", and re-compiled, when I type "waveFoam", now my console shows that "--> FOAM FATAL ERROR: (openfoam-2012) cannot find file "/home/user/OpenFOAM/OpenFOAM-v2012/applications/utilities/waves2Foam/system/controlDict" From virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 547. " instead of the previous command of 'waveFoam: command not found'. jie |
|
Tags |
waves2foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
diffusivity selection for modified displacementLaplacian solver for FSI problems | zhaozhenkai | OpenFOAM Running, Solving & CFD | 2 | November 11, 2016 06:41 |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
problem while compiling new solver | vipin1431 | Main CFD Forum | 0 | July 8, 2015 08:41 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |