|
[Sponsors] |
May 21, 2019, 04:28 |
residual Field
|
#1 |
New Member
Eric
Join Date: Apr 2019
Location: Zwickau, Saxony, Germany
Posts: 2
Rep Power: 0 |
Hello everybody,
currently I am doing steadystate RAS external aerodynamics simulation for road cars e.g (DrivAer) for my thesis with OpenFOAM v1812. On this thread How to plot local residuals' field (for each cell) ? OF 5.x I found that it is possible to view the local residuals (p Ux Uy Uz ..) for each cell in Paraview, and it works perfect for p but unfortunatly not for U , k, and Epsilon. The feature is also described here: https://www.openfoam.com/releases/op...esidual-fields To use the utility I added the residualFieldDict to the systems Folder. It contains the following Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ residualsField { type residuals; libs ("libutilityFunctionObjects.so"); writeFields true; writeControl outputTime; fields (p U k epsilon omega); } residuals { type residuals; libs ("libutilityFunctionObjects.so"); writeFields true; writeControl outputTime; fields (p U k epsilon omega); } // ************************************************************************* // Code:
... functions { #include "residualFieldDict" } Here you can see the diffrence between the created files in my folder for 3000 Iteration. initialResidual:p contains a lot of field informaion Code:
FoamFile { version 2.0; format ascii; class volScalarField; location "3000"; object initialResidual:p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField nonuniform List<scalar> 364811 ( -4.15537e-09 -9.58299e-10 -8.97218e-09 1.77756e-09 -1.5212e-09 8.05321e-09 -2.7556e-10 -3.48638e-09 -5.27514e-09 3.91361e-09 -6.64565e-10 1.52268e-09 -5.25854e-10 -4.30708e-09 7.58053e-09 ... Code:
FoamFile { version 2.0; format ascii; class volScalarField; location "3000"; object initialResidual:Uz; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { symmetryWall { type symmetry; } sideWall { type zeroGradient; } inlet { type zeroGradient; } outlet { type zeroGradient; } lowerWall { type zeroGradient; } upperWall { type zeroGradient; } wheel_FL_wheel { type zeroGradient; } body_body_lights_front { type zeroGradient; } Would be nice if you can give me related informations to solve this Problem. Thanks for your help, Eric |
|
May 29, 2019, 13:09 |
|
#2 |
Member
Andrea
Join Date: Mar 2018
Posts: 62
Rep Power: 8 |
have you solved your problem? i would like to see cell's residual too.
|
|
June 3, 2019, 04:12 |
|
#3 |
New Member
Eric
Join Date: Apr 2019
Location: Zwickau, Saxony, Germany
Posts: 2
Rep Power: 0 |
Hi Andrea,
I had no progress on this one so far, but maybe a more advanced user can have a look at this or provide another strategie to get these kind of information. There are several options: - I am using the tool in the wrong way - I did a small typo somewhere - It is a bug in the tool (but I dont think so) So as I mentioned before, if you want to have a look at pressure residual it will be fine but not for U k epsilon ... Did you have the same result Andrea? Would be nice if some can test this on their own calculation and share experience. Have a nice day! |
|
October 1, 2019, 15:49 |
|
#4 |
Member
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15 |
Hi,
I think the reason lies in the solver used for variables other than p, which is usually (and presumably in your case) solved with GAMG. If you solve "U, k, omega, ..." with PBiCGStab or PBiCG than the residual field of every can be stored using solverInfo: Code:
residuals { type solverInfo; libs ("libutilityFunctionObjects.so"); writeResidualFields yes; writeControl writeTime; fields (".*"); } Luca Last edited by marluc; October 3, 2019 at 16:01. |
|
June 26, 2020, 07:34 |
|
#5 |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
I was recently having some difficulty writing out the residual fields (to visualize in paraview), but was unable to do so.
In v1912, the "residuals" utility function object has been replaced by "solverInfo" as mentioned above. However, even with the "writeResidualFields" set to yes/true, the fields were not being written. The issue appears to be with the choice of linear solver. I could only get the residual fields to be written using GAMG and NOT PBiCG or smoothSolver. I do not have an explanation as to why the residual fields are only written for GAMG. |
|
December 24, 2020, 07:25 |
|
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
You can follow the discussions for the fix:
solverInfo functionObject: writeResidualFields only works for pressure and not for other fields
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
Tags |
field, local residual, residual field, residualfielddict, residuals |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free surface issues with interDyMFoam for hydroturbine | oumnion | OpenFOAM Running, Solving & CFD | 0 | October 6, 2017 15:05 |
HeatSource BC to the whole region in chtMultiRegionHeater | xsa | OpenFOAM Running, Solving & CFD | 3 | November 7, 2016 06:07 |
Wrong fluctuation of pressure in transient simulation | caitao | OpenFOAM Running, Solving & CFD | 2 | March 5, 2015 22:33 |
SLTS+rhoPisoFoam: what is rDeltaT??? | nileshjrane | OpenFOAM Running, Solving & CFD | 4 | February 25, 2013 05:13 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |