|
[Sponsors] |
August 18, 2016, 13:57 |
Create new functionObject library
|
#1 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hi All,
I am looking to create my own function object that can be used to calculate some metrics during runtime by including my new function object in $FOAM_CASE/system/controlDict. According to this page http://foam.sourceforge.net/docs/cpp/a00004.html this should be easy and so I need to implement "libMyFunctionObjectlib.so" in the same way that there is already an implementation for "libForces.so". Then I imagine I can modify an existing .so file and do what I need there, compile the new library and I'm done. The only problem is I can't seem to find these .so files! I have tried searching using grep -r "libForces.so" $FOAM_SRC but I get nothing! Any ideas? |
|
August 24, 2016, 15:16 |
|
#2 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
You don't modify .so objects!!! you modify the source code and compile it to make your own .so object, then put the lib("libMyFunctionObject.so"); to your controlDict and that makes your possible to use your function object there.
Also it would be helpful to take a look at this thread: http://www.cfd-online.com/Forums/ope...on-object.html |
|
August 24, 2016, 15:17 |
|
#3 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
You don't modify .so objects!!! you modify the source code and compile it to make your own .so object, then put the lib("libMyFunctionObject.so"); to your controlDict and that makes your possible to use your function object there.
Also it would be helpful to take a look at this thread: http://www.cfd-online.com/Forums/ope...on-object.html |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using fieldAverage library to average postprocessing | eelcovv | OpenFOAM Programming & Development | 32 | May 17, 2022 10:55 |
using a Fortran library of thermodynamics inside sutherland transport model | Mehdi3031 | OpenFOAM Programming & Development | 0 | April 7, 2016 10:34 |
Troubles when create a new volScalarField in my own library | mxylondon | OpenFOAM Programming & Development | 6 | June 20, 2013 03:42 |
How to create my own functionObject ? | panda60 | OpenFOAM | 5 | May 25, 2010 10:39 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 08:06 |