make custom functionObject available with postProcess
Hello to all,
I would like to know how to make a custom functionObject available via the postProcess utility in OpenFOAM from ESI (v2012). As an example, I have duplicated the writeCellCentres functionObject and renamed it as myWriteCellCentres. Did the same inside the .H and .C files. Prepared a Make folder with (copied from OpenFOAM-v2012/src/functionObjects/field): files Code:
myWriteCellCentres.C Code:
EXE_INC = \ Code:
functions When I try to execute it with the postProcess utility with: Code:
postProcess -func myWriteCellCentres -lib myFunctionObjects Code:
--> FOAM Warning : What is the correct way of calling a custom functionObject with postProcess? |
Anyone can give a hand with this issue?
|
You can try by including your compiled library in libs entry in controlDict file. This will load your library while running the case and your functionObject should be then available for postProcess utility.
-Yogesh |
Quote:
The function execution is by your function name, not by the type of functionObject. |
1 Attachment(s)
Quote:
Hello Mr. Olesen, I had no luck with that. I know you have a very busy schedule but I will attach the case with the functionObject in case your are interested in having a look. Attachment 85456 |
Same issue here
Hi there. I'm facing the same issue. I use the primer openfoam.
I've compilated my custom function object with Code:
LIB = $(FOAM_USER_LIBBIN)/libcalcul_surface_faceFunctionObject Code:
functions Code:
--> FOAM Warning : |
try with the foamLibrary utility if your library can even load properly. If it does load then did you also remember to register the function in your code as well?
|
Hello Olesen. Thanks for your message. I'm sad because it seems that I'm not enough skilled to fully understand it.
Yes foamHasLibrary -detail libcalcul_surface_faceFunctionObject.so do returns me the lib. What do you mean by register the function ? I put TypeName("calcul_surface_face"); inside the header of my class declaraction if this is what you means. Code:
/*---------------------------------------------------------------------------*\ |
Quote:
Code:
|
Yes I have it :
Code:
/*---------------------------------------------------------------------------*\ |
In fact when I run it on a tutorial case with one of the following comand :
postProcess -func calcul_surface_face or postProcess it does works ! But the openfoam case I wanted to treat was an old case which was run with openfoam8. With this case : (using ofv23 and the objectFunction compiled with ofv23) postProcess -func calcul_surface_face doesn't find the function or postProcess works This is quite strange but I suppose my issue is solved. Thanks Olesen |
All times are GMT -4. The time now is 18:51. |