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

LESModel type unknown in v3.0.1

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By liangshi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2016, 10:34
Default LESModel type unknown in v3.0.1
  #1
New Member
 
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 11
liangshi is on a distinguished road
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.C
LIB = $(FOAM_USER_LIBBIN)/libuserincompressibleLESModels
Make/options:
EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

LIB_LIBS = \
-lfiniteVolume \
-lmeshTools
liangshi is offline   Reply With Quote

Old   April 5, 2016, 16:55
Default
  #2
New Member
 
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 11
liangshi is on a distinguished road
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)
addToRunTimeSelectionTable(LESModel, NEWMODEL, dictionary)
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 09:54.
liangshi is offline   Reply With Quote

Old   April 8, 2016, 09:58
Default AddToRuntimeSelectionTable in OF 3.0.x
  #3
New Member
 
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 11
liangshi is on a distinguished road
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.
liangshi is offline   Reply With Quote

Old   April 12, 2016, 16:26
Default
  #4
New Member
 
Liang Shi
Join Date: Nov 2014
Posts: 4
Rep Power: 11
liangshi is on a distinguished road
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);
Make/files
Code:
makeMyTurbulenceModels.C

LIB = $(FOAM_USER_LIBBIN)/libuserincompressibleLESModels
Make/options
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
Hope it is helpful.
guanjiang.chen likes this.

Last edited by liangshi; April 13, 2016 at 13:03.
liangshi is offline   Reply With Quote

Reply


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
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
Modified pimpleFoam solver to MRFPimpleFoam solver hiuluom OpenFOAM Programming & Development 12 June 14, 2015 21:22
Boundary Conditions MtnRunBeachBum OpenFOAM Pre-Processing 1 April 30, 2015 16:33
Strange high velocity in centrifugal pump simulation huangxianbei OpenFOAM Running, Solving & CFD 26 August 15, 2014 02:27
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 22:14.