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

Issues while solving with OpenFOAM 8.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2021, 05:08
Default Issues while solving with OpenFOAM 8.0
  #1
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 15
sihaqqi is on a distinguished road
I am trying to follow a tutorial called "Transient simulation of opening and closing guide vanes of a hydraulic turbine" which I downloaded from Chalmers OpenFOAM course website. The problem is it was prepared using OpenFOAM 2.4.x whereas I have installed OpenFOAM 8.0 from openfoam.org

When I use the command wmake libso on Page 21 of the attached file, I get the error given below. I assume that it is because OpenFOAM has undergone changes ever since 2.4 and I am in the phase of learning C++ but unfortunately I am quite far from resolving this klind of technical issue. Would appreciate advise which can resolve this issue.

wmake libso .
g++ -std=c++11 -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 -IOAM_SRC/triSurface/lnInclude -IOAM_SRC/meshTools/lnInclude -IOAM_SRC/dynamicMesh/lnInclude -IOAM_SRC/finiteVolume/lnInclude -IOAM_SRC/fvMotionSolver/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c librotationVelocityPointPatchVectorField.C -o Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o
librotationVelocityPointPatchVectorField.C: In member function ‘virtual void Foam::librotationVelocityPointPatchVectorField::up dateCoeffs()’:
librotationVelocityPointPatchVectorField.C:195:1: error: qualified-id in declaration before ‘(’ token
(
^
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/typeInfo.H:57:0,
from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:49,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UListIO.C:28,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.C:233,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.H:490,
from /opt/openfoam8/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam8/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatch.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:45,
from /opt/openfoam8/src/OpenFOAM/lnInclude/valuePointPatchField.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/fixedValuePointPatchField.H:38,
from librotationVelocityPointPatchVectorField.H:38,
from librotationVelocityPointPatchVectorField.C:26:
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:91:38: error: qualified-id in declaration before ‘(’ token
const ::Foam::word Type::typeName(Name)
^
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:95:5: note: in expansion of macro ‘defineTypeNameWithName’
defineTypeNameWithName(Type, Type::typeName_())
^~~~~~~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:120:5: note: in expansion of macro ‘defineTypeName’
defineTypeName(Type); \
^~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:528:5: note: in expansion of macro ‘defineTypeNameAndDebug’
defineTypeNameAndDebug(typePatchTypeField, 0); \
^~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C:219:1: note: in expansion of macro ‘makePointPatchTypeField’
makePointPatchTypeField
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/className.H:32:0,
from /opt/openfoam8/src/OpenFOAM/lnInclude/typeInfo.H:57,
from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:49,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UListIO.C:28,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.C:233,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.H:490,
from /opt/openfoam8/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam8/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatch.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:45,
from /opt/openfoam8/src/OpenFOAM/lnInclude/valuePointPatchField.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/fixedValuePointPatchField.H:38,
from librotationVelocityPointPatchVectorField.H:38,
from librotationVelocityPointPatchVectorField.C:26:
/opt/openfoam8/src/OpenFOAM/lnInclude/defineDebugSwitch.H:108:20: error: qualified-id in declaration before ‘(’ token
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
^
/opt/openfoam8/src/OpenFOAM/lnInclude/defineDebugSwitch.H:112:5: note: in expansion of macro ‘defineDebugSwitchWithName’
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch); \
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:121:5: note: in expansion of macro ‘defineDebugSwitch’
defineDebugSwitch(Type, DebugSwitch)
^~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:528:5: note: in expansion of macro ‘defineTypeNameAndDebug’
defineTypeNameAndDebug(typePatchTypeField, 0); \
^~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C:219:1: note: in expansion of macro ‘makePointPatchTypeField’
makePointPatchTypeField
^~~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C: At global scope:
librotationVelocityPointPatchVectorField.C:227:1: error: expected ‘}’ at end of input
} // End namespace Foam
^
/opt/openfoam8/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o' failed
make: *** [Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o] Error 1
sihaqqi is offline   Reply With Quote

Old   January 29, 2021, 02:19
Default
  #2
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
if you don't have any idea on how to solve that issue,
i would recommend to install the same version which was used to implement this solver/library.
you can install as many versions as there are without disturbing any installed version. you can just switch the environment by terminal commands.
geth03 is offline   Reply With Quote

Old   January 29, 2021, 16:50
Default
  #3
Member
 
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 9
random_ran is on a distinguished road
Quote:
Originally Posted by sihaqqi View Post
I am trying to follow a tutorial called "Transient simulation of opening and closing guide vanes of a hydraulic turbine" which I downloaded from Chalmers OpenFOAM course website. The problem is it was prepared using OpenFOAM 2.4.x whereas I have installed OpenFOAM 8.0 from openfoam.org

When I use the command wmake libso on Page 21 of the attached file, I get the error given below. I assume that it is because OpenFOAM has undergone changes ever since 2.4 and I am in the phase of learning C++ but unfortunately I am quite far from resolving this klind of technical issue. Would appreciate advise which can resolve this issue.

wmake libso .
g++ -std=c++11 -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 -IOAM_SRC/triSurface/lnInclude -IOAM_SRC/meshTools/lnInclude -IOAM_SRC/dynamicMesh/lnInclude -IOAM_SRC/finiteVolume/lnInclude -IOAM_SRC/fvMotionSolver/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude -fPIC -c librotationVelocityPointPatchVectorField.C -o Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o
librotationVelocityPointPatchVectorField.C: In member function ‘virtual void Foam::librotationVelocityPointPatchVectorField::up dateCoeffs()’:
librotationVelocityPointPatchVectorField.C:195:1: error: qualified-id in declaration before ‘(’ token
(
^
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/typeInfo.H:57:0,
from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:49,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UListIO.C:28,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.C:233,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.H:490,
from /opt/openfoam8/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam8/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatch.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:45,
from /opt/openfoam8/src/OpenFOAM/lnInclude/valuePointPatchField.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/fixedValuePointPatchField.H:38,
from librotationVelocityPointPatchVectorField.H:38,
from librotationVelocityPointPatchVectorField.C:26:
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:91:38: error: qualified-id in declaration before ‘(’ token
const ::Foam::word Type::typeName(Name)
^
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:95:5: note: in expansion of macro ‘defineTypeNameWithName’
defineTypeNameWithName(Type, Type::typeName_())
^~~~~~~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:120:5: note: in expansion of macro ‘defineTypeName’
defineTypeName(Type); \
^~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:528:5: note: in expansion of macro ‘defineTypeNameAndDebug’
defineTypeNameAndDebug(typePatchTypeField, 0); \
^~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C:219:1: note: in expansion of macro ‘makePointPatchTypeField’
makePointPatchTypeField
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/className.H:32:0,
from /opt/openfoam8/src/OpenFOAM/lnInclude/typeInfo.H:57,
from /opt/openfoam8/src/OpenFOAM/lnInclude/token.H:49,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UListIO.C:28,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.C:233,
from /opt/openfoam8/src/OpenFOAM/lnInclude/UList.H:490,
from /opt/openfoam8/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam8/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatch.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:45,
from /opt/openfoam8/src/OpenFOAM/lnInclude/valuePointPatchField.H:38,
from /opt/openfoam8/src/OpenFOAM/lnInclude/fixedValuePointPatchField.H:38,
from librotationVelocityPointPatchVectorField.H:38,
from librotationVelocityPointPatchVectorField.C:26:
/opt/openfoam8/src/OpenFOAM/lnInclude/defineDebugSwitch.H:108:20: error: qualified-id in declaration before ‘(’ token
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
^
/opt/openfoam8/src/OpenFOAM/lnInclude/defineDebugSwitch.H:112:5: note: in expansion of macro ‘defineDebugSwitchWithName’
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch); \
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/className.H:121:5: note: in expansion of macro ‘defineDebugSwitch’
defineDebugSwitch(Type, DebugSwitch)
^~~~~~~~~~~~~~~~~
/opt/openfoam8/src/OpenFOAM/lnInclude/pointPatchField.H:528:5: note: in expansion of macro ‘defineTypeNameAndDebug’
defineTypeNameAndDebug(typePatchTypeField, 0); \
^~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C:219:1: note: in expansion of macro ‘makePointPatchTypeField’
makePointPatchTypeField
^~~~~~~~~~~~~~~~~~~~~~~
librotationVelocityPointPatchVectorField.C: At global scope:
librotationVelocityPointPatchVectorField.C:227:1: error: expected ‘}’ at end of input
} // End namespace Foam
^
/opt/openfoam8/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o' failed
make: *** [Make/linux64GccDPInt32Opt/librotationVelocityPointPatchVectorField.o] Error 1
Please do install OpenFOAM 2.4.x and test it. The code changed a lot over the years.
__________________
Yours in CFD,

Ran
random_ran is offline   Reply With Quote

Reply

Tags
compilation error, wmake


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
Suppress twoPhaseEulerFoam energy AlmostSurelyRob OpenFOAM Running, Solving & CFD 33 September 25, 2018 17:45
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 05:07
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 01:18.