pyFoamPlotWatcher and customRegexp
Hello everybody,
I am having problems plotting of variables out of the logfiles with the help of pyFoam 0.5.5. Neither can I see any plot nor do I get any error while starting the plot. It would be nice if anyone can help me :) Thanks Code:
Custom01 Code:
... |
Quote:
The way I usually "develop" a regexp is by copying a log-line between "" and then replace the numbers I want to match with (%f%) |
Hello Bernhard,
what a honor to get the answer from the father of pyFoam itself. It is a realy helpfull set of tools. Actually like a swizz knife :D I found my Problem. I had to delete the space as you adviced and the customRegexp-File have to be placed where the logfile is. -> now it works greatfull Thanks Bernhard, MARTIN |
Quote:
Quote:
|
Hi PyFoamers,
is it possible to skip a value from the expression? E.g. plotting only the outlet value in the above example? Thanks in advance! Jan |
Quote:
Code:
expr " MassFlows: inlet = (%f%) outlet = (%f%)" Code:
expr " MassFlows: inlet = %f% outlet = (%f%)" Code:
expr " MassFlows: inlet = .+ outlet = (%f%)" |
Hi Bernhard,
thanks a lot for the quick reply! Best regards, Jan |
Is there any way to plot, on the same graph axes, two variables which are on different lines of the log file? I am having trouble defining multiple expressions in a single graph!
|
Quote:
|
Additional Information
I don't mean to hijack this thread, but I found out, that parentheses make problems with the regexp. I had this line of solver output
Code:
Concentration = 0.0823725 Min(T) = 0.00958365 Max(T) = 0.326796 Code:
{"expr":"Concentration = (%f%) Min(T) = (%f%) Max(T) = (%f%)","name":"Concentration"} Code:
Concentration = 0.0505933 Min T = 0.00492903 Max T = 0.217095 Code:
{"expr":"Concentration = (%f%) Min T = (%f%) Max T = (%f%)","name":"Concentration","titles":["avg","min","max"]} |
Quote:
I think I wrote this in one of my PyFoam-presentations (but probably not on the Wiki-page) |
Thanks for the explanation.
As you say on in the wiki Quote:
By the way: In the wiki in section 9.1.2 Information on regular expression both links to summaries on regular expressions are broken. |
Quote:
|
Hallo may somebody can help me:
my logFile looks like: Code:
PIMPLE: converged in 3 iterations pressure in x : 7.7394e-19 pressure in y : 0.09 Thanl you for your help |
Quote:
|
Plot residuals of any region in a multi region solver
Hi all!
I apologize for pulling up this old thread but I'm struggling with some issue that I think that fits well in it... I'm solving some cases with chtMultiRegionSimpleFoam solver with a few solid regions and a fluid one. When I run pyFoamPlotWatcher it only shows the residuals plot for the fluid region. What I would like to study is the residuals for some of the solid regions and after having searched for some info in the net I think that it would be possible by using customRegexp. The problem is that I don't have enough knowledge to tackle it on my own so here comes my question: How should my file look like? The solver's output looks like Code:
Solving for solid region regionName Code:
ReactionSpeed Any word of wisdom that can enlighten me about this matter will be much appreciated! :) Best regards, Alex |
After some attempts to make it work I didn't succeed...:(
My attempt was to create a file within the case directory with the name customRegexp as suggested in the wiki. In my case, the file contains the following information: Code:
alumina_residuals I'm using pyFoam version 0.6.4 and the order I type in the terminal is: Code:
pyFoamPlotWatcher.py --silent --progress --no-default log.chtMultiRegionSimpleFoam & Code:
Reading regular expressions from customRegexp Can anyone give me some advice on how to proceed correctly in order to write the proper regular expression to be able to plot the residuals for any region? I would really appreciate the help given! :) Best regards, Alex |
Residuals plot with vertical axis in logarithmic scale
Dear colleagues,
Finally I could manage to solve it (more or less). I get a a residuals plot by using this customRegexp file: Code:
alumina_residuals Now I have another problem, the plot shows the residuals using a linear vertical axis instead of a logarithmical axis which is not much useful because I can barely see anything... I tried to add a line in the customRegexp file in order to convert the vertical axis into logarithmic scale using the gnuplot grammar, i.e. set logscale y, but it did nothing, the plot was done in linear scale any way. How can I plot the residuals with the vertical axis in logarithmic scale? Is it possible to do that? Many thanks in advance! Alex |
Code:
logscale true; |
Amazing! As simple as that... Thanks!
Regards, Alex |
PyFoamPlotWatcher to plot min/max "p"
Dear all,
Im trying to plot min/max of pressure (p) in my domain using pyFoamPlotwatcher.py along with massflow rate. Im able to plot for massflow rate, but min(p) values are not getting plotted. My log file looks like this, //log_file_sample_start// ... ExecutionTime = 46.73 s ClockTime = 51 s MassFlows: outlet = 0.000254 inlet = -0.000254 fieldMinMax minmaxdomain output: min(p) = -9.27757 at position (0.0549444 -0.0108001 -1.09092e-21) max(p) = 13.3839 at position (0.207022 0.0251462 -1.63172e-21) min(U) = (9.83972 -1.23842 0) at position (-0.0198086 0.000156695 -2.90727e-21) max(U) = (10.0882 0.0457922 5.69625e-23) at position (0.000794772 0.00125782 -3.55445e-21) //log_file_sample_end// My customRegexp file is written like this, massFlow { accumulation first; enabled yes; expr "MassFlows: outlet = (%f%) inlet = (%f%)"; name Custom01_massFlow; theTitle "Massflow rate"; titles ( outlet inlet ); type regular; } min(p) { expr "min(p) = (%f%) at position \(%f% %f% %f%\)"; name Custom02_min(p); theTitle "min_p"; titles ( min_p ); type regular; } As I mentioned earlier, massflow values are plotted but min(p) value is not getting plotted. Moreover, i didnt receive any error. Pls give me your suggestions. Sethu |
Hi, I'm having trouble using the customRegexp and swak4Foam function objects (following from one of the OFW presentation examples). I'm getting the following error when I try to run a case with some swak4Foam expressions in controlDict and a customRegexp file:
Code:
PyFoam WARNING on line 144 of file /usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/PyFoam/Execution/ParallelExecution.py : which can not find a match for waveFoam . Hoping for the best Code:
application waveFoam; And finally my customRegexp file is: Code:
velocity { I can't see an unbalanced paranthesis... can anyone help me on this? Thanks in advance |
hello dear friends,
I am trying to plot the output of a faceSource functionObject that computes the total massflow at inlet. Here is my log for one timestep: Code:
PIMPLE: iteration 1 Code:
massflowplot Code:
pyFoamPlotRunner.py mySolver But it doesn't plot and I don't understand why. Any idea ? Do I have to write something else somewere else ? Is the regexp correct ? thanks a lot for any help ! |
Plotting particles added and escapes
Hi All,
How do you get pyFoamPlotWatcher to plot the added particle count and the escape count from solver.log? The typical time step output for particles look like below: Time = 0.875 Evolving kinematicCloud Solving 3-D cloud kinematicCloud Cloud: kinematicCloud Current number of parcels = 5045 Current mass in system = 0.00647515 Linear momentum = (-0.002015723 -0.001078755 -0.0004498539) |Linear momentum| = 0.002330069 Linear kinetic energy = 0.01457947 injector_1: number of parcels added = 6546 mass introduced = 0.008395572 Parcel fate (number, mass) : patch cyclone_inletX - escape = 0, 0 - stick = 0, 0 Parcel fate (number, mass) : patch cyclone_outlet - escape = 1501, 0.001920422 - stick = 0, 0 I wrote a Python script to print to a CSV file and plot it using Gnuplot: Code:
#!/usr/bin/python Code:
#!/bin/bash |
All times are GMT -4. The time now is 19:43. |