|
[Sponsors] |
October 4, 2012, 10:15 |
I want to plot residual U:
|
#1 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
Hi dear Foamers.I have a problem,please help me to solve this.
Im working with interPhaseChaneFoam solver!!!in the end of run I want to have residual plot!!! I have log file but in this I havent residual for Ux,Uy and Uz!!!! I want to have residual U,but I seen: "plotres.txt", line 7: warning: Skipping data file with no valid points plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,"< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,"< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines ^ "plotres.txt", line 7: x range is invalid??? please help me to plot this residual!!! {for more Description. Im using gnuplot.for this work im do this work step by step: 1-my solver >log 2-tail -f log 3-Crtl+C 4-gnuplot plotres.txt (file plotres.txt include: set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'Solving for U' | cut -d' ' -f9 | tr -d ','" title 'U' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ pause 1 reread ) } ///////////////////////////////////////////////////////////////////////// The point that needs to be said: I plot residual P with this Commands in gnuplot!!! ///////////////////////////////////////////////////////////////////////// please help me for this problem?? Thanks for your Attention. |
|
October 5, 2012, 04:29 |
|
#2 |
Member
|
could you post a small part of the logfile where the velocity residual is listet. we can then think about the correct syntax for your plot.
__________________
~~~_/)~~~ |
|
October 5, 2012, 07:39 |
|
#3 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
You may want to use the foamLog utility.
|
|
October 5, 2012, 11:39 |
Hi dear SirWombat.
|
#4 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
Hi dear SirWombat.
Thanks for your answer,I attachment Part of the log file in my log file.txt and plotres.txt,I hope that you with them,solve my problem??? Thank you very much. Last edited by vahid.najafi; October 5, 2012 at 12:18. |
|
October 5, 2012, 12:16 |
Thanks dear Bernarad for your answer.
|
#5 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
Hi Dear Bernhard,Thanks for your answer.
please give me more information about to use the foamLog utility??? I've never use it!!! |
|
October 5, 2012, 16:36 |
|
#6 |
Member
|
Have a look at the official documentation: http://www.openfoam.org/docs/user/monitoring-jobs.php
Code:
foamLog "my log file.txt" Code:
gnuplot --persist -e "plot 'logs/p_rgh_0' w lines;" about the velocity residual: i cannot find it in your log file, so unfortunately i cannot help you with that. There is this "max(U)" and you can surely extract this by using: Code:
grep "max(U)" "my log file.txt" | awk '{print $2}'
__________________
~~~_/)~~~ Last edited by SirWombat; October 8, 2012 at 05:10. |
|
October 6, 2012, 01:22 |
Tnx
|
#7 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
Hi agian dear SirWombat.
Thanks for your reply. Im trying your commands ,but i dont succes to plot residual U yet!!!??? I ask you,if do you find a solution,advice to me. However,thanks for your Guidance. |
|
October 8, 2012, 04:13 |
|
#8 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
You can use it ase "foamLog log" and you'll get a directory ./logs, where, I think, the are easily related to the original logfile.
|
|
July 7, 2013, 09:32 |
|
#9 | |
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 15 |
Quote:
it will show you the residuals during the run. |
||
June 2, 2014, 10:29 |
|
#10 |
New Member
Amir
Join Date: Jan 2014
Posts: 3
Rep Power: 12 |
Hi Vahid
I think you must remove the ,\ at the end of line 7 (just one line before pause 1). |
|
June 2, 2014, 10:31 |
|
#11 |
New Member
Amir
Join Date: Jan 2014
Posts: 3
Rep Power: 12 |
set logscale y
set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ "< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,\ "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\ "< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines pause 1 reread |
|
July 1, 2016, 03:54 |
Need help in OpenFoam COmbustion Model
|
#12 |
New Member
A V Shelke
Join Date: Jun 2014
Location: UK
Posts: 10
Rep Power: 12 |
Dear Foamer,
I am working on fuel cloud combustion, in which a fuel vapor cloud is getting form in case of leakage of fuel and get ignited by any heat source available. I have tried this in fireFoam as fuel C3H8 is inlet from ground for certain time span to make a cloud. with singleStepReactingMixture, infinitelyFastChemistry<psiThermoCombustion,constG asHThermoPhysics> started the chemical reaction as O2 comes contact in C3H8.. in many available "ignition" contained model do not contain the species fraction that I required as CO2, H2O so I need a model that contain: 1 Radiation Model 2 LES 3 Species Transport 4 Spark ignition |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |