|
[Sponsors] |
April 1, 2016, 11:34 |
LESModel type unknown in v3.0.1
|
#1 |
New Member
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 12 |
Hi OF users,
I implement a new LES model and successfully compiled with OF 3.0.1 (the files and options are attached below). The new LES model is wrapped into the library libuserincompressibleLESModels.so in the folder $(FOAM_USER_LIBBIN). To test this model, I included in the controlDict a line like libs("libuserincompressibleLESModels.so"); However, the pimpleFoam does not recognize this new model, telling me the unknown LESModel error. (If I use the same configuration and use the build-in LES model, the case runs succusfully.) Any ideas on the problem? Thanks ------- Make/files: newLESModel/newLESModel.CMake/options: EXE_INC = \ |
|
April 5, 2016, 17:55 |
|
#2 |
New Member
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 12 |
I basically narrow down the problem to the addtoruntimeselection.
Since the version 3.0.x has a different structure for addtoruntimeselection which separates the implementation of basic LES models (e.g., smagorinsky) and addtoruntimeselection, the solver simply does not know the user-defined new model. In v2.0.x, it is pretty straightforward, just adding these two lines to the implementation defineTypeNameAndDebug(NEWMODEL,0)This does not work anymore in v3.0.x. Any ideas to add the new model to the runtime selection table in v3.0.x? Many thanks. Last edited by liangshi; April 8, 2016 at 10:54. |
|
April 8, 2016, 10:58 |
AddToRuntimeSelectionTable in OF 3.0.x
|
#3 |
New Member
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 12 |
Foam gurus,
How to add the user defined turbulence model to the runtime selection table in OF 3.0.x? Any ideas or threads? Many thanks. |
|
April 12, 2016, 17:26 |
|
#4 |
New Member
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 12 |
Solution:
creat a file named makeMyTurbulenceModels.C and compile the new model (newmodel.H) by compiling this file. makeMyTurbulenceModels.C Code:
#include "IncompressibleTurbulenceModel.H" #include "incompressible/transportModel/transportModel.H" #include "addToRunTimeSelectionTable.H" #include "makeTurbulenceModel.H" #include "LESModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IncompressibleTurbulenceModel<transportModel> transportModelIncompressibleTurbulenceModel; typedef LESModel<transportModelIncompressibleTurbulenceModel> LEStransportModelIncompressibleTurbulenceModel; } #include "newmodel.H" makeTemplatedTurbulenceModel(transportModelIncompressibleTurbulenceModel,LES,newmodel); Code:
makeMyTurbulenceModels.C LIB = $(FOAM_USER_LIBBIN)/libuserincompressibleLESModels Code:
EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude/ \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -lincompressibleTurbulenceModels Last edited by liangshi; April 13, 2016 at 14:03. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
time step continuity problem in VAWT simulation | lpz_michele | OpenFOAM Running, Solving & CFD | 5 | February 22, 2018 20:50 |
Modified pimpleFoam solver to MRFPimpleFoam solver | hiuluom | OpenFOAM Programming & Development | 12 | June 14, 2015 22:22 |
Boundary Conditions | MtnRunBeachBum | OpenFOAM Pre-Processing | 1 | April 30, 2015 17:33 |
Strange high velocity in centrifugal pump simulation | huangxianbei | OpenFOAM Running, Solving & CFD | 26 | August 15, 2014 03:27 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |