|
[Sponsors] |
December 24, 2016, 21:18 |
buoyantSimpleFoam - not plotting residuals
|
#1 |
Senior Member
|
Hi,
after including residual function into control dict, according to this tutorial https://www.youtube.com/watch?v=LY4jUg3lOoE Code:
functions { // #includeFunc PecletNo #includeFunc residuals } looking at residuals.dat only coloumns for pressures are written, does someone know the reason why? this is the residualDict: Code:
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" fields (alphat p p_rgh T U h); Code:
# Residuals # Time p p_rgh T Ux Uy h 1 7.66141540e-01 1.00000000e+00 2 7.98974970e-01 1.83442730e-01 3 6.27299870e-01 7.98917170e-02 4 7.00095750e-01 3.86347270e-02 5 5.92908140e-01 3.04990920e-02 6 4.58467380e-01 2.39679380e-02 7 4.45960730e-01 2.03891940e-02 8 4.34298940e-01 1.80788340e-02 9 3.52051730e-01 1.59621540e-02 10 3.76240910e-01 1.44632730e-02 regards |
|
January 5, 2017, 01:47 |
|
#2 |
Senior Member
|
Hi,
I also tried the old way: Code:
libs ("libutilityFunctionObjects.so"); functions {residuals { type residuals; writeControl timeStep; writeInterval $deltaT; fields ( U ); } } Code:
# Residuals # Time Ux Uy Uz 1 2 3 4 5 6 7 8 |
|
January 6, 2017, 12:38 |
|
#3 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
If you have a look at the solver output (log file), do you see any velocity residuals?
If not, it is because "momentumPredictor" (or something like that) in "system/fvSolution" is off/false: There are no velocity residuals if the velocity is not predicted (iterated separately) - then the velocity is fully determined by the pressure correction as to ensure continuity exactly. I suspect this is why your residual-utility fails. |
|
January 6, 2017, 18:48 |
|
#4 | |
Senior Member
|
Hi, thanks you're right, but in any case, even if I set to "yes" the moment-predictor, not all variables are plotted.
residualsDict: Code:
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" fields (alphat p p_rgh T U h k omega phi); Code:
# Residuals # Time alphat p p_rgh T Ux Uy h k omega 1 8.49454040e-01 1.00000000e+00 1.00000000e+00 9.99999860e-01 1.00000000e+00 9.39029660e-02 2 9.60117560e-03 9.93457280e-01 4.13896110e-01 2.29865230e-01 6.02265870e-01 1.66618400e-02 3 3.29224330e-02 7.58574770e-01 8.83426870e-01 1.25890060e-01 4.81928730e-01 1.03306770e-02 Code:
Time = 9 DILUPBiCG: Solving for Ux, Initial residual = 0.021375153, Final residual = 0.00021156612, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.07626579, Final residual = 0.0012698228, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.029377071, Final residual = 0.0014589073, No Iterations 1 GAMG: Solving for p_rgh, Initial residual = 0.42919448, Final residual = 0.0039295721, No Iterations 4 time step continuity errors : sum local = 0.0043774316, global = 0.0012861574, cumulative = 0.0072015916 rho max/min : 1.1888231 1.1317888 DILUPBiCG: Solving for omega, Initial residual = 0.011685404, Final residual = 0.00053581443, No Iterations 1 bounding omega, min: -23.944772 max: 617.83442 average: 20.391699 DILUPBiCG: Solving for k, Initial residual = 0.019885726, Final residual = 0.00063162881, No Iterations 1 ExecutionTime = 7.55 s ClockTime = 7 s Quote:
It's making me confusion. Do you mean that velocity has no iteration (if "no" is set) and actual values for U, at current time step, are used inside pressure inner-loop of SIMPLE alghorithm? Thanks |
||
January 9, 2017, 05:27 |
|
#5 | ||
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
I don't know about the other fields - I never used the utility you are using. Therefore, the only "other" suggestions I can give you are: pyFoamPlotWatcher.py <-- I'm using this one. The "old" way <-- This will work, but is more elaborate. Quote:
In this case, there is a residual calculated for the velocity field. If momentumPredictor is false, then the velocity from the previous timestep is taken instead. In this case, there is no residual calculated for the velocity field. Evidently, one could still define a residual based on the new velocity and the old velocity - but it is simply not calculated afaik. |
|||
January 9, 2017, 16:07 |
|
#6 |
Senior Member
|
Hi,
thanks for your reply. About pyFoam, I already use it, but as new OF release has postProcess utility, I was digging into it to understand its capabilities. Maybe a bug, maybe not....I'm thinking of make a bug report... About momentum-predictor, thanks, I'm having a closer look to background theory. Best regards. Michele |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
plotting residuals | SUBHANKAR | OpenFOAM Post-Processing | 30 | May 21, 2024 04:54 |
Plotting Residuals in Tecplot | mkewley | FLUENT | 2 | September 18, 2018 13:35 |
[PyFoam] Plotting values (e.g. residuals) from all iterations with pyFoam | chriss85 | OpenFOAM Community Contributions | 5 | November 11, 2014 12:13 |
Plotting residuals | krembil | OpenFOAM Running, Solving & CFD | 2 | August 16, 2014 04:38 |
Plotting Residuals | ata | OpenFOAM | 12 | July 8, 2011 03:50 |