9.4 Examples

9.4.1 Shock capturing

Compressible flows can be characterised by abrupt changes in density within the flow domain often referred to as shocks. These discontinuities can lead to numerical instabilities (Gibbs phenomena). This problem is prevented by locally adding a diffusion term to the equations to damp the numerical oscillations.

9.4.1.1 Non-smooth artificial viscosity model

For the non-smooth artificial viscosity model the added artificial viscosity is constant in each element and discontinuous between the elements. The Euler system is augmented by an added Laplacian term on right hand side of equation 9.1 [35]. The diffusivity of the system is controlled by a variable viscosity coefficient ε. For consistency ε is proportional to the element size and inversely proportional to the polynomial order. Finally, from physical considerations ε needs to be proportional to the maximum characteristic speed of the problem. The final form of the artificial viscosity is

      h
ε = ε0-λmaxS,
      p
(9.8)

where S is a sensor.

As shock sensor, a modal resolution-based indicator is used

         (             )
           ⟨q --q˜,q---˜q⟩
se = log10      ⟨q,q⟩      ,
(9.9)

where ⟨⋅,⋅⟩ represents a L2 inner product, q and ˜q are the full and truncated expansions of a state variable (in our case density)

       N(∑P)             N (P∑ -1)
q(x) =     ^qiϕi,  ˜q(x) =       ^qiϕi,
        i=1                i=1
(9.10)

then the constant element-wise sensor is computed as follows

     ( 0                   if  s < s  - κ
     |{  1(       π(se-s0))      e   0
Sε = |  2 1 + sin --2κ---   if  |se - s0| ≤ κ ,
     ( 1                   if  se > s0 + κ
(9.11)

where s0 = sκ - 4.25 log10(p).

To enable the non-smooth viscosity model, the following line has to be added to the SOLVERINFO section:

1<SOLVERINFO> 
2  <I PROPERTY="ShockCaptureType"      VALUE="NonSmooth" /> 
3<SOLVERINFO>

The diffusivity and the sensor can be controlled by the following parameters:

1<PARAMETERS> 
2<P> Skappa              = -1.3                     </P> 
3<P> Kappa               = 0.2                      </P> 
4<P> mu0                 = 1.0                      </P> 
5</PARAMETERS>


pict pict

Figure 9.1: (a) Steady state solution for M = 0.8 flow at α = 1.25 past a NACA 0012 profile, (b) Artificial viscosity (ε) distribution


9.4.2 Variable polynomial order

A sensor based p-adaptive algorithm is implemented to optimise the computational cost and accuracy. The DG scheme allows one to use different polynomial orders since the fluxes over the elements are determined using a Riemann solver and there is now further coupling between the elements. Furthermore, the initial p-adaptive algorithm uses the same sensor as the shock capturing algorithm to identify the smoothness of the local solution so it rather straightforward to implement both algorithms at the same time.

The polynomial order in each element can be adjusted based on the sensor value that is obtained. Initially, a converged solution is obtained after which the sensor in each element is calculated. Based on the determined sensor value and the pre-defined sensor thresholds, it is decided to increase, decrease or maintain the degree of the polynomial approximation in each element and a new converged solution is obtained.

     (
     ||  pe - 1 if se > sds
     |{  pe + 1 if ssm < se < sds
pe = |  p       if  s  < s < s
     ||(   e         fl    e   sm
        pe - 1 if se < sfl
(9.12)

For now, the threshold values se, sds, ssm and sfl are determined empirically by looking at the sensor distribution in the domain. Once these values are set, two .txt files are outputted, one that has the composites called VariablePComposites.txt and one with the expansions called VariablePExpansions.txt. These values have to copied into a new .xml file to create the adapted mesh.

9.4.3 De-Aliasing Techniques

Aliasing effects, arising as a consequence of the nonlinearity of the underlying problem, need to be address to stabilise the simulations. Aliasing appears when nonlinear quantities are calculated at an insufficient number of quadrature points. We can identify two types of nonlinearities:

We consider two de-aliasing strategies based on the concept of consistent integration:

Since Nektar++ tackles separately the PDE and geometric aliasing during the projection and solution of the equations, to consistently integrate all the nonlinearities in the compressible NavierStokes equations, the quadrature points should be selected based on the maximum order of the nonlinearities:

Q    = P    + max-(2Pexp,Pgeom) + 3-
  min    exp           2           2
(9.13)

where Qmin is the minimum required number of quadrature points to exactly integrate the highest-degree of nonlinearity, Pexp being the order of the polynomial expansion and Pgeom being the geometric order of the mesh. Bear in mind that we are using a discontinuous discretisation, meaning that aliasing effect are not fully controlled, since the boundary terms introduce non-polynomial functions into the problem.

To enable the global de-aliasing technique, modify the number of quadrature points by:

1<E COMPOSITE="[101]" 
2   BASISTYPE="Modified_A,Modified_A" 
3   NUMMODES="7,7" 
4   POINTSTYPE="GaussLobattoLegendre,GaussLobattoLegendre" 
5   NUMPOINTS="14,14" 
6   FIELDS="rho,rhou,rhov,E" 
7/>

where NUMMODES corresponds to P+1, where P is the order of the polynomial used to approximate the solution. NUMPOINTS specifies the number of quadrature points.