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

Problem with residual and their definition!

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2013, 13:06
Default Problem with residual and their definition!
  #1
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Hi guys, I was troubling a little with the definition of the residuals in OF. Following this thread "Residuals for convergence of segregated solvers", I've figured out that, at each step, the residual is calculated as follow: (focusing over an hypothetical momentum equation)

Quote:
res = b - Ax
which is the "classical" definition of the residual, with x the unknown.
Then, the normalization factor is calculated as:

Quote:
xRef = gAverage(x)
Then we have the definition of these two fields:

Quote:
wA = A x;
pA = A xRef;
So the normalization factor is:

Quote:
normFactor =
gSum(cmptMag(wA - pA) + cmptMag(b - pA))
+ matrix.small_;
And it is a sum of the magnitude of the vector fields all over the domain.

Finally the residual (normalized, so dimensionless) is:

Quote:
residual =
gSum(cmptMag(b - wA))/normFactor;
In the momentum equation is the difference between the RHS and LHS summed allover the domain, divide by the normFactor.

My questions are:

1) Is my interpretation correct?
2) Could someone explains what the average function do? I think it makes an average of a field (vector or scalar) in the domain but I'm not really sure
3) How can residual be equal 1 at step 0?
4) At each iterative step (I'm thinking about simpleFoam) the "initial Value" of residual at each time step is the difference between the residual calculated as before at the i-th step and the (i-1)th step or the first?

Thanks in advance

Simone
batta31 is offline   Reply With Quote

Old   February 11, 2013, 07:00
Default
  #2
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Any answer guys?
batta31 is offline   Reply With Quote

Old   February 14, 2013, 08:36
Default
  #3
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Isn't really anyone that can help me to figure out my problem?
batta31 is offline   Reply With Quote

Old   March 27, 2013, 05:56
Default
  #4
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Hi guys I return on this post! I wanted to ask again if there is someone that can explain me if my interpretation of the residuals is correct..in particular I wanted some explanation about the normalization factor that is used..

is it really variable at each iteration or am I wrong?
Please someone answers me.

Cheers
Simone
batta31 is offline   Reply With Quote

Old   April 1, 2013, 11:01
Default
  #5
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 418
Rep Power: 14
santiagomarquezd will become famous soon enough
http://www.amcaonline.org.ar/ojs/ind...File/3263/3186
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 20:34.