CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

L1,L2, .. L_infinity Errors ??

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 12, 2010, 06:44
Default L1,L2, .. L_infinity Errors ??
  #1
New Member
 
Elmiloud Chaabelasri
Join Date: Oct 2010
Posts: 25
Rep Power: 6
phy4me is on a distinguished road
Hello,

Can you tell me how can calculate the L1,L2 .. Errors, I used a Roe solver with triangular mesh.

Thanks in advance.
phy4me is offline   Reply With Quote

Old   November 12, 2010, 13:25
Default
  #2
New Member
 
Join Date: May 2009
Posts: 27
Rep Power: 8
walli is on a distinguished road
You have to (numerically) integrate over all elements in the mesh and sum up the computed contributions from each element, e.g. $\sum_T \int_T (u-u_h)^2 dx$ for the L^2 error. What you do on each element of the mesh is iterating over integration points. At each integration point you have to evaluate shape functions, compute u_h using the coefficients from your solution vector, evaluate (u-u_h)^2, add this to err with the proper weight and integration element and so on and so forth... This is standard and should be described in all books used for teaching.

Some pseudocode
Code:
errl2 = 0;
for T in mesh
  for q in quad(T)
    eval(phi, q); // shape functions
    u_h=dot_product(phi, coeff(T));
    x = T.local_to_global(q.position);
    eval(u, x);
    errl2loc = u-u_h;
    errl2 = errl2 + (errl2loc^2)*q.weight*T.det;
  end
end
walli 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 20:48
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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