
[Sponsors] 
WENO scheme validation  rhoCentralFoam  shockTube/ShuOsher problems 

LinkBack  Thread Tools  Display Modes 
June 12, 2017, 09:23 
WENO scheme validation  rhoCentralFoam  shockTube/ShuOsher problems

#1 
Member
Join Date: Sep 2015
Location: Singapore
Posts: 58
Rep Power: 4 
Dear all,
I have implemented an nth order WENO scheme in OpenFOAM and modified the rhoCentralFoam solver (with TVD 3rd order RK time marching). I have simulated both the shockTube and the ShuOsher problems. The solution for the shockTube problem looks fine for both the 5th and 7th order WENO schemes. However, small wiggles occur near the small shocklets for the ShuOsher problem. So far, I have not seen anybody reporting about this problem. I have no idea why this is happening. Has anyone faced this problem or something similar to this when implementing WENO schemes? With many thanks, USV 

June 14, 2017, 09:06 
Update & more info

#2 
Member
Join Date: Sep 2015
Location: Singapore
Posts: 58
Rep Power: 4 
Dear all,
I managed to eliminate the oscillations but I have no idea why it works. I just want to give more information so that someone might be able to help me understand. First of all, previously, I was reconstructing , and using the WENO scheme. Then, I applied the HLL flux at the interface which led to the oscillations for the ShuOsher test case. Today, I modified the code using the method described here. Basically, instead of reconstructing the flow variables , the fluxes were reconstructed from the left and right sides, respectively. Then, the Lax–Friedrichs (LxF) numerical flux was defined as: This appears to have solved the problem of the oscillations that I mentioned in the previous post. However, I am at a loss as to why WENOreconstructing [MATH]\textbf{q}[\MATH] and computing an upwindbiased numerical flux (e.g. HLL, HLLC) leads to oscillations. I will be grateful if anyone could explain how to properly implement the HLL numerical flux scheme in this case. With many thanks, USV 

June 30, 2017, 23:36 
Solution

#3 
Member
Join Date: Sep 2015
Location: Singapore
Posts: 58
Rep Power: 4 
Dear all,
I would like to report on a (known) solution for this problem. Apparently, WENO schemes can be oscillatory when used to reconstruct primitive or conservative variables but not so when used to reconstruct characteristic variables. A friend of mine coded WENO7 with HLL flux separately in Matlab and found that it led to the same oscillations as OpenFOAM. He further went to code WENO7 with characteristic variables and found that the oscillations did not appear. However, he also commented that the computation time was 35 times longer even for a specialized 1D case. USV 

September 10, 2017, 03:51 

#4 
New Member
Frank Ann
Join Date: Dec 2016
Posts: 6
Rep Power: 2 
Hi usv,
I want to implement a highorder difference scheme in openfoam too, can you tell me that how did you implement WENO in openfoam? The RK time scheme is accomplished by modified the solver, how about weno scheme? I will be grateful if you could share it or give me some advice. Thanks! Regards, ajog Last edited by ajogajog; September 10, 2017 at 07:10. 

September 14, 2017, 12:06 

#5  
Member
Join Date: Sep 2015
Location: Singapore
Posts: 58
Rep Power: 4 
Quote:
I developed a finite volume (FV) formulation since OpenFOAM is based on that. I am sorry that I can't share the code (yet) but I can give you some details. First of all, you need to build the stencils. If you intend to use a finite difference (FD) formulation, then you are probably assuming that cell values represent the point values at the cell centres. So, there will be a stencil for each cell. Unless you have a structured mesh consisting of a single block, the ordering of cells in OpenFOAM does not follow any particular pattern which you can exploit to avoid building the stencils. Secondly, since you intend to use a finite difference (FD) formulation, I am going to assume that your mesh is Cartesian and uniform. In that case, you can follow any standard paper on WENO for the reconstruction coefficients, smoothness indicators, linear weights, etc. The simplicity of the mesh means that you can hard code these as functions that you use in the solver. If your mesh is nonuniform, then each cell/stencil will have its own set of reconstruction coefficients, smoothness indicators, linear weights, etc. That will be harder to implement. Thirdly, you'll need to figure out how you're going to treat the boundaries. Periodic boundaries have the advantage of not requiring any ghost cell treatment (but will require some clever coding). If you have other types of boundaries, you can choose to adopt the ghost cell method or reduce the order of reconstruction close to the boundaries. Lastly, I suggest that you begin from 1D problems and work your way up to higher dimensions. USV 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problems adding volScalarField to rhoCentralFoam  cryple  OpenFOAM Programming & Development  2  January 17, 2013 06:18 
[ICEM] Problems with coedge curves and surfaces  tommymoose  ANSYS Meshing & Geometry  0  August 5, 2011 16:02 
[GAMBIT] Problems with the Cooper Scheme  Forrest  ANSYS Meshing & Geometry  0  July 13, 2009 10:59 
Help for cut cell scheme for moving problems  Wei  Main CFD Forum  0  August 2, 2006 09:32 
Implicit scheme for incompressible flow problems  Triton  Main CFD Forum  4  August 25, 2002 04:54 