
[Sponsors] 
February 5, 2011, 06:20 
DG on triangular mesh  numerical viscosity

#1 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
I am implementing discontinuous galerkin code (based on book by Hesthaven& Warburton) for lattice boltzman method (essentially system of linear advection equations). I am using upwind (= Lax–Friedrichs) flux and triangular mesh to solve Liddriven cavity problem. Judging from results, my simulation is killed by numerical viscosity  'real' Re is lower than I set. Preliminary research shows, that it may be caused by upwind flux. Is it true? What other fluxes should I try?
PS: before moving to DG I've implemented finite volume method, and observed the same problem there  upwind flux was too dissipative, I had to use central flux. But as far as I understand, central flux is bad for problems with discontinuities, which I am planning to simulate, so I need another solution. 

February 5, 2011, 10:59 

#2 
Member
Join Date: Mar 2009
Posts: 33
Rep Power: 8 
Lax–Friedrichs is a very dissipative flux.
Try Roe's flux. Here is a f90 subroutine: http://www.ossanworld.com/cfdbooks/c..._fluxes_v2.f90 which is known to be accurate enough for viscous simulations. gory 

February 5, 2011, 11:13 

#3 
Super Moderator

DG is often used with laxfriedrichs flux with very good results for euler equations. The high spatial accuracy of DG means that dissipation terms are small in laxfriedrichs flux. What is the polynomial degree of your basis functions ? If you discuss your equations, and how you choose the dissipation coefficient in laxfriedrichs flux, maybe somebody can give better help.


February 5, 2011, 11:25 

#4 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
My equation is: Where u is 2d vector, v is constant 2d vector. depends on u. Now I am using simple upwind flux: if n*u >= 0 I use value from current cell, if n*u < 0 I use value from neighbor. I am running my code with different polynomial degrees (from N=1,3,5) and observe similar behavior with all of them. I am trying to solve 2D liddriven cavity problem, so I am approaching steady state by making a lot of time steps (~1M), for time stepping I now use 4th order LowStorage Explicit RungeKutta.


February 5, 2011, 11:49 

#5 
Super Moderator

You should first test that the scheme gives good answers for a pure convection equation, and compare with exact solutions. That will validate your DG scheme. The advection equations are supposed to model viscous solutions in some way since you mentioned liddriven cavity flow problem. You need to study under what conditions they give a good approximation to NS solutions.


February 5, 2011, 12:22 

#6 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
I guess DG code is OK, because I get some results for cavity flow. The problem is that in those results flow looks like Reynolds number is lower than I set.


February 5, 2011, 12:33 

#7  
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
Quote:


February 5, 2011, 13:20 

#8 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
Ok, I've investigated this problem a bit more and now I am completely confused.
I've read that Godunov flux is the least diffusive flux. My code for Godunov flux: Code:
def godunov_flux(left_val, right_val, ux, uy, nx, ny): un = nx*ux+ny*uy if left_val <= right_val: # min f(u) if un >= 0: return left_val else: return right_val else: # left_val > right_val # max f(u) if un >= 0: return left_val else: return right_val 

February 5, 2011, 20:44 

#9 
Member
Join Date: Mar 2009
Posts: 33
Rep Power: 8 
For a scalar advection equation, many schemes reduce to an identical scheme.
Godunov, Roe, Fluxvectorsplitting, etc., all becomes the same upwind scheme. BTW, this is my understanding of LaxFiredrichs scheme: http://en.wikipedia.org/wiki/Lax%E2%...edrichs_method From your code, it looks like you have an upwind scheme. 

February 7, 2011, 11:50 

#10 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
That code was supposed to be for Godunov's exact Rieman solver:
Code:
Godunov(left_u, right_u): if left_u < right_u: return min(f(u)) else: return max(f(u)) LaxFriedrichs flux: LF(left_val, right_val) = 0.5*(f(left_val) + f(right_val)  abs(un)*(right_valleft_val)) which is equal to 0.5*(un*(left_val + right_val)  abs(un)*(right_valleft_val)) = { un*left_val if un < 0 and un*right_val if un is > 0} So LaxFriedrichs flux is also identical to upwind flux. This leaves me with choice of two fluxes: upwind and central. And central becomes unstable at some point while increasing Re, so I am stuck with upwind flux. Is there any other flux that could be used for scalar linear advection, and which produces little numerical dissipation 

October 11, 2011, 13:46 

#11 
New Member
marco domenico mazzeo
Join Date: Oct 2011
Posts: 2
Rep Power: 0 
Hi, some of the most involved researchers in the DGLBM demonstrated good fluid flow data for the liddriven cavity problem at high Re number; see, for example,
M. Min and T. Lee. A spectralelement discontinuous Galerkin lattice Boltzmann method for nearly incompressible flows. J. Comput. Phys., 230, 245259, 2011. who implemented LaxF. flux... I have implemented the above method for a specific element type...and I obtain good results too at Re=5000, as demonstrated by comparing them with literature data. I suspect that your simulation is dominated by errors due to a high Mach number (what is yours? and Re?), and/ or your code does not have properly implemented one or more building blocks of the method (not the numerical flux). Cheers 

October 11, 2011, 15:11 

#12 
New Member
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 6 
fuser, Thank you! Actually I've already found the problem  turned out it was in my code (wrong handling of one of the sides of triangles).


October 11, 2011, 18:04 

#13 
New Member
marco domenico mazzeo
Join Date: Oct 2011
Posts: 2
Rep Power: 0 
cool, I am glad you found the code error quickly.
Regards 

Tags 
discontinous galerkin, lattice boltzman, numerical viscosity, upwind flux 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
3D Hybrid Mesh Errors  DarrenC  ANSYS Meshing & Geometry  11  August 5, 2013 06:42 
Mesh for 3 dim Geometry  Phil  FLUENT  9  July 12, 2000 04:39 
Mesh  Mignard  FLUENT  2  March 22, 2000 06:12 
unstructured vs. structured grids  Frank Muldoon  Main CFD Forum  1  January 5, 1999 11:09 
Numerical Viscosity?  P. Diao  Main CFD Forum  9  August 21, 1998 07:46 