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

How does openFoam calculate residuals?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2010, 14:10
Default How does openFoam calculate residuals?
  #1
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 13
sahm is on a distinguished road
I have solved a case with the density based solver rhoPisoFoam. When I checked the residuals for convergence, I noticed that the residuals for Rho were zero in every time step. Does anyone know how it can be? Does any body know how does OpenFoam calculate the residuals in every timestep?
Since the Piso loop in solver solves the rho, I thought this can be the result. But rho is being solved several times in piso loop, so it is changing, and this can be the method for calculation of residuals?
sahm is offline   Reply With Quote

Old   October 18, 2017, 17:27
Default
  #2
New Member
 
rik houthuys
Join Date: Jan 2017
Posts: 25
Rep Power: 6
Houthuys is on a distinguished road
Quote:
Originally Posted by sahm View Post
Does any body know how does OpenFoam calculate the residuals in every timestep?
Did you find answer to your question?

I know how the linear solver residual is calculated. But how the SIMPLE residual is calculated?
Houthuys is offline   Reply With Quote

Old   October 20, 2017, 06:41
Default
  #3
Member
 
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 35
Rep Power: 5
krikre is on a distinguished road
I'm interested in this topic and will try to contribue what I can.

The correction of rho is outside of the PISO loop.

https://github.com/OpenCFD/OpenFOAM-.../rhoPisoFoam.C

See the:
Code:
#include "rhoEqn.H"
I'm guessing this is the rhoEqn.H. The fvm term is implicit and the fvc is explicit. I assumed that this simple equation
Code:
solve(fvm::ddt(rho) + fvc::div(phi));
reduces to an assignment operation. Correct me if I'm wrong.

Houthuys, if you could exlpain the linear solver residual, I'd be grateful. I found this on the OF+ site. Do you understand this?

I guess \bar{ \textbf{x}} = \frac{1}{N}\sum_i^N x_i and \vert\textbf{x}\vert = \sqrt{\sum_i^N x_i^2}
but I still don't understand the logic behind the calculation of n.
krikre is offline   Reply With Quote

Old   October 26, 2017, 17:24
Default
  #4
Member
 
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 35
Rep Power: 5
krikre is on a distinguished road
Anyone looking at this thread should also see
Residuals for convergence of segregated solvers
krikre is offline   Reply With Quote

Reply

Tags
residual, rhopisofoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Calculate aerodynamic coefficients with openfoam using only opensource programs Xwang OpenFOAM 20 May 20, 2016 11:26
How to view residuals during OpenFOAM iteration? ericnutsch OpenFOAM 2 October 5, 2009 15:12
[Commercial meshers] How To Use OpenFOAM Software To Calculate Pump? renyun0511 OpenFOAM Meshing & Mesh Conversion 2 August 30, 2009 21:49
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
Best way to calculate residuals Morteza Main CFD Forum 1 August 19, 2006 23:44


All times are GMT -4. The time now is 23:01.