funkyDoCalc
I haven't been able to find mention of this, but does anyone know if you can get funkyDoCalc to output to a file like a functionObject? It seems like I need to modify the utility but I'd like to know if anyone has played with it.
|
Quote:
No. It can't. Until know it was sufficient for my needs to parse the output with a script. But of course I see the usefulness of writing files Quote:
Should you successfully add the capability to write files it would be nice if you shared it. Preferably through mercurial-bundles (that way all the attributions are preserved). Have a look at the Development section in the README |
I've made some mods that allow filenames to be written. Right now I have it requiring the post processing dictionary (named postProcDict in this example) begin referenced in the controlDict like:
Code:
functions Code:
funkyDoCalcWrite <options> postProcDict |
Quote:
Could you check that? Quote:
|
Ha, I wasn't even aware of execFlowFunctionObjects! I tried it but it doesn't support my thermophysical model by default (but that modification is trivial), so having a duplicate utility doesn't seem to be a good idea. I'll just keep this to myself.
|
Quote:
BTW: if your termophysical-model is in a separate library you could try loading it by adding it to the libs-list in the controlDict |
Thanks for the advice! One last question that is related to the nuances. I am running my utility on cases solved by dieselFoam and dieselEngineFoam. I've noticed that the files written for the dieselFoam case show entries for all the time directories, while the dieselEngineFoam case only has output for the last time directory.
All my expressions are swakExpressions, and I'm using my funkyDoCalcWrite which builds on funkyDoCalc. Looking at the code, it appears that there is something going on in this snippet: Code:
functionObjectList objects(runTime,true); |
Quote:
Some questions come to mind: - how does "no output" manifest itself? The time-loop runs through, no errors but also no output? - what kinds of functionObjects do you have? Only swak-ones? And if yes: which ones? Could you try it with standard-functionObjects (like the one the samples) to see if this is a general problem or just my stuff? |
Quote:
1) "No output" means the utility runs fine through all the time directories and I get results output to the screen. In this case I am calculating the mass average of a particular species in the domain. For all time directories except the last one, I see this type of output: Code:
SpeciesSum = /*some number*/ Code:
Expression SpeciesSum = 1.13559684e-06 Code:
# Time average 2) I am currently only using swakExpressions, where Code:
expression "sum(rho*vol()*CO2)" I also tried just running execFlowFunctionObjects (with both swak and regular function objects) and I was greeted by the error: Code:
fatal flex scanner internal error--no action found EDIT: It seems this isn't strictly isolated to swak objects, as I ran execFlowFunctionObjects on the icoFoam/cavity case with libFieldFunctionObject and I got a result similar to the above: only the information from the last time directory is output. I probably should have asked the following: is there a way to control the interval that swak objects will output to file when they are used at runTime? This won't help with old cases I need to post-process, but will at least let me run new cases and have the information I need. Thanks for looking into this! |
Solution wasn't what I expected
So it turns out there was one additional difference between the two cases. In system/controlDict:
Code:
startFrom startTime; Code:
startFrom latestTime; |
hi
how to use funkyDoCalc command? I typed it as:funkyDoCalc flowInlet but it gives an error: Code:
--> FOAM FATAL IO ERROR: |
Examples can be found here:
swak4Foam/Examples/other/angledDuctImplicitTransient/testCalculations |
All times are GMT -4. The time now is 09:28. |