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 fluxI 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