1 Attachment(s)
i created a text file named flowRate in case folder and typed in terminal this:
funkyDoCalc flowRate but this error displayed: Code:
--> FOAM FATAL ERROR: Code:
funkyDoCalc ':.000539' flowRate Code:
funkyDoCalc :.000539 flowRate Code:
--> FOAM FATAL ERROR: (different subject,different post:)) could you please test in according to my case? |
I've edited my previous post... it was missing the "-time" argument. Try:
Code:
funkyDoCalc -time :0.000539 flowRate PS: weekends around the world: http://en.wikipedia.org/wiki/Workweek_and_weekend - but there is a clear reduction in posts here on the forum during Saturday and Sunday. |
Quote:
|
I typed this:
Code:
funkyDoCalc -time :.000539 flowRate Code:
Create time |
I added a phi file in 0 folder.now the results are computed in command shell but no files is created for flowInlet and flowOutlet like what was been doing before in run-time condition.
how to have flow rate written files like before(during run)? |
Quote:
|
yes phi is calculated and outputted in rhoPimpleFoam.there was not a phi file in 0 folder that i added it by calculated type.
I think its because of funkyDoCalc function fault tha only outputs in command shell and doesn't categorize them in a file like original functios do during run. any help or opinion? |
Hi Ehsan,
It took me a while to understand what you meant... but only after testing and looking at the code for funkyDoCalc did I fully understand it. You're correct, funkyDoCalc does output only onto screen, since it seems hard-coded to do so in the file "funkyDoCalc.C": Code:
Info << " " << aName << "=" << val; Unfortunately, right now I can't remember how OpenFOAM handles file output. My quickest suggestion is to look at a C++ tutorial on the topic: http://www.cplusplus.com/doc/tutorial/files/ Another suggestion is to look into the "$WM_PROJECT_DIR/applications/test" folder and look for coding examples. Best regards, Bruno |
thank you.how to use test folder?!
it is better to write in a file by arrangement than only in screen. |
I finally managed to get some time to investigate this. Here's what I found out:
In the mean time, I'll update the other thread on calcMassFlow, with a variant that outputs to a file: http://www.cfd-online.com/Forums/ope...tml#post418748 @Ehsan: After so many posts from you, I was expecting you knew what to do with a path and source code :rolleyes:. Anyway, the idea from my previous post was:
|
Quote:
Quote:
I once felt tempted to add file-output but at the time it was faster for me to use the pyFoamUtilityRunner.py to run it to get the results into a file. The there were some micro-decisions to be handled (like how to output it: multiple-files or single file, directory, header-line yes/no, filenames) and I felt at the time "I don't need it right now and any of these decisions will feel 'wrong' to 40% of the people as there is no convention for that kind of thing in OF (patchAverage etc don't write files)" Quote:
All that being said: I understand that funkyDoCalc has its shortcomings, but it was written at the time as a utility to quickly do some checks on an existing run (like checking mass conservation etc) and for the other stuff that I'm using it for (checking results inside of a testsuite) output to stdout, parsing it with PyFoam is actually more convenient. Having output for it is on my to-do list but not very high |
Hi Bernhard,
I had already guessed as much; handling stuff directly from stdout is also my usual way of handling this kind of data. But unfortunately I'm not yet familiar enough with PyFoam or which exact PyFoam script, in order to suggest a solution based on it... and I wasn't in the mood for suggesting a solution based on grep+sed+awk... And as I said (er, wrote), I'm interested in doing #3 myself... a funkyDoFunctionObjects seems to be a very interesting topic :) I'll try to look into it in my next vacation... Best regards, Bruno |
hi
is there a simple (for you not me :D) script that it writes first and second columns in separate folders so that I can use them easier in libre Office (and get summation on mass flow values)?(because of huge numbers its so difficult to separate them manually);) |
Quote:
|
how to select a column?it selects all in file while drag and paste both parts in libre office in one column and have to delete not wanted in each cell manually.
|
1 Attachment(s)
@Ehsan:
Quote:
There are so many ways to do it and all of the ones below will show a dialogue box that help you import data (or at least it should):
You can even choose which columns to not include! In the picture attached shows this in practice... An explanation about each one of these controls is shown here: https://help.libreoffice.org/Common/Text_Import As for having to erase one cell at a time... there are at least two ways to do the selection of a complete row or column:
I'm almost speechless... I understand I've known these tricks for so long, but I'm finding it very hard to believe that you don't know about none of these :( Well, if you can use Libreoffice Calc to post-process data, then you don't need me to spend any more time implementing the total sum of mass flow over time, because Libreoffice Calc can easily help you do that. Best regards, Bruno |
thanks a lot for the complete explanation!
I was not familiar with office Calc because haven't need it to import any data so far( I am only 4-5 months in Linux) .the I mport page was displayed but the fields was gray.I examined randomly "separated by" and got disappointed (but not space):D ! no then you don't have to try more on it. it has been a lot of effort you have done so far.thank you again for all help. could you please help in how to have p,T,U on patches by swak4FOAM post processing functions(and also total pressure by defining it in postProcessing functions not by modifying solver)? |
there are several folders of mass flow.is it possible to put them in one sheet rather than different sheets?or how to work with different sheets?
And how can i have a column of deltaT(lower value minus upper value in a time column) I see maybe its more efficient if modify calcMassFlow. |
Hi Ehsan,
I forgot that you're not familiar with Libreoffice Calc... If you can access Youtube, here is a playlist with instructional videos on how to use Libreoffice Calc: http://www.youtube.com/watch?v=HdOLx...948B34&index=1 If for some reason you cannot access Youtube (it could be blocked at school, or bandwidth restrictions or some other reason), the following textual tutorials may help:
Bruno |
Quote:
|
All times are GMT -4. The time now is 05:25. |