flowRatePatch for multiple patches simultaneously
I am trying to process data during run time of an OF model. I can successfully output volume flow rate through a specific patch (say outlet) per instructions here:
https://cfd.direct/openfoam/user-gui...rocessing-cli/ However, I would like to output flow rates for more than one patch, say for both inlet and outlet. Specifically I would like to dump the data like this in two columns: _________ Inlet______Outlet time______x.xx_______y.yy What changes do I need to make to my flowRatePatch file? This is my current one: HTML Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Swak4Foam
swak4foam is used to do runtime outputs/calculations/...
You need this in your controlDict Code:
functions{ in case you only need the finished solution try: https://www.cfd-online.com/Forums/op...lculation.html |
Thanks for your help and suggestion. I tried your method and I got:
HTML Code:
[5] --> FOAM FATAL ERROR: I would also prefer to use OF's built-in function of flowRatePatch. Its working perfectly for one defined surface (outlet). I thought that it may be simple to add another surface to the output column. I tried this in flowRatePatch, but OF didn't like that ether HTML Code:
name (inlet outlet); |
libs included?
If you have swak compiled and working I guess you also have the libs in the controlDict ?
I use Code:
"libsimpleSwakFunctionObjects.so" Then you could define your own expression for massFlow, but I believe I cannot help you with rewriting the flowRatePatch function from OF. |
flowRatePatch for multiple patches simultaneously
i finally became able of solving this issue.
By writing a bash file it is possible to calculate flow rate patch on different boundaries. Here i leave the linux command: sed -i "s/name inlet;/name outlet;/g" system/flowRatePatch |
Quote:
Hi Felix, Seems like OpenFOAM 18 users cannot use swak4foam. I also cannot get flowRatePatch running due to the following warning (simulation continues without patch calculation): Starting time loop --> FOAM Warning : From function bool Foam::functionObjectList::read() in file db/functionObjects/functionObjectList/functionObjectList.C at line 738 Reading "/home/mm/OpenFOAM/OpenFOAM-v1812/20190509/system/controlDict" Entry name is not a dictionary Any thoughts on this are most appreciate :) |
All times are GMT -4. The time now is 19:36. |