Some problem of DG

Hi,everone.I am using discontinuous finite(DG) element method to solve problems related to magnetohydrodynamics(MHD).I suffer some problems when I learn demos of doflinx
The website is:> (Divergence conforming discontinuous Galerkin method for the Navier–Stokes equations — DOLFINx 0.8.0.0 documentation)

1.I can understand u(‘+’) and u(‘-’) but for lmbda(‘+’) and lmbda(‘-’)
where lmbda is
lmbda = conditional(gt(dot(u_n, n), 0), 1, 0)
2.For the discretization of convection terms, the demo adopts the upwind form.


u_uw = lmbda("+") * u("+") + lmbda("-") * u("-") is u_upwind flux
I think when dot(u,n) is greater than 0 ,u_uw is u(‘+’ ) ,otherwise u_uw is u(‘-’)
I don’t understand the variational form in the example as:

 a=inner(u, div(outer(v, u_n))) * dx + \
    inner((dot(u_n, n))("+") * u_uw, v("+")) * dS + \
    inner((dot(u_n, n))("-") * u_uw, v("-")) * dS + \
    inner(dot(u_n, n) * lmbda * u, v) * ds

I think

a=inner(u, div(outer(v, u_n))) * dx + \
               inner(dor(u_n,n)*u_uw,v)*dS

is enough
Thank you very much for your answers. Any answer would be very helpful to me

Hi,

  1. lmbda is just a marker function that detects outflow boundaries i.e. it takes the value of 1 when u_n \cdot n > 0 and 0 otherwise. This marker is used to pick the upwind velocity, as you mention. On interior facets, lmbda is not single valued and thus it needs to be restricted using the "+" and "-" notation.

  2. The sum over cells has been rewritten as a sum over facets. For interior facets, the integrand must be restricted. The dS integration measure only integrates over interior facets, so we must also add the ds integral to add the boundary contributions.

Hope this helps,

Joe

Thanks Joe.Helped me a lot. :smile:

Thanks again Joe.I have one more little question.I can understand lmbda(“+”) and lmbda(“-”) ,analogy u(“+”) and u(“-”).
For the last formulation :
inner(dot(u_n, n) * lmbda * u, v) * ds
lmbda didn’t have (“+”) or (“-”) . it’s mean that the trace on the element boundary?
if so,due to lmbda = conditional(gt(dot(u_n, n), 0), 1, 0)
What value is it at the boundary?

No probs! ds only integrates over boundary facets, and since lmbda is single valued on boundary facets, no restriction is needed. The value of lmbda depends on the trace of u_n on the boundary. It is 1 for outflow regions and 0 for inflow regions.

Thanks,

Joe

1 Like