|
[Sponsors] |
April 7, 2024, 06:32 |
Libso - error - openfoam 11
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
Hi,
I'm using OpenFOAM 11 on Ubuntu 22.04 LTS and I'm not able to use the solver I developed. I used it safely in version 9, I made the changes to compile it successfully in version 11 but unfortunately I'm getting the following error: Code:
~/OpenFOAM/assis-11/run/DOC$ foamRun /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 11 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 11-c219200fdb8b Exec : foamRun Date : Apr 07 2024 Time : 07:30:48 Host : "assis" PID : 6245 I/O : uncollated Case : /home/assis/OpenFOAM/assis-11/run/DOC nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From function void* Foam::dlOpen(const Foam::fileName&, bool) in file POSIX.C at line 1247 dlopen error : /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libphaseSystem.so: undefined symbol: _ZTIN4Foam35interfaceSaturationTemperatureModelE --> FOAM Warning : From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 106 could not load "libphaseMomentumTransportModel.so" Create mesh for time = 0 Selecting solver multiphaseEuler Selecting phaseSystem basicMultiphaseSystem No MRF models present Selecting phaseModel for air: purePhaseModel Selecting diameterModel for phase air: constant Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } Calculating face flux field phi.air Selecting turbulence model type laminar Selecting laminar stress model Stokes Selecting thermophysical transport type laminar Selecting default laminar thermophysical transport model unityLewisFourier Selecting phaseModel for water: purePhaseModel Selecting diameterModel for phase water: constant Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleInternalEnergy; } Calculating face flux field phi.water Selecting turbulence model type LES Selecting LES turbulence model multiphaseNicenoKE --> FOAM FATAL ERROR: Unknown LESModel type multiphaseNicenoKE Valid LESModel types: 5 ( NicenoKEqn Smagorinsky SmagorinskyZhang continuousGasKEqn kEqn ) From function static Foam::autoPtr<Foam::LESModel<BasicMomentumTransportModel> > Foam::LESModel<BasicMomentumTransportModel>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const Foam::viscosity&) [with BasicMomentumTransportModel = Foam::phaseCompressibleMomentumTransportModel; Foam::LESModel<BasicMomentumTransportModel>::alphaField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::LESModel<BasicMomentumTransportModel>::rhoField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file ../momentumTransportModels/lnInclude/LESModel.C at line 176. FOAM exiting Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 11 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // libs ( "libphaseMomentumTransportModel.so" ); application foamRun; solver multiphaseEuler; Code:
$ wmake wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file phaseMomentumTransportModel.C g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -c phaseMomentumTransportModel.C -o Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o -L/opt/openfoam11/platforms/linux64GccDPInt32Opt/lib \ -lphysicalProperties -lfiniteVolume -lmeshTools -lmomentumTransportModels -lphaseSystem -lsampling -o /home/assis/OpenFOAM/assis-11/platforms/linux64GccDPInt32Opt/lib/libphaseMomentumTransportModel.so |
|
April 9, 2024, 10:17 |
|
#2 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
Can someone help me? I couldn't evolve alone.
|
|
April 9, 2024, 11:42 |
|
#3 | |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14 |
Well Guilherme, the error message is saying that it cannot find the LES model multiphaseNicenoKE; it gives you the list of available models in the list after the error message:
Quote:
|
||
April 10, 2024, 06:44 |
|
#4 |
Member
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 50
Rep Power: 9 |
Hello,
Can you go to your $FOAM_USER_LIBBIN and confirm that your libphaseMomentumTransportModel.so is there or not? Also, which version of OpenFOAM are you using? Bests, Amirhossein. |
|
April 12, 2024, 13:00 |
|
#5 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
Exactly,
That's the question I can't answer. I put the compilation log in the previous message. For me it was a success. I don't understand what I could have done wrong. Code:
$ wmake wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file phaseMomentumTransportModel.C g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -c phaseMomentumTransportModel.C -o Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o -L/opt/openfoam11/platforms/linux64GccDPInt32Opt/lib \ -lphysicalProperties -lfiniteVolume -lmeshTools -lmomentumTransportModels -lphaseSystem -lsampling -o /home/assis/OpenFOAM/assis-11/platforms/linux64GccDPInt32Opt/lib/libphaseMomentumTransportModel.so |
|
April 12, 2024, 13:01 |
|
#6 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
||
April 12, 2024, 13:23 |
|
#7 |
Member
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 50
Rep Power: 9 |
Do one thing, try to compile it in $FOAM_LIBBIN, and see whether it works by compiling there or not,
If it worked, it seems that the PATH to $FOAM_USER_LIBBIN is not defined properly. |
|
April 12, 2024, 18:22 |
|
#8 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
||
April 13, 2024, 06:35 |
|
#9 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
Quote:
For your knowledge: Code:
assis@assis:~$ cd $FOAM_USER_LIBBIN assis@assis:~/OpenFOAM/assis-11/platforms/linux64GccDPInt32Opt/lib$ ls libphaseMomentumTransportModel.so file: Code:
phaseMomentumTransportModel.C LIB = $(FOAM_LIBBIN)/libphaseMomentumTransportModel Code:
$ wmake wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file phaseMomentumTransportModel.C g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -c phaseMomentumTransportModel.C -o Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o g++ -std=c++14 -m64 -DLIB_NAME=libphaseMomentumTransportModel.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/physicalProperties/lnInclude -I/opt/openfoam11/src/finiteVolume/lnInclude -I/opt/openfoam11/src/meshTools/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/phaseCompressible/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/opt/openfoam11/src/MomentumTransportModels/compressible/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/phaseSystems/lnInclude -I/opt/openfoam11/src/twoPhaseModels/compressibleTwoPhases/lnInclude -I/opt/openfoam11/src/twoPhaseModels/twoPhaseMixture/lnInclude -I/opt/openfoam11/src/../applications/modules/multiphaseEuler/interfacialModels/lnInclude -I/opt/openfoam11/src/sampling/lnInclude -I/opt/openfoam11/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/opt/openfoam11/src/OpenFOAM/lnInclude -I/opt/openfoam11/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/phaseMomentumTransportModel.o -L/opt/openfoam11/platforms/linux64GccDPInt32Opt/lib \ -lphysicalProperties -lfiniteVolume -lmeshTools -lmomentumTransportModels -lphaseSystem -lsampling -o /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libphaseMomentumTransportModel.so /usr/bin/ld.bfd: não foi possível abrir o arquivo de saída /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libphaseMomentumTransportModel.so: Permissão negada collect2: error: ld returned 1 exit status make: *** [/opt/openfoam11/wmake/makefiles/general:181: /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libphaseMomentumTransportModel.so] Erro 1 How can I make sure OF11 is looking at the correct folder ($FOAM_USER_LIBBIN)? Although that doesn't make ANY sense. It locates the folder correctly. Last edited by gu1; April 13, 2024 at 09:19. |
||
April 13, 2024, 09:38 |
|
#10 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10 |
Code:
--> FOAM FATAL ERROR: Unknown LESModel type multiphaseNicenoKE Valid LESModel types: 5 ( NicenoKEqn Smagorinsky SmagorinskyZhang continuousGasKEqn kEqn ) From function static Foam::autoPtr<Foam::LESModel<BasicMomentumTransportModel> > Foam::LESModel<BasicMomentumTransportModel>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const Foam::viscosity&) [with BasicMomentumTransportModel = Foam::phaseCompressibleMomentumTransportModel; Foam::LESModel<BasicMomentumTransportModel>::alphaField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::LESModel<BasicMomentumTransportModel>::rhoField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file ../momentumTransportModels/lnInclude/LESModel.C at line 176. FOAM exiting and, OF mentions the error in line 176, but honestly I didn't see anything... |
|
April 20, 2024, 11:29 |
|
#11 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14 |
Don't worry about the line 176 - the code exits via the call to FatalErrorInFunction in the following lines:
Code:
if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorInFunction << "Unknown LESModel type " << modelType << nl << nl << "Valid LESModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } Your problem, as I understand it, is that your LES model multiphaseNicenoKE is not appearing in the list of available models, but kEqn is. So here's a thought - try remove your multiphaseNicenoKE model from the library and recompile, and now what is the list of available models? Does kEqn disappear? If so, then we are getting closer - your model has compiled, but is registered with the wrong name; try then checking your coding to see if you have a simple boo-boo (like forgetting to update the Typename to multiphaseNicenoKE). |
|
Tags |
openfoam11 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Patches for OpenFOAM 1.7 on MacOS X | gschaider | OpenFOAM Installation | 101 | September 21, 2011 05:37 |
Problems about compiling OF1.5.x on Bluegene/P | ywang | OpenFOAM | 1 | August 25, 2011 05:22 |
OpenFoam 1.6-ext - error ./Allwmake in /src | preibie | OpenFOAM Installation | 14 | June 14, 2011 05:57 |
Problems Installing OF 1.6 32 bit | bucksfan | OpenFOAM Installation | 19 | August 4, 2009 01:36 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 04:41 |