View Issue Details

IDProjectCategoryView StatusLast Update
0004112OpenFOAMBugpublic2024-07-11 10:28
Reporteragustinvo Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version22.04
Product Version11 
Summary0004112: Can't compile Reynolds stress tensor models
DescriptionI am using the compiled Ubuntu version 20240612, and I am trying to compile a new Reynolds stress model. I have copied-pasted an existing model and tried to compile it, but I get the next error. It is like if some headers where missing, but I can't explain why it is compiled by the original installation but not mine.

wmake momentumTransportModels
wmake incompressible
Making dependency list for source file incompressibleMomentumTransportModels.C
g++ -std=c++14 -m64 -DLIB_NAME=libmyIncompressibleMomentumTransportModels.so -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/openfoam11/src/MomentumTransportModels/incompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I../momentumTransportModels/lnInclude -I/opt/openfoam11/src/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -c incompressibleMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/incompressibleMomentumTransportModels.o
In file included from ../momentumTransportModels/lnInclude/ManceauEBRSM.H:228,
                 from incompressibleMomentumTransportModels.C:34:
../momentumTransportModels/lnInclude/ManceauEBRSM.C: In member function ‘virtual void Foam::RASModels::ManceauEBRSM<BasicMomentumTransportModel>::correct()’:
../momentumTransportModels/lnInclude/ManceauEBRSM.C:316:14: error: ‘div’ is not a member of ‘Foam::fvm’
  316 | + fvm::div(alphaRhoPhi, epsilon_)
      | ^~~
../momentumTransportModels/lnInclude/ManceauEBRSM.C:316:14: note: suggested alternatives:
In file included from /usr/include/c++/11/cstdlib:75,
                 from /usr/include/c++/11/ext/string_conversions.h:41,
                 from /usr/include/c++/11/bits/basic_string.h:6608,
                 from /usr/include/c++/11/string:55,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/string.H:51,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/word.H:42,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/functionName.H:38,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/keyType.H:41,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/entry.H:44,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/IOdictionary.H:42,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/momentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/incompressibleMomentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:26,
                 from incompressibleMomentumTransportModels.C:26:
/usr/include/stdlib.h:860:14: note: ‘div’
  860 | extern div_t div (int __numer, int __denom)
      | ^~~
In file included from /usr/include/c++/11/ext/string_conversions.h:41,
                 from /usr/include/c++/11/bits/basic_string.h:6608,
                 from /usr/include/c++/11/string:55,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/string.H:51,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/word.H:42,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/functionName.H:38,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/keyType.H:41,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/entry.H:44,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/IOdictionary.H:42,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/momentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/incompressibleMomentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:26,
                 from incompressibleMomentumTransportModels.C:26:
/usr/include/c++/11/cstdlib:213:3: note: ‘std::div’
  213 | div(long long __n, long long __d)
      | ^~~
/usr/include/c++/11/cstdlib:213:3: note: ‘__gnu_cxx::div’
In file included from /opt/openfoam11/src/finiteVolume/lnInclude/fvcDiv.H:164,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/linearViscousStress.C:28,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/linearViscousStress.H:109,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/Stokes.H:39,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/laminarModel.C:27,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/laminarModel.H:199,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:29,
                 from incompressibleMomentumTransportModels.C:26:
/opt/openfoam11/src/finiteVolume/lnInclude/fvcDiv.C:253:1: note: ‘Foam::fvc::div’
  253 | div
      | ^~~
In file included from ../momentumTransportModels/lnInclude/ManceauEBRSM.H:228,
                 from incompressibleMomentumTransportModels.C:34:
../momentumTransportModels/lnInclude/ManceauEBRSM.C:320:14: error: ‘Sp’ is not a member of ‘Foam::fvm’
  320 | - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
      | ^~
../momentumTransportModels/lnInclude/ManceauEBRSM.C:359:14: error: ‘div’ is not a member of ‘Foam::fvm’
  359 | + fvm::div(alphaRhoPhi, R)
      | ^~~
../momentumTransportModels/lnInclude/ManceauEBRSM.C:359:14: note: suggested alternatives:
In file included from /usr/include/c++/11/cstdlib:75,
                 from /usr/include/c++/11/ext/string_conversions.h:41,
                 from /usr/include/c++/11/bits/basic_string.h:6608,
                 from /usr/include/c++/11/string:55,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/string.H:51,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/word.H:42,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/functionName.H:38,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/keyType.H:41,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/entry.H:44,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/IOdictionary.H:42,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/momentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/incompressibleMomentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:26,
                 from incompressibleMomentumTransportModels.C:26:
/usr/include/stdlib.h:860:14: note: ‘div’
  860 | extern div_t div (int __numer, int __denom)
      | ^~~
In file included from /usr/include/c++/11/ext/string_conversions.h:41,
                 from /usr/include/c++/11/bits/basic_string.h:6608,
                 from /usr/include/c++/11/string:55,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/string.H:51,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/word.H:42,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/functionName.H:38,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/keyType.H:41,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/entry.H:44,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from /opt/openfoam11/src/OpenFOAM/lnInclude/IOdictionary.H:42,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/momentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/incompressibleMomentumTransportModel.H:38,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:26,
                 from incompressibleMomentumTransportModels.C:26:
/usr/include/c++/11/cstdlib:213:3: note: ‘std::div’
  213 | div(long long __n, long long __d)
      | ^~~
/usr/include/c++/11/cstdlib:213:3: note: ‘__gnu_cxx::div’
In file included from /opt/openfoam11/src/finiteVolume/lnInclude/fvcDiv.H:164,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/linearViscousStress.C:28,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/linearViscousStress.H:109,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/Stokes.H:39,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/laminarModel.C:27,
                 from /opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/laminarModel.H:199,
                 from /opt/openfoam11/src/MomentumTransportModels/incompressible/lnInclude/makeIncompressibleMomentumTransportModel.H:29,
                 from incompressibleMomentumTransportModels.C:26:
/opt/openfoam11/src/finiteVolume/lnInclude/fvcDiv.C:253:1: note: ‘Foam::fvc::div’
  253 | div
      | ^~~
In file included from ../momentumTransportModels/lnInclude/ManceauEBRSM.H:228,
                 from incompressibleMomentumTransportModels.C:34:
../momentumTransportModels/lnInclude/ManceauEBRSM.C:361:14: error: ‘Sp’ is not a member of ‘Foam::fvm’
  361 | + fvm::Sp(C1_*alpha*rho*epsilon_/k_, R)
      | ^~
../momentumTransportModels/lnInclude/ManceauEBRSM.C: In instantiation of ‘Foam::RASModels::ManceauEBRSM<BasicMomentumTransportModel>::ManceauEBRSM(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const Foam::viscosity&, const Foam::word&) [with BasicMomentumTransportModel = Foam::incompressibleMomentumTransportModel; Foam::RASModels::ManceauEBRSM<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModels::ManceauEBRSM<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’:
/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:107:9: required from ‘static Foam::autoPtr<Foam::RASModel<BasicMomentumTransportModel> > Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const Foam::viscosity&) [with RASModelType = Foam::RASModels::ManceauEBRSM<Foam::incompressibleMomentumTransportModel>; BasicMomentumTransportModel = Foam::incompressibleMomentumTransportModel; Foam::RASModel<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModel<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’
/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:107:9: required from ‘Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::ManceauEBRSM<Foam::incompressibleMomentumTransportModel>; BasicMomentumTransportModel = Foam::incompressibleMomentumTransportModel]’
incompressibleMomentumTransportModels.C:35:1: required from here
../momentumTransportModels/lnInclude/ManceauEBRSM.C:224:14: error: ‘bound’ was not declared in this scope; did you mean ‘found’?
  224 | bound(epsilon_, this->epsilonMin_);
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | found
../momentumTransportModels/lnInclude/ManceauEBRSM.C: In instantiation of ‘void Foam::RASModels::ManceauEBRSM<BasicMomentumTransportModel>::correct() [with BasicMomentumTransportModel = Foam::incompressibleMomentumTransportModel]’:
../momentumTransportModels/lnInclude/ManceauEBRSM.C:282:6: required from here
../momentumTransportModels/lnInclude/ManceauEBRSM.C:330:10: error: ‘bound’ was not declared in this scope; did you mean ‘found’?
  330 | bound(epsilon_, this->epsilonMin_);
      | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | found
Steps To Reproduce1. Copy-paste an existing ReynoldsStress model
2. Change its name (folder, files and everywhere inside the files)
3. wmake libso
4. Get the error
Additional Information- Adding the headers

#include "fvm.H"
#include "fvc.H"
#include "bound.H"

makes the compilation to success.

- I think this also happens for newer OF versions (12 and dev)
TagsNo tags attached.

Activities

agustinvo

2024-07-11 10:10

reporter  

henry

2024-07-11 10:28

manager   ~0013314

User support request

Issue History

Date Modified Username Field Change
2024-07-11 10:10 agustinvo New Issue
2024-07-11 10:10 agustinvo File Added: MomentumTransportModels.tar.gz
2024-07-11 10:28 henry Assigned To => henry
2024-07-11 10:28 henry Status new => closed
2024-07-11 10:28 henry Resolution open => no change required
2024-07-11 10:28 henry Note Added: 0013314