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

Libso - error - openfoam 11

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2024, 07:32
Default Libso - error - openfoam 11
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
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
controlDict:

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
gu1 is offline   Reply With Quote

Old   April 9, 2024, 11:17
Default
  #2
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Can someone help me? I couldn't evolve alone.
gu1 is offline   Reply With Quote

Old   April 9, 2024, 12:42
Default
  #3
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 734
Rep Power: 14
Tobermory will become famous soon enough
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:
Unknown LESModel type multiphaseNicenoKE

Valid LESModel types:

5
(
NicenoKEqn
Smagorinsky
SmagorinskyZhang
continuousGasKEqn
kEqn
)
So, assuming that models NicenoKEqn and multiphaseNicenoKE are your own user models, then I guess the real question is why is your multiphaseNicenoKE model not being recognised? Did it compile properly? I'd start there.
Tobermory is offline   Reply With Quote

Old   April 10, 2024, 07:44
Default
  #4
Member
 
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 55
Rep Power: 10
amirhosseintaran is on a distinguished road
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.
amirhosseintaran is offline   Reply With Quote

Old   April 12, 2024, 14:00
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
Did it compile properly? I'd start there.
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
gu1 is offline   Reply With Quote

Old   April 12, 2024, 14:01
Default
  #6
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by amirhosseintaran View Post
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.
Check, it's there.
I'm using OpenFOAM 11.
gu1 is offline   Reply With Quote

Old   April 12, 2024, 14:23
Default
  #7
Member
 
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 55
Rep Power: 10
amirhosseintaran is on a distinguished road
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.
amirhosseintaran is offline   Reply With Quote

Old   April 12, 2024, 19:22
Default
  #8
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by amirhosseintaran View Post
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.
I'll try and get back to you as quickly as I can.
gu1 is offline   Reply With Quote

Old   April 13, 2024, 07:35
Default
  #9
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by amirhosseintaran View Post
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.

For your knowledge:


Code:
assis@assis:~$ cd $FOAM_USER_LIBBIN
assis@assis:~/OpenFOAM/assis-11/platforms/linux64GccDPInt32Opt/lib$ ls
libphaseMomentumTransportModel.so
and...


file:
Code:
phaseMomentumTransportModel.C

LIB = $(FOAM_LIBBIN)/libphaseMomentumTransportModel
log:
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
ERRO


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.
gu1 is offline   Reply With Quote

Old   April 13, 2024, 10:38
Default
  #10
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
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
Something that is bothering me is the fact that kEqn was not supposed to be cited. It is not a multiphase model...

and, OF mentions the error in line 176, but honestly I didn't see anything...
gu1 is offline   Reply With Quote

Old   April 20, 2024, 12:29
Default
  #11
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 734
Rep Power: 14
Tobermory will become famous soon enough
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);
     }
where line 176 is the one with the call to the FatalErrorInFuntion. So basically, the code cannot find your chosen LES model in the list of available models, hits end of table and calls the FatalErrorInFuntion, which exits cleanly with the warning message. So all fine there.

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).
Tobermory is offline   Reply With Quote

Old   May 1, 2024, 15:59
Unhappy
  #12
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
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);
     }
where line 176 is the one with the call to the FatalErrorInFuntion. So basically, the code cannot find your chosen LES model in the list of available models, hits end of table and calls the FatalErrorInFuntion, which exits cleanly with the warning message. So all fine there.

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).
I remain unsuccessful.

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.
gu1 is offline   Reply With Quote

Old   May 2, 2024, 02:27
Default
  #13
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 781
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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
Are you trying to overwrite the OpenFoam installation for which you do not have the permission?

Should you copy the library file momentumTransportModels to a working directory that you can savily write to?
dlahaye is offline   Reply With Quote

Old   May 2, 2024, 06:53
Default
  #14
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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
Are you trying to overwrite the OpenFoam installation for which you do not have the permission?

Should you copy the library file momentumTransportModels to a working directory that you can savily write to?

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
This output you showed was an attempt suggested by the forum.

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.
gu1 is offline   Reply With Quote

Old   May 2, 2024, 08:01
Default
  #15
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 781
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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
and subsequently

Code:
ldd <openfoam-bin-dir>/multiphaseEuler
Thx.
dlahaye is offline   Reply With Quote

Old   May 2, 2024, 08:09
Default
  #16
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
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
and subsequently

Code:
ldd <openfoam-bin-dir>/multiphaseEuler
Thx.
I am not sure,

I will do what you asked and post the result here as soon as possible.
dlahaye likes this.
gu1 is offline   Reply With Quote

Old   May 2, 2024, 09:49
Default
  #17
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,


Code:
 which multiphaseEuler
Nothing heappen.


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?
gu1 is offline   Reply With Quote

Old   May 2, 2024, 09:54
Default
  #18
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 781
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
1/ what solver are you currently using?

2/ where is the executable of that solver located?

3/ which library does this executable require?
dlahaye is offline   Reply With Quote

Old   May 2, 2024, 10:16
Default
  #19
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,

Quote:
Originally Posted by dlahaye View Post
1/ what solver are you currently using?
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).

Quote:
Originally Posted by dlahaye View Post
2/ where is the executable of that solver located?
I don't know if I understood the question well, but I created a folder inside $FOAM_RUN and compiled it.

Quote:
Originally Posted by dlahaye View Post
3/ which library does this executable require?
I can't say specifically which ones it requires, but as I said, they are the same ones required by NicenoKEqn.
gu1 is offline   Reply With Quote

Old   May 2, 2024, 12:29
Default
  #20
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 781
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
gu1 likes this.
dlahaye is offline   Reply With Quote

Reply

Tags
openfoam11


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
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


All times are GMT -4. The time now is 19:30.