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

WENO 2D Euler

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2014, 06:43
Red face WENO 2D Euler
  #1
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hello

New to forum, so here goes: I have successfully implemented the 5th order WENO reconstruction method for 1D scalar and Euler conservation laws of the form:

\frac{d\textbf{u}}{dt}+\frac{d\textbf{F}}{dx}=0.

For the scalar case, my initial condition was \textbf{u}(x,t=0) = sin(\pi(x-t)) and u=F.
For the Euler conservation laws, my initial condition is:

\textbf{u}=\left[\rho, \rho v, E\right] and

\textbf{F}=\left[\rho v,  P+\rho v^{2}, v(E+P)\right] ,

where \rho is density, P is pressure, v is velocity and E is energy. I used the 5th order WENO with Lax Friedrichs flux splitting and Runge-Kutta 3rd order to solve this. I even got it working for the 2D scalar case, but I cannot solve the 2D Euler conservation equations. I've read a wide wide variety of articles containing WENO, but need a simple template for the 2D case to use as comparison. So I'm asking for code of such an example (preferably in MATLAB).

Any help will be greatly appreciated

Last edited by PicklER; August 14, 2014 at 02:41.
PicklER is offline   Reply With Quote

Old   August 19, 2014, 01:10
Default
  #2
New Member
 
Cat
Join Date: Aug 2014
Posts: 6
Rep Power: 11
Catkun is on a distinguished road
Hi Pickler,

I am working on 1D conservation law but have met difficulty for the time discretization. Could you share your code?

Also, for the problem you met, are you using FD or FV? From what I read, FV is intensively harder when dimension increases while FD simply requires you to write another "do" loop.
Catkun is offline   Reply With Quote

Old   August 19, 2014, 04:40
Default
  #3
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hey Catkun

I'm using FD and yes, also read that to extend it a simple do-loop should be added but that only works for the scalar test case and not for the conservation laws. Do you only need the time discretization? As I've said, I only used the 3rd order Runge-Kutta which looks as follows (found in any article describing the WENO reconstruction method, ref below):

u_{1}=u_{n}+\Delta tL(u_{n})
u_{2}=\frac{1}{4}(3u_{n} +u_{1}+\Delta t L(u_{1})
u_{n+1}=\frac{1}{3}(u_{n} +2(u_{2}+\Delta t L(u_{2})),

where

L=\frac{1}{\Delta x}(F_{j+1/2}-F_{j-1/2}),

where F_{j+1/2} and F_{j-1/2} are computed via the WENO reconstruction method.

ref: http://www.dam.brown.edu/scicomp/med...SC-2009-03.pdf
PicklER is offline   Reply With Quote

Old   August 19, 2014, 11:16
Default
  #4
New Member
 
Cat
Join Date: Aug 2014
Posts: 6
Rep Power: 11
Catkun is on a distinguished road
Hi Pickler,

Thanks for your reply. I guess my problem is that I don't know how to compute F(U(x,t+dt)). I am new to CFD and maybe misunderstand something in the paper. I also read the reference paper you mentioned but still don't quite know how to get the value of F after the first time step. Could you share your matlab code for the 1D case so I can read through and get a better idea? Thanks.
Catkun is offline   Reply With Quote

Old   August 20, 2014, 01:56
Default
  #5
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Catkun

Here is an example of my WENO for the 1D shocktube case. The scalar case is simpler version of this with only one equation. Hope it helps!

Vrede
Attached Files
File Type: gz test_WENO_1D_shock.tar.gz (1.9 KB, 146 views)
PicklER is offline   Reply With Quote

Old   November 3, 2014, 21:13
Default
  #6
New Member
 
Cat
Join Date: Aug 2014
Posts: 6
Rep Power: 11
Catkun is on a distinguished road
Hi Pickler,

I wonder if you are still working on this problem. I have finished the 1D case and then started working on the 2D case. Actually I think there is some problem in your code for the 1D simulation, (or I may be wrong . If you are still working on the problem and would like to discuss, I'd be happy to do so. All the best.
Catkun is offline   Reply With Quote

Old   November 9, 2014, 04:27
Default
  #7
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hey Catkun

I paused on the WENO case and started on other things. What is the mistake in the 1D case? Will gladly have a look at it again if you have new info on it.

Kind regards
PicklER is offline   Reply With Quote

Old   July 11, 2016, 05:00
Default Revision
  #8
New Member
 
Aranya Dan
Join Date: Jul 2016
Posts: 1
Rep Power: 0
Answer=42 is on a distinguished road
Quote:
Originally Posted by PicklER View Post
Hey Catkun

I paused on the WENO case and started on other things. What is the mistake in the 1D case? Will gladly have a look at it again if you have new info on it.

Kind regards
Hi,
If this thread is still active, I would like to draw your attention to a few corrections on your code. (Just a few small errors).

In the main file,
Line 22: Replace function name with 'initiali_1D_shock' and replace 'x' passed as parameter with 'n_x'.
Line 110: Replace 'x' as x-axis with 'x(1:length(x)-1)'. This will get the code up and running.

I am new to CFD myself and your code was a huge help. I am attempting 5th order WENO for shock formation on a 2d wedge.
Thank you.

P.S. If anybody has the 2d WENO figured out, a little help would be appreciated.
Answer=42 is offline   Reply With Quote

Old   October 16, 2017, 16:40
Default
  #9
New Member
 
Aranya Dan
Join Date: Oct 2017
Posts: 19
Rep Power: 8
crazyshock is on a distinguished road
https://github.com/aranyadan/WENO52D_fortran

2D weno code I wrote and validated with Reimann test cases.
Hit me for any other assistance you might need.
crazyshock is offline   Reply With Quote

Reply

Tags
2 dimensional, code, euler, matlab, weno


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WENO code for Euler equations buaalzr Main CFD Forum 19 October 16, 2017 16:32
Conservation error for 1-D Euler with WENO kiliancfd Main CFD Forum 6 July 24, 2014 17:26
Problem with Backward Euler Results Hooman Main CFD Forum 5 January 1, 2012 11:02
euler euler multiphase modelling mdsvjpk FLUENT 0 June 14, 2011 11:50
convergence of Euler Equations with WENO Shyam Main CFD Forum 0 June 1, 2007 00:47


All times are GMT -4. The time now is 12:57.