Hello,
I am looking into traceoperator/geom_free implementation of DG.
My starting point is this i-tutorial
ngsolve.org/docu/latest/i-tutorials/unit...hlight=traceoperator
In version 1, you are using the wall boundary condition
. The numerical flux on the boundary is
Code:
phat = p
uhat.n = 0
(Here maybe make a note that
p.Other()
returns p, not zero on the boundary edge, as it is sometimes confusing what the magic Other() operator is doing on domain boundary. See this discussion
ngsolve.org/forum/ngspy-forum/28-inconsi...-in-bnd-integral#146
)
By increasing final time tend = 0.3, we find the boundary condition is indeed correctly implemented.
Then in Version 2, phat is the average on interior edges, but phat=p on boundary edges. Hence, to have a correct implementation of the boundary term Btr in block 11, I added the following hack to have the correct boundary condition:
Code:
# A HACK
gf = GridFunction(FacetFESpace(mesh, dirichlet=".*"))
gf.Set(1, BND)
Btr = BilinearForm(trialspace=fes_tr, testspace=fes_u)
Btr += 0.5 * (1+gf)*phat * (v*n) * dx(element_boundary=True)
With this correction, the version 2 results are identical to version 1 up to time tend=0.3. (Otherwise, we observe something wrong when wave hit the boundary)
Unfortunately, the same trick does not work for the geom_free version.
Do you have any suggestions to fix the boundary condition for Version 3?
Another question: does traceoperator and/or geom_free work on a periodic mesh?
I have some trouble getting consistent results on periodic mesh for the traceoperator.
Best,
Guosheng