|
[Sponsors] |
February 6, 2013, 10:46 |
How to implement a new limiter function?
|
#1 |
New Member
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
Hi foamers,
I'd like to know how to implement a new kind of limiter function (to be used to interpolate from cell center to face center). The problem is not the implementation of the limiter itself, but how to link it in the standard OF library, so that it becomes available in the standard interpolation list, like the various Van Albada, Van Leer, minmod, etc... I tried to follow a tutorial for "implementing my turbulence model" and to understand the undelying philosophy, but when i launched "wmake libso" it said that everything was up to date... Thanks |
|
February 10, 2013, 06:46 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Lorenzo,
Try adding to the case's "system/controlDict" this line: Code:
libs ("libMyLibrary.so"); Best regards, Bruno
__________________
|
|
February 12, 2013, 06:16 |
|
#3 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
Limiters you mentioned are already there, take a look at:
$FOAM_SRC\finiteVolume\interpolation\surfaceInterp olation\limitedSchemes and you see vanAlbada, Minmod They are not just mentioned in the guide |
|
February 19, 2013, 08:11 |
|
#4 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
I need to implement a new limiter, it is not much different from vanLeer so:
1. I copied it to the $WM_PROJECT_USER_DIR 2. changed the files according to what I needed 3. made Make directory and 'file', 'option' files in it 4. Tried 'wmake libso' but it returns libNULL.so is up to date, and when I want to access my limiter it just complains there is not such a limiter, please let me know what should I do? |
|
February 19, 2013, 08:24 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Mahdi,
What is the content of the file "Make/files" and "Make/options"? Best regards, Bruno
__________________
|
|
February 20, 2013, 03:20 |
[Solved] Implementing and linking your own limiter
|
#6 |
New Member
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
I finally managed to implement and link my own limiter.
Just follow the tutorial for "How to implementi your own turbulence model" you can find on the internet, and code your scheme. Then, create a Make folder, with a "files" and an "options" file inside it. In the "files" file you have to write, for instance Code:
myLimiterSourceCode.C EXE = $(FOAM_USER_LIBBIN)/libMyLimiter Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lmeshTools I copied the libNULL.so into my platforms/Linux64GCCDPOpt/lib and renamed it as libMyLimiter.so Finally, to make it available, as suggested by wyldckat (thank you very much!), i hard linked it into my ControlDict file like Code:
libs ("libMyLimiter.so"); |
|
February 21, 2013, 02:47 |
|
#7 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
What I was missing was to copy it to platform, thanks for the step by step guide
|
|
February 21, 2013, 03:05 |
|
#8 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
I tired to add this to foamwiki but I couldn't figure out how to do it, any hint?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 12:21 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |