|
[Sponsors] |
April 6, 2018, 12:40 |
definition of residual in CFX
|
#1 |
Member
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13 |
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! |
|
April 7, 2018, 07:06 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
April 7, 2018, 15:32 |
|
#3 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
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 |
|
April 7, 2018, 16:09 |
|
#4 | |
Member
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13 |
Quote:
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... |
||
April 8, 2018, 07:02 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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. |
|
April 9, 2018, 16:30 |
|
#6 |
Member
phd
Join Date: Oct 2013
Posts: 76
Rep Power: 13 |
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! |
|
April 9, 2018, 20:06 |
|
#7 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
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 |
|
Tags |
definitions, residuals |
|
|
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 |