|
[Sponsors] |
April 7, 2024, 07:32 |
Libso - error - openfoam 11
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
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, 11:17 |
|
#2 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Can someone help me? I couldn't evolve alone.
|
|
April 9, 2024, 12:42 |
|
#3 | |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
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, 07:44 |
|
#4 |
Member
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 56
Rep Power: 10 |
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, 14:00 |
|
#5 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
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, 14:01 |
|
#6 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
||
April 12, 2024, 14:23 |
|
#7 |
Member
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 56
Rep Power: 10 |
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, 19:22 |
|
#8 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
||
April 13, 2024, 07:35 |
|
#9 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
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 10:19. |
||
April 13, 2024, 10:38 |
|
#10 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
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, 12:29 |
|
#11 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
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). |
|
May 1, 2024, 15:59 |
|
#12 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
I reviewed all the code and nothing! It compiles and the solver don't recognize it. I even compiled OF11 from the source code, placed my solver in the LES folder (phaseCompressible/LES) and NOTHING! It compiles without errors, but the solver don't recognize it when I try to use it. I don't know if I'll lose hope and go back to OF9. I don't know if the problem is related to the way I reference the solver, through phaseCompressibleMomentumTransportModels.C However, I can't see a way out. |
||
May 2, 2024, 02:27 |
|
#13 |
Senior Member
|
Bom dia!
The linker tells you that Code:
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 Should you copy the library file momentumTransportModels to a working directory that you can savily write to? |
|
May 2, 2024, 06:53 |
|
#14 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
Hi, The software output is below: 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 Now, in a second moment, I compiled OF11 from the source code and redid the process of compiling my solver in the conventional way. As I said, it compiles but is not recognized by OF. In a second attempt, I took my code and threw it into the OF folder (now, inside the original software), it compiled, but it also remains unrecognized. |
||
May 2, 2024, 08:01 |
|
#15 |
Senior Member
|
I understand.
Question: are you sure that the solver you use links with there library that you modify? You are using multiphaseEuler, correct? Can you provide us with the output of Code:
which multiphaseEuler Code:
ldd <openfoam-bin-dir>/multiphaseEuler |
|
May 2, 2024, 08:09 |
|
#16 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
I will do what you asked and post the result here as soon as possible. |
||
May 2, 2024, 09:49 |
|
#17 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
Code:
which multiphaseEuler Code:
ldd <openfoam-bin-dir>/multiphaseEuler log: Code:
assis@assis:~/OpenFOAM/assis-11/run/DOC$ which multiphaseEuler assis@assis:~/OpenFOAM/assis-11/run/DOC$ ldd <openfoam-bin-dir>/multiphaseEuler bash: openfoam-bin-dir: Nonexistent file or directory Was this really what I should be looking for? |
|
May 2, 2024, 10:16 |
|
#19 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
I'm using multiphaseEuler. The turbulence model I developed. I was able to use this without any problems in version 9 (it is based on the NicenoKEqn model). I don't know if I understood the question well, but I created a folder inside $FOAM_RUN and compiled it. I can't say specifically which ones it requires, but as I said, they are the same ones required by NicenoKEqn. |
|
May 2, 2024, 12:29 |
|
#20 |
Senior Member
|
It is hard for me to judge for me from a distance what is going on.
OpenFoam works with shared libraries https://en.wikipedia.org/wiki/Shared_library It us therefore perfectly possible that the library compiles fine, but the executable (the solver) does not pick up the changes, simply because the solver continues to pick up the old (outdated, unmodified) libraries. This (in my very limited understanding) describe the scenario above. My above suggestion is to find the executable, and to check which libraries are used to build the executable (the solver). The unix command ldd https://en.wikipedia.org/wiki/Ldd_(Unix) does precisely this. An alternative approach might be to write a C++ program hello-world with a hello-master function in a library file. Not sure how this helps you (in case at all)? Keep writing us here. Good luck. |
|
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 06:37 |
Problems about compiling OF1.5.x on Bluegene/P | ywang | OpenFOAM | 1 | August 25, 2011 06:22 |
OpenFoam 1.6-ext - error ./Allwmake in /src | preibie | OpenFOAM Installation | 14 | June 14, 2011 06:57 |
Problems Installing OF 1.6 32 bit | bucksfan | OpenFOAM Installation | 19 | August 4, 2009 02:36 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 05:41 |