What is the Residual in Computational Fluid Dynamics?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 4K views
askor
Messages
168
Reaction score
9
Can someone please tell me a basic and easy-to-understand example of Residual in CFD?

Thank you
 
on Phys.org
Usually CFD solves equations numerically, up to a certain specfied accuracy. The residual is based on left hand side minus right hand side.
So a = b is considered solved when the residual | a - b |< specified required accuracy.

Mutatis mutandis for big systems of equations where a and b are huge arrays
 
What BvU has said applies far beyond just CFD. The idea of a residual as a measure of the degree to which an approximate solution satisfies a system of equations if fundamental to numerical solution methods in a wide range of applications.
 
  • Like
Likes   Reactions: Chestermiller
In the end you need to solve a matrix vector system for ##x## of the form $$A \cdot x=b$$ for the unknown velocities, pressures etc. at every node in your mesh. At every iteration you have an approximation for ##x##, say ##\tilde x##. This leads to a nonzero vector $$R=b - a\cdot \tilde x $$. The problem is solved if ##R=0##. In the mean time, you can square all elements in ##R##, sum them and then take the square root to get the norm of the residual, which gives an indication for you how far you are from the actual solution and if you are making progress.
 
It is slightly faster no to bother with taking the square root as @bigfooted has indicated. The squared value is just as useful as a quality measure.
 
  • Like
Likes   Reactions: bigfooted