|
[Sponsors] |
April 21, 2021, 17:45 |
making a custom functionObject
|
#1 |
New Member
Nipin L
Join Date: Nov 2012
Location: Canada
Posts: 23
Rep Power: 14 |
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. |
|
May 25, 2021, 07:56 |
I solved it.
|
#2 |
New Member
Nipin L
Join Date: Nov 2012
Location: Canada
Posts: 23
Rep Power: 14 |
I had to add an entry
libs ("libfieldFunctionObjects.so"); with this it worked flawlessly. Hope this may be useful to some one. |
|
July 18, 2021, 16:55 |
|
#3 | |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Quote:
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"); } } Code:
postProcess -func vorticity2 |
||
July 19, 2021, 01:06 |
|
#4 |
New Member
Nipin L
Join Date: Nov 2012
Location: Canada
Posts: 23
Rep Power: 14 |
Yes, Exactly!
|
|
Tags |
functionobject, openfoam-v2012, vorticity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 17:05 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |