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

DG on triangular mesh - numerical viscosity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2011, 05:20
Question DG on triangular mesh - numerical viscosity
  #1
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
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 Lid-driven 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.
maximsch2 is offline   Reply With Quote

Old   February 5, 2011, 09:59
Default
  #2
Member
 
Join Date: Mar 2009
Posts: 32
Rep Power: 17
gory is on a distinguished road
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
gory is offline   Reply With Quote

Old   February 5, 2011, 10:13
Default
  #3
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
DG is often used with lax-friedrichs flux with very good results for euler equations. The high spatial accuracy of DG means that dissipation terms are small in lax-friedrichs flux. What is the polynomial degree of your basis functions ? If you discuss your equations, and how you choose the dissipation coefficient in lax-friedrichs flux, maybe somebody can give better help.
praveen is offline   Reply With Quote

Old   February 5, 2011, 10:25
Default
  #4
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
My equation is: \frac{\partial{u}}{\partial{t}} + v*\nabla{u} = \Omega Where u is 2d vector, v is constant 2d vector. \Omega 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 lid-driven cavity problem, so I am approaching steady state by making a lot of time steps (~1M), for time stepping I now use 4th order Low-Storage Explicit Runge-Kutta.
maximsch2 is offline   Reply With Quote

Old   February 5, 2011, 10:49
Default
  #5
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
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 lid-driven cavity flow problem. You need to study under what conditions they give a good approximation to NS solutions.
praveen is offline   Reply With Quote

Old   February 5, 2011, 11:22
Default
  #6
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
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.
maximsch2 is offline   Reply With Quote

Old   February 5, 2011, 11:33
Default
  #7
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
Quote:
Originally Posted by gory View Post
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.
I've looked at Roe's flux, but it seems to me that in scalar linear case it is equal to upwind flux, isn't it?
maximsch2 is offline   Reply With Quote

Old   February 5, 2011, 12:20
Default
  #8
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
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
Where ux, uy - components of speed from eqation. nx, ny - normals. left_val, right_val - values at the interface. Return value is multiplicated by un in the outer function, so it is not needed here. But looking at this function it looks exactly like upwind flux (=Lax–Friedrichs flux), which is supposed to be very dissipative....
maximsch2 is offline   Reply With Quote

Old   February 5, 2011, 19:44
Default
  #9
Member
 
Join Date: Mar 2009
Posts: 32
Rep Power: 17
gory is on a distinguished road
For a scalar advection equation, many schemes reduce to an identical scheme.
Godunov, Roe, Flux-vector-splitting, etc., all becomes the same upwind scheme.
BTW, this is my understanding of Lax-Firedrichs scheme:
http://en.wikipedia.org/wiki/Lax%E2%...edrichs_method

From your code, it looks like you have an upwind scheme.
gory is offline   Reply With Quote

Old   February 7, 2011, 10:50
Default
  #10
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
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))
In case of scalar linear advection it just happens, that this solver is identical to upwind.
Lax-Friedrichs flux:
LF(left_val, right_val) = 0.5*(f(left_val) + f(right_val) - abs(un)*(right_val-left_val)) which is equal to 0.5*(un*(left_val + right_val) - abs(un)*(right_val-left_val)) = { un*left_val if un < 0 and un*right_val if un is > 0}
So Lax-Friedrichs 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
maximsch2 is offline   Reply With Quote

Old   October 11, 2011, 13:46
Default
  #11
New Member
 
marco domenico mazzeo
Join Date: Oct 2011
Posts: 2
Rep Power: 0
fuser is on a distinguished road
Hi, some of the most involved researchers in the DG-LBM demonstrated good fluid flow data for the lid-driven cavity problem at high Re number; see, for example,

M. Min and T. Lee. A spectral-element discontinuous Galerkin lattice
Boltzmann method for nearly incompressible flows. J. Comput. Phys., 230, 245-259, 2011.

who implemented Lax-F. 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
fuser is offline   Reply With Quote

Old   October 11, 2011, 15:11
Default
  #12
New Member
 
Maxim
Join Date: Jan 2011
Posts: 9
Rep Power: 15
maximsch2 is on a distinguished road
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).
maximsch2 is offline   Reply With Quote

Old   October 11, 2011, 18:04
Default
  #13
New Member
 
marco domenico mazzeo
Join Date: Oct 2011
Posts: 2
Rep Power: 0
fuser is on a distinguished road
cool, I am glad you found the code error quickly.
Regards
fuser is offline   Reply With Quote

Reply

Tags
discontinous galerkin, lattice boltzman, numerical viscosity, upwind flux


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
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 05:12
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 10:09
Numerical Viscosity? P. Diao Main CFD Forum 9 August 21, 1998 07:46


All times are GMT -4. The time now is 18:26.