|
[Sponsors] |
February 20, 2015, 03:51 |
Local Residuals for rhoSimpleFoam
|
#1 |
New Member
Join Date: Feb 2013
Posts: 17
Rep Power: 13 |
Hello,
I'm looking for a way to calculate the local residuals of the velocity-field. I know that there is a utility (namely simpleFoamResiduals) to do this for a simpleFoam setup, however it doesn't work with a rhoSimpleFoam case. Is there a way to calculate the residual field of a rhoSimpleFoam simulation in a way that allows me to view it in Paraview? I'm glad for any help. |
|
May 4, 2017, 08:07 |
|
#2 |
Member
Fynn
Join Date: Feb 2016
Posts: 48
Rep Power: 10 |
Hi Werne,
There's no residual field. What you probably want is to plot the residual of some field. For the rhoSimpleFoam solver you can plot the residuals for p and U simply by executing the residuals function object: Add this to your controlDict file: Code:
functions { #includeFunc residuals } Code:
$WM_PROJECT_DIR/etc/caseDicts/postProcessing/numerical/residuals Code:
foamMonitor -l postProcessing/residuals/0/residuals.dat HTML Code:
https://cfd.direct/openfoam/user-guide/graphs-monitoring/ cheers, Fynn Last edited by PanPeter; May 6, 2017 at 06:38. Reason: error in residuals dictionary path: $FOAM_SRC ---> $WM_PROJECT_DIR |
|
May 5, 2017, 12:15 |
|
#3 |
Member
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11 |
Hello,
me too I'm using rhoSimpleFoam in this case " solver for supersonic flow butane close to condensation" and I'd like to plot residuals. I do that, but I have the problem that U, Ux, Uv, etc.. are not plotted. Is the above description useful to solve this issue? Or is it independent? Thanks Last edited by enginpower; May 8, 2017 at 08:18. |
|
May 6, 2017, 06:52 |
|
#4 | |
Member
Fynn
Join Date: Feb 2016
Posts: 48
Rep Power: 10 |
Hi enginpower,
First, note that I corrected an error in my post above. Does that already fix your problem? If not: Quote:
Or is there not even an empty gnuPlot window appearing? Then foamMonitor should give you an error message. cheers, Fynn |
||
May 8, 2017, 08:16 |
|
#5 |
Member
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11 |
Hi,
thanks for reply Actually, I'm using this script: Code:
set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log.rhoSimpleFoam | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for U' | cut -d' ' -f9 | tr -d ','" title 'U' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for epsilon' | cut -d' ' -f9 | tr -d ','" title 'epsilon' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for nut' | cut -d' ' -f9 | tr -d ','" title 'nut' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for T' | cut -d' ' -f9 | tr -d ','" title 'T' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for e' | cut -d' ' -f9 | tr -d ','" title 'e' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for rho' | cut -d' ' -f9 | tr -d ','" title 'rho' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for alphat' | cut -d' ' -f9 | tr -d ','" title 'alphat' with lines,\ "< cat log.rhoSimpleFoam | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines pause 1 reset reread As I explained in this post, the problem is not plotting in general, but plotting some variables like Ux, Uy, etc... As you can see in this image, the residuals of other variables are plotted, what is not plotted is the velocity residuals. A concern to help to understand this is that Ux information is not in the log file. What I mean is this:
Thanks to who wants to help me |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 15:33 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 04:03 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 07:36 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |