|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
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 |
|||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
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 ( #include"postProcDict" ); libs ( *list of required libraries* ); Code:
funkyDoCalcWrite <options> postProcDict |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Could you check that? Usually I'd say " 'svn diff' against the downloaded version", but yours is a separate, new utility so the relevant files would be OK (just don't want to go through the whole sources to find differences. Preferred is still "hg bundle" (as described in the README) as it helps me keeping track of the contributors |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
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 |
||
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
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); Info << "Read status: " << objects.start(); ... Foam::Info << "\nTime = " << runTime.timeName() << Foam::endl; Info << mesh.readUpdate(); //Problem occurs in this space Info << "Writing objects: " << objects.execute(true) << Foam::endl; |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
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? |
||
![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
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 SpeciesSum = 1.13559684e-06 Code:
# Time average 390 1.13559684e-06 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! Last edited by mturcios777; November 22, 2011 at 13:40. Reason: Updated with more information |
||
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 ![]() |
So it turns out there was one additional difference between the two cases. In system/controlDict:
Code:
startFrom startTime; Code:
startFrom latestTime; |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 ![]() |
hi
how to use funkyDoCalc command? I typed it as:funkyDoCalc flowInlet but it gives an error: Code:
--> FOAM FATAL IO ERROR: Istream not OK for reading dictionary file: flowInlet at line 1. From function dictionary::read(Istream&, bool) in file db/dictionary/dictionaryIO.C at line 91. FOAM exiting |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 ![]() |
Examples can be found here:
swak4Foam/Examples/other/angledDuctImplicitTransient/testCalculations |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 03:30 |
[swak4Foam] funkydoCalc issue with snGrad | manuc | OpenFOAM Community Contributions | 2 | January 2, 2018 11:00 |
[swak4Foam] funkyDoCalc in cyclic system | S choi | OpenFOAM Community Contributions | 1 | November 7, 2016 16:41 |
[swak4Foam] funkyDoCalc write fields | Astrodan | OpenFOAM Community Contributions | 0 | March 24, 2016 06:44 |
[swak4Foam] funkyDoCalc mass flow over stl surface? | lourencosm | OpenFOAM Community Contributions | 0 | November 28, 2014 07:50 |