FV 1d WENO inviscid burgers convergence rates

24 views
Skip to first unread message

jerry fox

unread,
Apr 22, 2025, 6:26:27 AMApr 22
to claw-users
Hi all,
If I understand correctly, when solving the FV 1d Burgers eqation with WENO5, the rate of convergence should be 5 on smooth solutions.

I got this rate of convergence with FDM, but I fail to get that order with FV method, including clawpack's SharpClawSolver1D. 

The IC is defined with 1/2 + sin(\pi x) where 0 <= x<= 2.
What am I doing wrong?

best regards,
grinderfox

For clarity, here is my setup:
    ...
    riemann_solver = riemann.burgers_1D
    solver = pyclaw.SharpClawSolver1D(riemann_solver=riemann_solver)

    solver.kernel_language = 'Fortran'
    solver.cfl_desired = 0.001  # 1.
    solver.cfl_max = 0.01
    solver.num_waves = num_waves
    solver.num_eqn = num_eqn
    solver.lim_type = 2
    solver.weno_order = 5

    solver.bc_lower[0] = pyclaw.BC.periodic
    solver.bc_upper[0] = pyclaw.BC.periodic

    solution = pyclaw.Solution(solver.num_eqn, domain)
    state = pyclaw.State(domain, num_eqn)

    xc = state.grid.x.centers
    state.q[0,:] = np.sin(np.pi*xc) + 0.5


Praveen C

unread,
Apr 22, 2025, 6:59:20 AMApr 22
to Clawpack Google Group
Is your scheme in time also 5th order accurate.
best
praveen

--
You received this message because you are subscribed to the Google Groups "claw-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to claw-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/claw-users/4cd4cd16-8238-4e86-ba42-4fdd04897280n%40googlegroups.com.

jerry fox

unread,
Apr 22, 2025, 8:22:08 AMApr 22
to claw-users
Hi,
As I understood, the SharpClawSolver1D's solver should be of order 5. As it is stated in solver.weno_order = 5.
I compare the obtained numerical solution with the exact solution routine (obtained implicitly). The "exact solution routine" is the same for tested finite difference and finite volume methods.
I just can't figure out why I can't get the convergence order 5 in clawpack. What am I missing?
best regards,
grinderfox

Kyle Mandli

unread,
Apr 22, 2025, 8:49:00 AMApr 22
to claw-users
I am not sure what to suggest here off-hand but the default time integrator is the SSP104, which is 4th order.

What order are you seeing with your implementation?

Kyle

David Ketcheson

unread,
Apr 22, 2025, 10:55:33 AMApr 22
to claw-users
Here are two things that will affect the results, and overall I think will lead to you observing only 2nd-order convergence:

1.  The default time integrator is not 5th order; I think it is 4th order.  This might not affect the results, because the spatial error might still dominate depending on the mesh size.
2.  You are initializing with point values, not cell averages.  This introduces a 2nd-order error since the midpoint value is a 2nd-order approximation of the mean.

David

jerry fox

unread,
Apr 25, 2025, 2:24:19 AMApr 25
to claw-users
Hi all,
Sorry for the late reply, I've been too busy.
Correct me if I'm wrong, but to prove spatial order of accuracy (5 in WENO5), one should set cfl coefficient as small as possible, so that the error introduced in time integration is insignificant. It does work well with advection.
@David: In response to point 2: Yes, I think that there's the problem. However, how can one show the 5th order of convergence with inviscid Brugers? Or this is not possible?
best regards,
grinderfox

David Ketcheson

unread,
Apr 25, 2025, 4:49:51 AMApr 25
to claw-users
If you want to observe high-order spatial convergence with a FV method, you need to use correct initial values.  That means initializing with an accurate cell average.  You should also be comparing with cell averages of the exact solution, not with point values of the exact solution.

jerry fox

unread,
Apr 25, 2025, 8:42:31 AMApr 25
to claw-users
Indeed.. Thank you for your time and patience.
best regards,
grinderfox
Reply all
Reply to author
Forward
0 new messages