CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   How do I apply the L norms? (

werder85 January 16, 2011 04:37

How do I apply the L norms?
I know this is a real newbie question.
I want to apply the L2-norm for a laplace equation. How should I proceed?
Should I simply calculate the difference between the values of the current and the last iteration, then the sum of the squares of these values and finally the square root?
Is this norm used to determine when to stop iterating?

Thanks a lot!

praveen January 16, 2011 05:01

Comparing difference between current and previous solutions can be misleading. You should instead see how well the discrete equations are satisfied. For example, if you are trying to solve
L_h u_h = f_h
you can measure the convergence in the norm
\frac{ \| L_h u_h - f_h \|}{\| f_h \|}
The norms can be L2 norms.

werder85 January 17, 2011 06:26

Thanks, that's very interesting!
If I still want to compare the solutions from the latest two iterations, do I have to treat the domensions sepparately or not? Obviusly, by applying a L2-norm for a 3D domain will naturally provide higher values than an L2-norm for a 1D domain (because will be more points in the grid).

Further can you recommend me a good documentation on applying L-norms in CFD?

praveen January 18, 2011 10:25

If you divide by norm of rhs as I wrote, number of grid points does not matter.

werder85 January 19, 2011 03:31

I'm implementing the basic laplace equation, i.e. the RHS is zero... How should I proceed?

walli January 19, 2011 05:15

If the right hand side is zero, the problem is pretty boring, isn't it? No boundary conditions, no source term?

werder85 January 19, 2011 07:05 I understand, my mistake. The RHS also includes the boundary conditions (which are specified in my problem)...

RameshK January 22, 2011 03:14


You can use the following norm for stopping your iterations. It just calculates the relative error in the iterations

total_error=sqrt((\sun_{j=1}^N(\frac{u^(n+1) - u^(n)}{u^n})^2)_j)

which corresponds to all the points in the grid. You can compare this to an epsilon value and if the condition is met the iteration stops. n in the above formula represents the iteration count.

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