CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

making a custom functionObject

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2021, 16:45
Smile making a custom functionObject
  #1
New Member
 
Nipin L
Join Date: Nov 2012
Location: India
Posts: 17
Rep Power: 13
nipinl is on a distinguished road
For learning purpose, I have copied vorticity function object and changed its name to vorticity2( and changed all necessary places in .C an .H file, I feel). I have compiled it to "libmyFunctionObjects.so". I added the following in the system/controlDict of the cavity case.



function
{
vort
{
type vorticity2;
libs ("libmyFunctionObjects.so");
}
}
However, it failed to calculate the vorticity. postProcess -func vorticity2 also run without writing any file.

It would be great if somebody point out where I went wrong or what knowledge I lack to proceed? I use OpenFOAM-v2012.
nipinl is offline   Reply With Quote

Old   May 25, 2021, 06:56
Smile I solved it.
  #2
New Member
 
Nipin L
Join Date: Nov 2012
Location: India
Posts: 17
Rep Power: 13
nipinl is on a distinguished road
I had to add an entry

libs ("libfieldFunctionObjects.so");


with this it worked flawlessly. Hope this may be useful to some one.
nipinl is offline   Reply With Quote

Old   July 18, 2021, 15:55
Default
  #3
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Quote:
Originally Posted by nipinl View Post
I had to add an entry

libs ("libfieldFunctionObjects.so");


with this it worked flawlessly. Hope this may be useful to some one.

Hi,

I have been struggling with this issue.

To make it clear.

You had something like this:

Code:
libs ("libfieldFunctionObjects.so");

functions
{
    vort
    {
            type vorticity2;
            libs ("libmyFunctionObjects.so");
    }
}
And where able to call it in the terminal with:
Code:
postProcess -func vorticity2
Is this correct?
Shibi is offline   Reply With Quote

Old   July 19, 2021, 00:06
Default
  #4
New Member
 
Nipin L
Join Date: Nov 2012
Location: India
Posts: 17
Rep Power: 13
nipinl is on a distinguished road
Yes, Exactly!
nipinl is offline   Reply With Quote

Reply

Tags
functionobject, openfoam-v2012, vorticity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 16:05
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 23:45.