|
[Sponsors] |
Addition of New Turbulence Models giviing errors |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 15, 2016, 22:48 |
Addition of New Turbulence Models giviing errors
|
#1 |
New Member
SD
Join Date: Dec 2016
Posts: 4
Rep Power: 10 |
Hi,
I wanted to add a new turbulence model so I followed the instructions in http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf I created the Make/files and Make/options and then I ran wmake libso. The library ("libmyIncompressibleRASModels.so") was created at the right spot without any error which I can see. I also changed the controlDict to add libs ("libmyIncompressibleRASModels.so"); But when I try to run my new model "mykOmega" I get the error Selecting RAS turbulence model mykOmega --> FOAM FATAL ERROR: Unknown RASModel type mykOmega So I checked if my library path is included or not using echo $LD_LIBRARY_PATH | tr ':' '\n' which showed me /home/sabyju88/OpenFOAM/sabyju88-4.1/platforms/linux64GccDPInt32Opt/lib i.e., the required library which has the libmyIncompressibleRASModels.so is included indeed. I do not understand what is creating this error. Any help will be really appreciated. Thanks in advance. |
|
December 16, 2016, 03:52 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Silly suggestions:
|
|
December 16, 2016, 13:19 |
|
#3 |
New Member
SD
Join Date: Dec 2016
Posts: 4
Rep Power: 10 |
Thank you for your suggestions which I followed to notice the following
1. I checked for any typo in the library name. There isn't any. 2. FOAM_USER_LIBBIN points to the location of my libmyIncompressibleRASModels.so file indeed. 3. I have used only this library inside libs. Using "banana trick" I get Valid RASModel types: 17 ( LRR LamBremhorstKE LaunderSharmaKE LienCubicKE LienLeschziner RNGkEpsilon SSG ShihQuadraticKE SpalartAllmaras kEpsilon kOmega kOmegaSST kOmegaSSTSAS kkLOmega qZeta realizableKE v2f ) So, my RAS model is not inside. However, I did not implement the runtime selection mechanism which I am gonna do it now and post my result. Regards, SD |
|
December 17, 2016, 17:23 |
|
#4 |
New Member
SD
Join Date: Dec 2016
Posts: 4
Rep Power: 10 |
Hi,
I implemented the runtime selection mechanism following http://hassankassem.me/posts/newturb...l/#new-version. After compiling when I try to run I get the following error: Selecting RAS turbulence model mykOmega simpleFoam: symbol lookup error: /home/sabyju88/OpenFOAM/sabyju88-4.1/platforms/linux64GccDPInt32Opt/lib/libmyIncompressibleRASModels.so: undefined symbol: _ZN4Foam9RASModels8mykOmegaINS_29IncompressibleTur bulenceModelINS_14transportModelEEEEC1ERKNS_17geom etricOneFieldES8_RKNS_14GeometricFieldINS_6VectorI dEENS_12fvPatchFieldENS_7volMeshEEERKNS9_IdNS_13fv sPatchFieldENS_11surfaceMeshEEESL_RKS3_RKNS_4wordE SQ_ I then copied the simpleFoam solver and changed it to mysimpleFoam with the addition of #include "/home/sabyju88/OpenFOAM/sabyju88-4.1/src/TurbulenceModels/turbulenceModels/RAS/mykOmega/mykOmega.H" But I am still getting the same error: Selecting RAS turbulence model mykOmega mysimpleFoam: symbol lookup error: /home/sabyju88/OpenFOAM/sabyju88-4.1/platforms/linux64GccDPInt32Opt/lib/libmyIncompressibleRASModels.so: undefined symbol: _ZN4Foam9RASModels8mykOmegaINS_29IncompressibleTur bulenceModelINS_14transportModelEEEEC1ERKNS_17geom etricOneFieldES8_RKNS_14GeometricFieldINS_6VectorI dEENS_12fvPatchFieldENS_7volMeshEEERKNS9_IdNS_13fv sPatchFieldENS_11surfaceMeshEEESL_RKS3_RKNS_4wordE SQ_ Any help will be appreciated. Thank you, Regards, SD |
|
December 19, 2016, 07:29 |
|
#5 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
In the solver you should not add it directly. I was facing with something similar a month ago. The tutorial you mention it's a bit old, but the core of the code should be similar. Did you follow the tree directory of OF4.1? Try to start your implementation from the kOmega code and modify it as you need. Remember that in OF4.1, you have two libraries, the turbulenceModels, and the incompressibleTurbulenceModels. |
||
December 19, 2016, 23:05 |
|
#6 | |
New Member
SD
Join Date: Dec 2016
Posts: 4
Rep Power: 10 |
Quote:
Thank you for your suggestions. I started with the kOmega code and haven't changed anything in it yet and my Make/options look like this: EXE_INC = \ -I$(FOAM_SOLVERS)/incompressible/simpleFoam/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/RAS/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/incompressibleTransportModels/Newtonian/lnInclude \ -I$(WM_PROJECT_DIR)/src/TurbulenceModels/turbulenceModels/RAS/mykOmega/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude LIB_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lmeshTools \ -lfvOptions \ -lsampling \ -L$(FOAM_USER_LIBBIN)/libmyIncompressibleRASModels.so I guess I have included more than I need but
Again, thank you in advance for any suggestions. Regards, SD |
||
January 31, 2017, 10:33 |
|
#7 |
New Member
Tobias
Join Date: Apr 2014
Posts: 2
Rep Power: 0 |
Hello SD,
did you already fix your problem? Today I did encounter the same one, however, after changing the file /Make/options it did work. Here is my options-file: EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools "files" looks like the following: makeTurModel.C LIB = $(FOAM_USER_LIBBIN)/v2f_Fluent I did inlcude it via, system/controlDict: libs ("v2f_Fluent.so") control/turbulenceProperties: simulationType RAS; RAS { RASModel v2f_Fluent; turbulence on; printCoeffs on; } I hope it did help. Cheers, Tobias |
|
February 1, 2017, 22:21 |
|
#8 |
Senior Member
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 10 |
Thers is a big difference between Turbulence model compilation before 2.3 and after it. Since you are using OF 4.1 use this tutorial,
https://pingpong.chalmers.se/public/...o?item=3256524 |
|
February 2, 2017, 11:06 |
|
#9 |
New Member
Tobias
Join Date: Apr 2014
Posts: 2
Rep Power: 0 |
Thank you! Thats really perfect! No more nasty errors when starting a simulation of using the sample function.
|
|
August 10, 2017, 11:20 |
Lookup error
|
#10 |
Member
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 9 |
I tried making a new model or new solver yesterday and messed up to get this error.
Code:
simpleFoam: symbol lookup error: /storage/home/vjc5126/OpenFOAM/vjc5126-2.3.x/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so: undefined symbol: _ZTIN4Foam14incompressible8RASModelE Code:
myLaunderSharmaKE.C LIB = $(FOAM_USER_LIBBIN)/myLaunderSharma Code:
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/ \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/tranportModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -lturbulenceModels\ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lfiniteVolume \ -lmeshTools |
|
August 11, 2017, 04:42 |
|
#11 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
I assume this is a new turbulence model that you include in a case using a "libs" subdictionary in your controlDict?
In that case, the library is dynamically loaded at run-time. That is, you don't have to recompile your solver, as your new library is not even used at compile-time. Symbol lookup errors are nasty... I've encountered quite a few myself, and I have resolved all of them... But I do not yet have a good tactic to figure out where they come from. One time, my problem arose because I did not explicitly define a (virtual) destructor in my derived class. The other time I had simply forgotten one line of the RTS. That is, they are problems in which there is "nothing" wrong with your library, and therefore it compiles. But when you actually try and use the library, errors pop up, because the library is incomplete in some manner. Since you are trying to compile a new turbulence model:
Either way, without your code, there is no way to diagnose the problem. But first, compare your code with an existing turbulence model to see whether you forgot something. |
|
March 27, 2018, 06:44 |
|
#12 |
New Member
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
Dear Kevin,
I have the same problem: yPlusRAS: symbol lookup error: /home/flowuser/OpenFOAM/flowuser-2.3.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so: undefined symbol: _ZTIN4Foam14incompressible8RASModelE I tried to create my own turbulent solver using: http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf I am using OF 2.3. Somehow I get that error everytime I use simpleFoam now. |
|
October 30, 2018, 03:07 |
|
#13 |
New Member
Karl Yang
Join Date: Jul 2016
Posts: 11
Rep Power: 10 |
I ran into the same problems as well. I successfully compiled a new turbulence model. However, I realized new things to be implemented, the second time I use the same method to compile, I encountered the same symbol look up error and never found a solution to debug it.
|
|
Tags |
new ras turbulence model, wmake libso |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiphase Turbulence Models | im_lenny | OpenFOAM Running, Solving & CFD | 8 | January 31, 2019 11:37 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
AMI interDyMFoam for mixer nu problem | danny123 | OpenFOAM Programming & Development | 8 | September 6, 2013 03:34 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |
Turbulence Models and external flow. | Alan | FLUENT | 3 | November 22, 2005 05:46 |