CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Setting residuals for velocity per direction

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By krzychu111
  • 4 Post By pete20r2
  • 1 Post By krzychu111

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2018, 18:22
Default Setting residuals for velocity per direction
  #1
New Member
 
Join Date: Oct 2018
Posts: 19
Rep Power: 7
krzychu111 is on a distinguished road
Hi,
is it possible to set residuals per direction for velocity in fvSolution? I've tried changing "(U)Final" to "(Ux)Final" or "(U1)Final" but it didn't work. Does anybody have any idea?



Background:
I'm working on axisimmetric no swirl case. My simulation doesn't stop only because of Uz residual which is not reducing below 1e-4. On my simulation Uz speed is in range from -1e-14 to 1e-14 m/s (which is still big enough to spoil the residual) and I found out (searching through the Internet) that setting Uz speed to zero require adjusting openfoam code and recompiling of which I don't feel catable
sourav90 likes this.
krzychu111 is offline   Reply With Quote

Old   November 12, 2018, 21:52
Default
  #2
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
Is it axisymmetric as in a wedge mesh? 1e-14 is a good as 0 considering the machine tolerance. Because the numbers are so small, and near machine tolerance, rounding errors and oscillations cause large RELATIVE differences in the filed between steps, hence the fairly large residuals.
I think you need to find another way to decide if the case is converged if you want it to stop automatically. Evidently, you know that by watching the min/max plot for Uz and deciding that the Uz field is effectively 0.
I also found this:
Residual controls per direction
Courtesy of Bruno.
Code:
    residualControl
    {
        p 1e-6;
        Ux 1e-6;
        Uy 1e-6;
        Uz 1e-1;
        "(k|epsilon|omega|f|v2)" 1e-6;
    }
Chuck this in your SIMPLE/PISO/PIMPLE section of fvSolution.
pete20r2 is offline   Reply With Quote

Old   November 14, 2018, 06:54
Default
  #3
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7
yambanshee is on a distinguished road
I don't see the sense in wanting the residual of a variable you do not care about to want to settle. As pete said, the residual is a result of the actual number being so small that rounding errors become significant between iterations. If the rest of your residuals are converged, and any physical properties (force, pressure difference, etc...) are converged, then the simulation itself is likely converged.
yambanshee is offline   Reply With Quote

Old   November 22, 2018, 06:49
Default
  #4
New Member
 
Join Date: Oct 2018
Posts: 19
Rep Power: 7
krzychu111 is on a distinguished road
@pete20r2 Thanks a lot


Now my simulation stops when it should. The reason why I wanted the simulation to stop itself is that I'm going to run ~4000 cases so it's crucial to limit unnecessary iterations.
sourav90 likes this.
krzychu111 is offline   Reply With Quote

Old   September 18, 2020, 08:52
Default
  #5
Member
 
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9
Diro7 is on a distinguished road
Sorry for reopening.

Is this "residual-control-per-component" feature still available?
I'm working with OF6 and specifying residual control settings like
Code:
residualControl
{
    p     1e-5;
    Ux    1e-5;
}
seems not to be working.
The solver just skips the convergence check on U.

I'm asking since I'm doing some simple 2D computations and one of the 2 components is zero. Checking on the whole vector prevents the residual control check to work properly.

Andrea
Diro7 is offline   Reply With Quote

Old   December 26, 2020, 08:56
Default
  #6
Member
 
Hüseyin Can Önel
Join Date: Sep 2018
Location: Ankara, Turkey
Posts: 46
Rep Power: 7
hconel is on a distinguished road
Code:
    residualControl
    {
        p 1e-5;
        Ux 1e-5;
        Uy 1e-5;
        "(k|epsilon|omega|f|v2)" 1e-5;
    }
Hi,
I am setting the residual control above for SIMPLE solver in OpenFOAM-v1906 and it does not work. Convergence on U is completely ignored. The only thing that works is the following:

Code:
    residualControl
    {
        p 1e-5;
        U 1e-5;
        "(k|epsilon|omega|f|v2)" 1e-5;
    }
Did anyone actually make Ux Uy Uz convergence control work?
hconel is offline   Reply With Quote

Old   July 9, 2021, 10:12
Default
  #7
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 6
sourav90 is on a distinguished road
Quote:
Originally Posted by hconel View Post
Code:
    residualControl
    {
        p 1e-5;
        Ux 1e-5;
        Uy 1e-5;
        "(k|epsilon|omega|f|v2)" 1e-5;
    }
Hi,
I am setting the residual control above for SIMPLE solver in OpenFOAM-v1906 and it does not work. Convergence on U is completely ignored. The only thing that works is the following:

Code:
    residualControl
    {
        p 1e-5;
        U 1e-5;
        "(k|epsilon|omega|f|v2)" 1e-5;
    }
Did anyone actually make Ux Uy Uz convergence control work?
Hello,

Have you tried setting very low values? For me, in some axisymmetric wedge geometry simulation, residualControl of
PHP Code:
1E -
didn't work but when I changed to
PHP Code:
1E -(Ux Uy
and
PHP Code:
1E-6 (p
respectively, it converged towards the right values in ~100 iterations.
sourav90 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 171 February 20, 2024 02:55
Setting boundary conditions for simple pipe flow with flow direction changing in time Sipher FLUENT 1 May 4, 2015 20:05
what to monitor besides residuals? franzdrs FLUENT 5 March 21, 2013 03:59
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
residuals Karl CFX 2 June 24, 2003 23:13


All times are GMT -4. The time now is 22:33.