|
[Sponsors] |
How to add a new multiphase solver for multiphaseEulerFoam? error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 24, 2023, 12:49 |
How to add a new multiphase solver for multiphaseEulerFoam? error
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hello,
I'm having difficulties implementing a new turbulence model in OpenFOAM 9. I want to solve a study of the injection of air bubbles in water columns (bubbleColumn tutorial) using the multiphaseEulerFoam solver. error: Code:
wmake libso . wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file phaseDESCompressibleMomentumTransportModels.C 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/openfoam9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam9/src/transportModels/lnInclude -I/opt/openfoam9/src/finiteVolume/lnInclude -I/opt/openfoam9/src/meshTools/lnInclude -I/opt/openfoam9/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam9/src/../applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/lnInclude -I/opt/openfoam9/src/../applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/lnInclude -IlnInclude -I. -I/opt/openfoam9/src/OpenFOAM/lnInclude -I/opt/openfoam9/src/OSspecific/POSIX/lnInclude -fPIC -c phaseDESCompressibleMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/phaseDESCompressibleMomentumTransportModels.o phaseDESCompressibleMomentumTransportModels.C:31:1: error: expected constructor, destructor, or type conversion before ‘(’ token 31 | ( | ^ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:78:20: error: expected template-name before ‘<’ token 78 | public kEpsilon<BasicMomentumTransportModel> | ^ continuousGasKEDES.H:78:20: error: expected ‘{’ before ‘<’ token In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:45:11: error: ‘alphaField’ does not name a type; did you mean ‘addField’? 45 | const alphaField& alpha, | ^~~~~~~~~~ | addField continuousGasKEDES.C:46:11: error: ‘rhoField’ does not name a type 46 | const rhoField& rho, | ^~~~~~~~ continuousGasKEDES.C:50:11: error: ‘transportModel’ does not name a type 50 | const transportModel& transport, | ^~~~~~~~~~~~~~ continuousGasKEDES.C:52:1: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 52 | ) | ^ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:100:60: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 100 | bool continuousGasKEDES<BasicMomentumTransportModel>::read() | ^ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:116:66: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 116 | void continuousGasKEDES<BasicMomentumTransportModel>::correctNut() | ^ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:152:69: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 152 | continuousGasKEDES<BasicMomentumTransportModel>::liquidTurbulence() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:179:58: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 179 | continuousGasKEDES<BasicMomentumTransportModel>::nuEff() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:206:59: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 206 | continuousGasKEDES<BasicMomentumTransportModel>::rhoEff() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:225:71: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 225 | continuousGasKEDES<BasicMomentumTransportModel>::phaseTransferCoeff() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:248:60: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 248 | continuousGasKEDES<BasicMomentumTransportModel>::kSource() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:261:66: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 261 | continuousGasKEDES<BasicMomentumTransportModel>::epsilonSource() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ In file included from continuousGasKEDES.H:171, from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.C:274:58: error: invalid use of incomplete type ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 274 | continuousGasKEDES<BasicMomentumTransportModel>::sigma() const | ^~~~~ In file included from phaseDESCompressibleMomentumTransportModels.C:43: continuousGasKEDES.H:76:7: note: declaration of ‘class Foam::LESModels::continuousGasKEDES<BasicMomentumTransportModel>’ 76 | class continuousGasKEDES | ^~~~~~~~~~~~~~~~~~ phaseDESCompressibleMomentumTransportModels.C:44:13: error: expected constructor, destructor, or type conversion before ‘(’ token 44 | makeLESModel(continuousGasKEDES); | ^ make: *** [/opt/openfoam9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/phaseDESCompressibleMomentumTransportModels.o] Erro 1 options file: Code:
EXE_INC = \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/../applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/lnInclude \ -I$(LIB_SRC)/../applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/lnInclude LIB_LIBS = \ -libphaseSystem \ -leulerianInterfacialCompositionModels \ -lfluidThermophysicalModels \ -ltransportModels \ -lfiniteVolume \ -lmeshTools Code:
phaseDESCompressibleMomentumTransportModels.C LIB = $(FOAM_USER_LIBBIN)/libphaseDESCompressibleMomentumTransportModels THANKS! Last edited by gu1; June 25, 2023 at 10:40. |
|
June 26, 2023, 14:19 |
|
#2 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Can someone help me? Please
Last edited by gu1; July 4, 2023 at 07:21. |
|
July 13, 2023, 08:28 |
|
#3 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
I couldn't progress in my studies, can someone help me?
|
|
July 15, 2023, 07:19 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14 |
Guilherme - you didn't include the PhaseCompressibleMomentumTransportModel.H file ... check that you're not missing a brace or semicolon at the end of this file ... or that you don't have too may braces. That will sometimes make the compiler throw a fit about the following text.
|
|
September 23, 2023, 16:15 |
|
#5 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
Thanks for your reply. I managed to improve with your advice, but I still can't compile the turbulence model. Code:
$ wmake wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries: wmakeLnInclude error: base directory ../momentumTransportModels/ does not exist wmakeLnInclude error: base directory ../compressible/ does not exist wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file phaseDESMomentumTransportModel.C 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../momentumTransportModels/lnInclude -I../compressible/lnInclude -I/opt/openfoam9/src/transportModels/lnInclude -I/opt/openfoam9/src/finiteVolume/lnInclude -I/opt/openfoam9/src/meshTools/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam9/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/lnInclude -I/opt/openfoam9/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam9/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/lnInclude -IlnInclude -I. -I/opt/openfoam9/src/OpenFOAM/lnInclude -I/opt/openfoam9/src/OSspecific/POSIX/lnInclude -fPIC -c phaseDESMomentumTransportModel.C -o Make/linux64GccDPInt32Opt/phaseDESMomentumTransportModel.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../momentumTransportModels/lnInclude -I../compressible/lnInclude -I/opt/openfoam9/src/transportModels/lnInclude -I/opt/openfoam9/src/finiteVolume/lnInclude -I/opt/openfoam9/src/meshTools/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam9/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam9/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/lnInclude -I/opt/openfoam9/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam9/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/lnInclude -IlnInclude -I. -I/opt/openfoam9/src/OpenFOAM/lnInclude -I/opt/openfoam9/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/phaseDESMomentumTransportModel.o -L/opt/openfoam9/platforms/linux64GccDPInt32Opt/lib \ -ltransportModels -lfiniteVolume -lmeshTools -libphaseCompressibleMomentumTransportModels -libmomentumTransportModels -libcompressibleMomentumTransportModels -libphaseSystem -libfluidThermophysicalModels -libeulerianInterfacialModels -o /home/assis/OpenFOAM/assis-9/platforms/linux64GccDPInt32Opt/lib/libhaseDESMomentumTransportModel.so /usr/bin/ld.bfd: cannot find -libphaseCompressibleMomentumTransportModels /usr/bin/ld.bfd: cannot find -libmomentumTransportModels /usr/bin/ld.bfd: cannot find -libcompressibleMomentumTransportModels /usr/bin/ld.bfd: cannot find -libphaseSystem /usr/bin/ld.bfd: cannot find -libfluidThermophysicalModels /usr/bin/ld.bfd: cannot find -libeulerianInterfacialModels collect2: error: ld returned 1 exit status make: *** [/opt/openfoam9/wmake/makefiles/general:181: /home/assis/OpenFOAM/assis-9/platforms/linux64GccDPInt32Opt/lib/libhaseDESMomentumTransportModel.so] Erro 1 Code:
EXE_INC = \ -I../momentumTransportModels/lnInclude \ -I../compressible/lnInclude \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(FOAM_APP)/solvers/multiphase/multiphaseEulerFoam/phaseSystems/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(FOAM_APP)/solvers/multiphase/multiphaseEulerFoam/interfacialModels/lnInclude LIB_LIBS = \ -ltransportModels \ -lfiniteVolume \ -lmeshTools \ -libphaseCompressibleMomentumTransportModels \ -libmomentumTransportModels \ -libcompressibleMomentumTransportModels \ -libphaseSystem \ -libfluidThermophysicalModels \ -libeulerianInterfacialModels |
|
September 23, 2023, 19:04 |
|
#6 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Problem solved.
All you had to do was change from "lib..." to "l..." Code:
LIB_LIBS = \ -ltransportModels \ -lfiniteVolume \ -lmeshTools \ -lphaseCompressibleMomentumTransportModels \ -lmomentumTransportModels \ -lcompressibleMomentumTransportModels \ -lphaseSystem \ -lfluidThermophysicalModels \ -leulerianInterfacialModels |
|
Tags |
multiphase, multiphaseeulerfoam, openfoam9, programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 08:43 |
Mesquite - Adaptive mesh refinement / coarsening? | philippose | OpenFOAM Running, Solving & CFD | 94 | January 27, 2016 10:40 |
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x | Saxwax | OpenFOAM Installation | 25 | November 29, 2013 06:34 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 06:07 |