CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Difficulty in compiling wave2foam on openfoam3.0.0

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2016, 06:09
Default Difficulty in compiling wave2foam on openfoam3.0.0
  #1
Member
 
Manoj
Join Date: Jun 2013
Posts: 38
Rep Power: 14
manoj_nav is on a distinguished road
When I try to compile waves2Foam on Openfoan3.0.0 platform I get following error,

Code:
Making dependency list for source file waveDyMFoam.C
could not open file relaxationZone.H for source file waveDyMFoam.C due to No such file or directory
could not open file readWaveProperties.H for source file waveDyMFoam.C due to No such file or directory
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.. -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/dynamicMesh/lnInclude -I/opt/openfoam30/src/dynamicFvMesh/lnInclude -I./../../../../../src/waves2Foam/lnInclude -I/opt/openfoam30/src/meshTools/lnInclude -I/opt/openfoam30/src/fvOptions/lnInclude -I/opt/openfoam30/src/sampling/lnInclude -L/home/manoj/OpenFOAM/manoj-3.0.0/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude   -fPIC -c waveDyMFoam.C -o Make/linux64GccDPInt32Opt/waveDyMFoam.o
waveDyMFoam.C:50:28: fatal error: relaxationZone.H: No such file or directory
compilation terminated.
/opt/openfoam30/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/waveDyMFoam.o' failed
make: *** [Make/linux64GccDPInt32Opt/waveDyMFoam.o] Error 1
'waveDyMfoam/Make/options' content is:

Code:
EXE_INC = \     -I.. \     -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/incompressible/turbulenceModel \     -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \     -I$(LIB_SRC)/finiteVolume/lnInclude \     -I$(LIB_SRC)/dynamicMesh/lnInclude \     -I$(LIB_SRC)/dynamicFvMesh/lnInclude \     -I./../../../../../src/waves2Foam/lnInclude \     -I$(LIB_SRC)/meshTools/lnInclude \     -I$(LIB_SRC)/fvOptions/lnInclude \     -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \     -limmiscibleIncompressibleTwoPhaseMixture \     -lincompressibleTurbulenceModel \     -lincompressibleRASModels \     -lincompressibleLESModels \     -lfiniteVolume \     -ldynamicMesh \     -ldynamicFvMesh \     -ltopoChangerFvMesh \     -lmeshTools \     -lfvOptions \     -lsampling \     -L$(FOAM_USER_LIBBIN) \     -lwaves2Foam
Please help.

Regards,

Manoj
manoj_nav is offline   Reply With Quote

Old   March 18, 2016, 07:50
Default
  #2
New Member
 
Muhammad Nouman Khalid
Join Date: Mar 2016
Posts: 6
Rep Power: 11
k.nomi is on a distinguished road
Hi Manoj,

it's because waves2Foam is not compatible with OpenFoam 3.0. You should downgrade your version of OpenFOAM to 2.4 or lower if you want to compile waves2Foam with it.

Khalid
k.nomi is offline   Reply With Quote

Old   March 18, 2016, 18:35
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 38
ngj will become famous soon enoughngj will become famous soon enough
Hallo Manoj and Khalid,

waves2Foam does compile with OF3.0! The problem is the include statements due to ill-defined paths in Make/options. Please use waveFoam as inspiration for prober definition of the options file.

Warning: you have likely used the instructions on the Wiki, but it is clearly stated that they are outdated (in the detail), so also see modifications in waveFoam to get a correct version of waveDyMFoam.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 22, 2016, 07:06
Default
  #4
Member
 
Manoj
Join Date: Jun 2013
Posts: 38
Rep Power: 14
manoj_nav is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hallo Manoj and Khalid,

waves2Foam does compile with OF3.0! The problem is the include statements due to ill-defined paths in Make/options. Please use waveFoam as inspiration for prober definition of the options file.

Warning: you have likely used the instructions on the Wiki, but it is clearly stated that they are outdated (in the detail), so also see modifications in waveFoam to get a correct version of waveDyMFoam.

Kind regards,

Niels
Hi Niels, Thanks a lot for the reply.

I have included missing header files individually. Now I am getting following error

waveDyMFoam.C:130:43: error: ‘ghRef’ was not declared in this scope
gh = (g & mesh.C()) - ghRef;

Code:
Making dependency list for source file waveDyMFoam.C
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.. -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/dynamicMesh/lnInclude -I/opt/openfoam30/src/dynamicFvMesh/lnInclude -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/include -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/lnInclude -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/convexPolyhedral -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/numericalBeach -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/waveTheories/waveTheory -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationShape -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationWeight -I/home/manoj/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationScheme -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 -L/home/manoj/OpenFOAM/manoj-3.0.0/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude   -fPIC -c waveDyMFoam.C -o Make/linux64GccDPInt32Opt/waveDyMFoam.o
waveDyMFoam.C: In function ‘int main(int, char**)’:
waveDyMFoam.C:130:43: error: ‘ghRef’ was not declared in this scope
                     gh = (g & mesh.C()) - ghRef;
                                           ^
/opt/openfoam30/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/waveDyMFoam.o' failed
make: *** [Make/linux64GccDPInt32Opt/waveDyMFoam.o] Error 1
My option file is

Code:
EXE_INC = \
    -I.. \
    -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)/dynamicMesh/lnInclude \
    -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/include \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/lnInclude \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/convexPolyhedral \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/numericalBeach \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/waveTheories/waveTheory \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationShape \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationWeight \
    -I$(HOME)/OpenFOAM/manoj-3.0.0/applications/solvers/waves2Foam/src/waves2Foam/relaxationZone/relaxationScheme \
    -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) \
    -L$(FOAM_USER_LIBBIN) \
    -lwaves2Foam

EXE_LIBS = \
    -limmiscibleIncompressibleTwoPhaseMixture \
    -lturbulenceModels \
    -lincompressibleTurbulenceModels \
    -lfiniteVolume \
    -lfvOptions \
    -lmeshTools \
    -lsampling \
    -L$(WAVES_LIBBIN) \
    -lwaves2Foam \
    -lwaves2FoamSampling \
    -L$(WAVES_GSL_LIB) \
    -lgsl \
    -lgslcblas
Kindly help me to understand the error and compile the solver.

Regards,

Manoj
manoj_nav is offline   Reply With Quote

Old   March 22, 2016, 10:40
Default
  #5
Member
 
Manoj
Join Date: Jun 2013
Posts: 38
Rep Power: 14
manoj_nav is on a distinguished road
Hi, where is ghRef defined? If anyone can let me know..

Regards,

Manoj
manoj_nav is offline   Reply With Quote

Old   March 23, 2016, 04:47
Default
  #6
Member
 
Manoj
Join Date: Jun 2013
Posts: 38
Rep Power: 14
manoj_nav is on a distinguished road
Hi,

I am new to compiling codes.

I found that ghRef is defined in gh.H .

After including this in my code, I am now getting following error.

Code:
 In file included from waveDyMFoam.C:69:0:
../createFields.H: In function ‘int main(int, char**)’:
../createFields.H:83:18: error: redeclaration of ‘Foam::volScalarField gh’
 volScalarField gh("gh", g & (mesh.C() - referencePoint));
                  ^
In file included from waveDyMFoam.C:63:0:
/opt/openfoam30/src/finiteVolume/lnInclude/gh.H:8:20: note: ‘Foam::volScalarField gh’ previously declared here
     volScalarField gh("gh", (g & mesh.C()) - ghRef);
                    ^
In file included from waveDyMFoam.C:69:0:
../createFields.H:84:23: error: redeclaration of ‘Foam::surfaceScalarField ghf’
 surfaceScalarField ghf("ghf", g & (mesh.Cf() - referencePoint));
                       ^
In file included from waveDyMFoam.C:63:0:
/opt/openfoam30/src/finiteVolume/lnInclude/gh.H:9:24: note: ‘Foam::surfaceScalarField ghf’ previously declared here
     surfaceScalarField ghf("ghf", (g & mesh.Cf()) - ghRef);
Please help me to correct it.

Regards,

Manoj
manoj_nav is offline   Reply With Quote

Old   March 24, 2016, 03:49
Default
  #7
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 38
ngj will become famous soon enoughngj will become famous soon enough
Hallo Manoj,

You are defining the gravitational fields twice in createFields.H. Furthermore, since OF3.0, a reference level has been introduced in the standard solvers. You will have to decide on which definition of the reference level you want, i.e. the reference level from OF3.0 or the reference level from waves2Foam.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 27, 2016, 13:07
Default
  #8
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 11
mo_na is on a distinguished road
Hey Manoj,

I am trying to do the same as you. I was wondering if you have any new achievements with the compilation and can maybe share how you did it finally.

Thank you!
Mona
mo_na is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OpenFOAM.org] Compiling OpenFOAM 5.0 on the Titan Supercomputer wildfire230 OpenFOAM Installation 20 May 6, 2020 08:30
[OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi foamer123 OpenFOAM Installation 9 August 20, 2015 15:03
Compiling difficulty for dynamicTopoFvMesh-port2.2.x in openfoam220 Detian Liu OpenFOAM Installation 4 January 13, 2014 17:11
difficulty with paraview compiling linch OpenFOAM Installation 10 October 14, 2010 08:28
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40


All times are GMT -4. The time now is 21:11.