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

Create new functionObject library

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2016, 13:57
Default Create new functionObject library
  #1
Member
 
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11
Jack001 is on a distinguished road
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?
Jack001 is offline   Reply With Quote

Old   August 24, 2016, 15:16
Default
  #2
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
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
anishtain4 is offline   Reply With Quote

Old   August 24, 2016, 15:17
Default
  #3
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
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
anishtain4 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
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


All times are GMT -4. The time now is 08:59.