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

definition of residual in CFX

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By ghorrocks
  • 1 Post By Opaque
  • 1 Post By Opaque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2018, 12:40
Default definition of residual in CFX
  #1
Member
 
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13
lostking18 is on a distinguished road
Hi, is there any one can kindly tell me how exactly the local residual is defined and generated in CFX under the scheme of 1st order implicit Euler method? Here the residual means the raw residual without normalization. And 'local' means the residual at each control volume without the process of Root mean square.

Suppose we have the control volume form of the governing equation as
V* ( Phi(n+1) – Phi(n) ) / d t + R( Phi(n+1) ) = 0;
where V is the control volume, phi is the conserved variables, n is the time step, dt is the pseudo time step in steady simulation, R is the sum of the flux over the control surface. Is the residual defined as R( Phi(n+1) ) or R( Phi(n) )?

Thanks!
lostking18 is offline   Reply With Quote

Old   April 7, 2018, 07:06
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Note that some details of the residuals are propriety and are not public information. You you will not know exactly how the residuals are calculated. But a general description is in the CFX documentation, in the theory manual in the section on numerical method.
lostking18 likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   April 7, 2018, 15:32
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
Let me clarify a few things I may have misunderstood.

You are referring to the non-linear residual (I think), then residual is how well the discretized equations have been solved, therefore, it includes all the terms even the transient term. If the problem is transient (you mentioned first order backward Euler), it also includes the true transient term.

Such residual is evaluated with the current known values; therefore, it can only be evaluated efficiently using Phi(n). Evaluating it with Phi(n+1) will imply re-discretizing the equation terms, and that is expensive.

Hope the above helps
lostking18 likes this.
Opaque is offline   Reply With Quote

Old   April 7, 2018, 16:09
Default
  #4
Member
 
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13
lostking18 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Note that some details of the residuals are propriety and are not public information. You you will not know exactly how the residuals are calculated. But a general description is in the CFX documentation, in the theory manual in the section on numerical method.
Hi, Glenn, thanks for answering all my questions with tremendous patience. I have read the CFX documentation. But the discreptions are rather ambiguous to me. The only definition I can find is
A*Phi - b
wher A is the coefficient matrix, phi is the solution vetor and b is the right hand side. I think the influnce of the temporal scheme is not clear illustrated in this definition because they will change the form of A and b...
lostking18 is offline   Reply With Quote

Old   April 8, 2018, 07:02
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The non-linear residuals are calculated using a proprietry algorithm which is not public information. The description in the documentation is an overview only, so is not a full description. So you are never going to get the details as nobody except ANSYS employees has that detail.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   April 9, 2018, 16:30
Default
  #6
Member
 
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13
lostking18 is on a distinguished road
Hi, Opaque:

Thanks for your kind reply! May I ask what is the definition of the 'transient term'?
Is it (Phi_n+1 - Phi_n)/ delta t
or it is R(Phi_n+1) - R(Phi_n) where R is the representative of residual function, it can also be approximated as (d R /d Phi)_n * d Phi_n

Thanks!
lostking18 is offline   Reply With Quote

Old   April 9, 2018, 20:06
Default
  #7
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
There seems to be some confusion on what residual means. When solving the discretized equations, there are two types of residuals:

1 - The non-linear residual: it measures how well the discretized equations are solved. It also measures the conservation imbalance of the particular equations. It is formed by summing (+ or -) all the terms in the discretized equations

R(Phi_n) = Sum (Transient+Advection+Diffusion+Sources)

2 - The linear residual: it measures how well the linear system of equations is solved at a given iteration/timestep. For the linear system (written in delta form) noted as

[A] {deltaPhi} = {Non-Linear Residual}

the residual is

{Linear Residual} = [A] {delta_Phi} - {Non-linear Residual}

Now with both descriptions above, which residual are you referring to? As you see the transient term is just another term in the non-linear residual and discretized as described in the documentation.

Hope the above helps
aero_head likes this.
Opaque is offline   Reply With Quote

Reply

Tags
definitions, residuals


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
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 18:36
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. Nkl OpenFOAM Running, Solving & CFD 19 October 10, 2019 03:42
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 14:12
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 07:37
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03


All times are GMT -4. The time now is 13:44.