CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   ENO scheme (ENO-Roe) (Shu and Osher). (https://www.cfd-online.com/Forums/main/5111-eno-scheme-eno-roe-shu-osher.html)

J. K. September 3, 2002 09:44

ENO scheme (ENO-Roe) (Shu and Osher).
 
HI all,

I have a question regarding the ENO scheme. I have been trying to implement an ENO's scheme based on Shu and Osher's paper "ENO and WENO shock capturing schemes II" , Journal of Computational Physics, 83, 32-78 (1989). Now, it seems that this method is used when operating on cell centre values. I want to use cell averages. When I look at Laney's book, "Computational GasDynamics", on page 524 he states that "...in one interpretation, f(u(subscript i, superscript n)) is a cell-integral average of f(x)", where f(x) is the f^hat numerical flux. Laney's scheme in his book is Shu and Osher's scheme. This suggests that cell averages can be used. Can someone explain the apparent paradox between the use of cell averages and cell- centred values? I am missing something here!! I hope!

Regards,

J.

Bert Laney September 3, 2002 17:04

Re: ENO scheme (ENO-Roe) (Shu and Osher).
 
I'm not sure I understand your question. The Shu-Osher ENO method is a finite-difference method, i.e., it approximates cell-centered values of the solution. The derivation given in my book, which involves cell-averages of the flux function, doesn't imply that the Shu-Osher ENO method is finite-volume. If you want a finite-volume method, you'll have to use the original ENO method.

In one dimension, the cell-centered value of the solution is a second-order approximation to the cell-integral average. Thus, if you can be content with second order accuracy, you can consider any finite-difference method to be finite-volume if you like (in one dimension).

Hope this helps.

Bert Laney

J. K. September 4, 2002 06:01

Re: ENO scheme (ENO-Roe) (Shu and Osher).
 
Hi Bert.

Thanks for your reply.

I am aware that a cell-centered value of a solution is a 2nd order approximation to a cell-integral (=finite volume?) average. However, I was hoping to achieve 3rd order accuracy. I would also like to extend the method to 3D.

I was under the impression that a cell-average was the same as finite volume, I take it I was wrong?!

Finite volume, cell-integral and cell-average all seem pretty similar to me?

Why are there problems when extending to more than 1-dimension?

Will the original ENO scheme will work well in 3 dimensions?

Thanks again,

Regards.

J.


gmreszhao@163.com September 14, 2002 02:32

Re: ENO scheme (ENO-Roe) (Shu and Osher).
 
Dear J.K:

There is a paper of Chi-Wang Shu, "Essentially Non-Oscillatory and Weighted Essentially Non-Oscillatory Schemes for Hyperbolic Conservation Laws", NASA CR-97-206253 ICASE Report No. 97-65. It can tell you how to implement three or more oder of accuracy of ENO or WENO in FV for a 3d problem. You can download it from http://www.icase.edu/library/reports/rdp/1997.html.

Good luck to you!

Zhao

autofly September 17, 2002 07:15

Re: ENO scheme (ENO-Roe) (Shu and Osher).
 
I have finished the ENO scheme FV in two dimensions.very difficult. if you want to get higher order than 2nd,you must do some effort to understand the reconstruction for two varriables.not simple dimension splitting technology,you must consider the cross-term.welcome to disscuss with me.

kika February 19, 2013 17:00

Eno
 
I am trying to write the matlab code for eno but I am unable to do
for i=2:nx-2
k=i-1;
p1(i)=D1(k);
if abs(D2(k+1))<= abs(D2(k+2))
p2(i)=(2*(k-i)+1)*D2(k+1);
else
p2(i)=(2*(k-i)+1)*D2(k+2);
end
Q=p1+p2;

end
for i=2:nx-2
l=i;
p11(i)=D1(l);
if abs(D2(l+1))<= abs(D2(l+2))
p22(i)=(2*(l-i)+1)*D2(l+1);
else
p22(i)=(2*(l-i)+1)*D2(l+2);
end
P=p11+p22;
end

for i=1:nx-2
V1(i+1)=Q(i);
end
for n=1:nt
for i=2:nx-2
V(n+1,j)=V(n,j)-Dt*V1(n,j)

i dont know what is wrong here
I tried can u please suggest me something

Jonny6001 February 21, 2013 14:55

I am curious as to the difficulties that you talk of "autofly" when using the ENO scheme. It is a straight-forward scheme.
I would certainly opt for WENO schemes if you can deal with the increase in solver time.

Regarding the original post, the question entirely depends on your interpretation of the terms. The ENO scheme simply selects the smoothest polynomial to calculate the inter-cell flux values when it comes to FV methods.

kika March 28, 2013 08:08

Eno
 
for example I am solving advection equation u_t+ au_x=0
and with initial data u(x,0)= 0.5-|x| if |x|<= 0.5
= 0 else

okay so I am using ENO via primitive function so I have calulated the average
1) for j=1:nx+3
x(j)=-1-dx+(j-1)*dx;
u0(j)=(u_0(x(j)+(dx/2))+u_0(x(j)) + u_0(x(j)-(dx/2)))/3;
end%

2) the scheme becomes u_{j}^{n+1} = u_{j}^{n}- (f_{j+1/2}- f_{j-1/2}).


3) f_{j+1/2} i sthe numercial flux and now I am calculating numerical flux by Lax- friendrich (as u can see in the article of shu page number 355)
f_{j+1/2}= h(u-_{j+1/2}, u+_{j-1/2}).


h(a,b)= (1/2)(f(a)+f(b)-alpha(b-a)).
[since this is for u_t+ (f(u(x,t)))_x=0 ]


so my f(u)= au.

so my f_{j+1/2}=a u-_j+1/2.

so for calculating f_{j-1/2 } i put j=j-1 so f_{j+1/2}= au-_j-1/2.

and as in the shu article

u-_j+1/2= p_(i)(x_{i+1/2})
so for calculating u-_j-1/2= p_(i-1)(x_{i-1/2})
I mean polynomail changes, and I am using the code for calculating this polynomail

function y = back(u,nx,x,dx)
y(1)=0;
y(nx+3)=0;
for i=1:nx+3
a(i,1)=u(i)
end
for i=2:nx+2
a(i,2)=(a(i,1)-a(i-1,1))/(x(i)-x(i-1))
end
for i=2:nx+2
if abs(a(i,2)) < abs(a(i+1,2))
a1(i)=a(i,2)/2
else
a1(i)=a(i+1,2)/2
end
y(i)=u(i)+a1(i)*(x-x(i));
end
end


so in above function when i put x=x(i)+(dx/2)
for claulating the polynomial p(i-1) I ahev tried many things but my scheme is not correct I can see very bad behaviour near the kink.

I am really tired with this.

Please suggets me something where I am wrong






Quote:

Originally Posted by Jonny6001 (Post 409384)
I am curious as to the difficulties that you talk of "autofly" when using the ENO scheme. It is a straight-forward scheme.
I would certainly opt for WENO schemes if you can deal with the increase in solver time.

Regarding the original post, the question entirely depends on your interpretation of the terms. The ENO scheme simply selects the smoothest polynomial to calculate the inter-cell flux values when it comes to FV methods.


kika March 28, 2013 08:09

Please soemone try to answer me and if possible please answer em soon


Quote:

Originally Posted by kika (Post 416968)
for example I am solving advection equation u_t+ au_x=0
and with initial data u(x,0)= 0.5-|x| if |x|<= 0.5
= 0 else

okay so I am using ENO via primitive function so I have calulated the average
1) for j=1:nx+3
x(j)=-1-dx+(j-1)*dx;
u0(j)=(u_0(x(j)+(dx/2))+u_0(x(j)) + u_0(x(j)-(dx/2)))/3;
end%

2) the scheme becomes u_{j}^{n+1} = u_{j}^{n}- (f_{j+1/2}- f_{j-1/2}).


3) f_{j+1/2} i sthe numercial flux and now I am calculating numerical flux by Lax- friendrich (as u can see in the article of shu page number 355)
f_{j+1/2}= h(u-_{j+1/2}, u+_{j-1/2}).


h(a,b)= (1/2)(f(a)+f(b)-alpha(b-a)).
[since this is for u_t+ (f(u(x,t)))_x=0 ]


so my f(u)= au.

so my f_{j+1/2}=a u-_j+1/2.

so for calculating f_{j-1/2 } i put j=j-1 so f_{j+1/2}= au-_j-1/2.

and as in the shu article

u-_j+1/2= p_(i)(x_{i+1/2})
so for calculating u-_j-1/2= p_(i-1)(x_{i-1/2})
I mean polynomail changes, and I am using the code for calculating this polynomail

function y = back(u,nx,x,dx)
y(1)=0;
y(nx+3)=0;
for i=1:nx+3
a(i,1)=u(i)
end
for i=2:nx+2
a(i,2)=(a(i,1)-a(i-1,1))/(x(i)-x(i-1))
end
for i=2:nx+2
if abs(a(i,2)) < abs(a(i+1,2))
a1(i)=a(i,2)/2
else
a1(i)=a(i+1,2)/2
end
y(i)=u(i)+a1(i)*(x-x(i));
end
end


so in above function when i put x=x(i)+(dx/2)
for claulating the polynomial p(i-1) I ahev tried many things but my scheme is not correct I can see very bad behaviour near the kink.

I am really tired with this.

Please suggets me something where I am wrong



All times are GMT -4. The time now is 06:55.