Libso - error - openfoam 11
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 Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
$ wmake |
Can someone help me? I couldn't evolve alone.
|
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:
|
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. |
Quote:
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 |
Quote:
I'm using OpenFOAM 11. |
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. |
Quote:
|
Quote:
For your knowledge: Code:
assis@assis:~$ cd $FOAM_USER_LIBBIN file: Code:
phaseMomentumTransportModel.C Code:
$ wmake 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. |
Code:
--> FOAM FATAL ERROR: and, OF mentions the error in line 176, but honestly I didn't see anything... |
Don't worry about the line 176 - the code exits via the call to FatalErrorInFunction in the following lines:
Code:
if (cstrIter == dictionaryConstructorTablePtr_->end()) 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). |
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. |
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 \ Should you copy the library file momentumTransportModels to a working directory that you can savily write to? |
Quote:
Hi, The software output is below: Code:
$ wmake 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. |
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 |
Quote:
I will do what you asked and post the result here as soon as possible. |
Hi,
Code:
which multiphaseEuler Code:
ldd <openfoam-bin-dir>/multiphaseEuler log: Code:
assis@assis:~/OpenFOAM/assis-11/run/DOC$ which multiphaseEuler Was this really what I should be looking for? |
1/ what solver are you currently using?
2/ where is the executable of that solver located? 3/ which library does this executable require? |
Hi,
Quote:
Quote:
Quote:
|
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. |
Quote:
|
All times are GMT -4. The time now is 23:25. |