How to implement a new limiter function?
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 |
Greetings Lorenzo,
Try adding to the case's "system/controlDict" this line: Code:
libs ("libMyLibrary.so"); Best regards, Bruno |
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 |
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? |
Hi Mahdi,
What is the content of the file "Make/files" and "Make/options"? Best regards, Bruno |
[Solved] Implementing and linking your own limiter
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 Code:
EXE_INC = \ 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"); |
What I was missing was to copy it to platform, thanks for the step by step guide
|
I tired to add this to foamwiki but I couldn't figure out how to do it, any hint?
|
All times are GMT -4. The time now is 15:53. |