CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Relative error (https://www.cfd-online.com/Forums/main/13955-relative-error.html)

Neazen August 14, 2007 09:33

Relative error
 
Hi all,

I've got a question related to relative errors in the special case where the x(exact) is nearly 0.

Example : x(exact) = 1 e-10 x(simul) = 0.001

Er = |x(exact)-x(simul)|/|x(exact)| = 9999999!!!

I would like to know if there is a way to avoid this situation.

Thanks in advance.

Harish August 14, 2007 11:39

Re: Relative error
 
Can you make your system non dimensional ? In that way you would not need to go for such high precision requirements.

Neazen August 14, 2007 11:55

Re: Relative error
 
Well, the purpose is to compare some methods via the absolute and relative errors. The equation resolved is of type: m.d2(y)/dt2 + k.y = f with y=1 and dy/dt=0 and the exact solution is y=cos(wt). It's clear to see that the y is zero, or nearly, at Pi/2 for example, as I explained before.



All times are GMT -4. The time now is 21:34.