Run python scrpit as functionObject
Good afternoon
I would like to know if it is possible to add a python script inside a functionObject, so I can postprocess some files that I have created in a previous functionObject. I am also wondering I could use pyFOAM for it. What I am doing is 1. I extract some slices with the OpenFOAM surfaces (done already) 2. With a python script, I perform an average on each point of the slice (done with python, and what I want to add to my controlDict) Maybe with pyFOAM i could access to the field data, and then work on it directly. What do you think? Is is possible? Thank you in advance, Agustín |
Hi,
fieldValues function object seems to do what you want without Python (see $FOAM_SRC/functionObjects/field/fieldValues/controlDict for example of settings). There is also systemCall function object, which can execute arbitrary shell code, so you can execute your Python script and post-process extracted slices. |
All times are GMT -4. The time now is 15:25. |