|
[Sponsors] |
Error to run new compiled library in OpenFoam |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
Hi
I am using sprayFoam case with sprayFoam solver in OpenFoam 4.1 version with Ubuntu 16.04 system. I am trying to compile a new library named myReitzdiwakar in my working folder /home/shailja-4.1/src/lagrangian/spray/submodels/BreakupModel/myReitzDiwakar/Make by following steps given as per http://openfoamwiki.net/index.php/Ho...dary_condition. and also following https://cfd.direct/openfoam/user-gui...-applications/ The libmylagrangianSpray.so file is created in the $FOAM_USER_LIBBIN" folder but while running the case with sprayFoam Solver, it gives following error code: --------------------------------------------------------------------------------------------------------------------------- Selecting BreakupModel myReitzDiwakar --> FOAM FATAL ERROR: Unknown BreakupModelType type myReitzDiwakar, constructor not in hash table Valid BreakupModel types are: 7 ( ETAB PilchErdman ReitzDiwakar ReitzKHRT SHF TAB none ) From function static Foam::autoPtr<Foam::BreakupModel<CloudType> > Foam::BreakupModel<CloudType>::New(const Foam::dictionary&, CloudType&) [with CloudType = Foam::SprayCloud<Foam::ReactingCloud<Foam::ThermoC loud<Foam::KinematicCloud<Foam::Cloud<Foam::SprayP arcel<Foam::ReactingParcel<Foam::ThermoParcel<Foam ::KinematicParcel<Foam: ![]() in file /opt/openfoam4/src/lagrangian/spray/lnInclude/BreakupModelNew.C at line 47. FOAM exiting -------------------------------------------------------------------------------------------------------------------------------- I am also attaching files and options files used. I tried to put all the dependencies but the new library is not taken into account during run. I have tried everything but every time .so files are created but new library is not accepted. I also checked various threads and tried to follow but none is working, I don't understand what I am missing. If compilation is not proper? how to remove this error? Please, any help is appreciated. regards Shailja |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 10 ![]() |
Did you recompile your sprayFoam solver?
__________________
https://openfoam.top |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
No, I don't have permission in OpenFoam to do that. But I included new complied library name libmylagrangianSpray.so in controldict which should be recognizable by sprayFoam.
Also to check my methodology, I compiled mysprayFoam --- new solver by copying sprayFoam.C and dependencies in user directory, renamed and compiled with same methodology successfully and it is working with tutorial case. But both solver are taking newly compiled library. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
Sorry , both solvers are not taking newly compiled library, that is the problem (written wrongly in previous reply)
regards Shailja |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
In new solver mysprayFoam, I included follwing in EXE_INC
-I$(WM_PROJECT_USER_DIR)/src/lagrangian/spray/submodels/BreakupModel/myReitzDiwakar/lnInclude \ and in EXE_LIBS = \ ..........(other libraries) -L$(FOAM_USER_LIBBIN)/libmylagrangianSpray \ ............(other libraries) so I guess, new solver should consider the new library, but it is not. i am unable to figure out what is going wrong, Any idea? regards shailja |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 8 ![]() |
Did you try to include your compiled library to your controlDict file? In a way such that:
Code:
libs ( "libnew1.so" "libnew2.so" ); |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
Thank you for replying, I already did that, but main problem was linking to some libraries. somehow adding lmylagrangianSpray in LIB_LIBS is stopping compilation also I
Now I got it run but some repetition in start of the run of aachenbomb with sprayFoam. This is because i have copied the Full sprayFolder in place of one renamed reitzDiwakar folder, but without that I am not able to compile and run. regards Shailja |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 308
Rep Power: 13 ![]() |
Hi,
I think the problem is that you're using the same libraries, but with different names. All the functions inside have the same name, and this is why you get this error. What I do fot turbulence models, I only add the new model, and inside the options file of the library I mention the files from the original installation. Did you try this? |
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
Shailja
Join Date: Nov 2017
Posts: 16
Rep Power: 7 ![]() |
Hii
yeah, but in that case, compilation of new library (myReitzDiwakar.so ) is getting failed with error message for not getting files of atomization and spray models. Although I am also giving path in option file for the same. EXE_INC = \ -......................................... -......................................... -I$(LIB_SRC)/lagrangian/spray/lnInclude \ -........................................ anyways, I am also stuck at one point, if anybody has created new liquid library for example remaned C7H16 folder and its contents and then compiled it with new name in User directory. I am doing this but while running the sprayFoam it is not accepting new liquid. Do I need to create chem.dat and therm.dat file for the new liquid? regards Shailja |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Join Date: Sep 2021
Posts: 3
Rep Power: 3 ![]() |
Shailja,
Were you able to solve your issue? I am running into the same problem. Last edited by xmb; October 14, 2021 at 23:29. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 05:29 |
OpenFOAM can't be run in parallel in cluster | sibo | OpenFOAM Running, Solving & CFD | 4 | February 21, 2017 16:29 |
How can I run OpenFOAM to benchmark/compare two environment performance | ZhouYoung | OpenFOAM | 11 | December 7, 2016 10:01 |
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 5, 2016 03:18 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 13:36 |