Open donnaaboise opened 4 years ago
I assume this is also demonstrable in amrclaw?
Are you referring to a simple SWE example in AMRClaw? I haven't tried that. It would be interesting to see if using a `rpn2_shallow_bathymetry_fwave.f90' has the same issue.
I guess I was thinking that this might be replicated in general for anything with a non-flat mapping and qad
?
The problem shouldn't occur in AMRClaw on a single grid, for say, a simple SWE solver. But with AMR, on a non-flat grid, there could be a loss of conservation related to how qad is set up.
So it's completely based on a qad
problem?
On a curved mapped grid with AMR, the way that QAD currently calls the Riemann solver to get flux differences can lead to a conservation error. But the apparent loss of conservation in GeoClaw is on a single grid, so QAD isn't involved at all.
Ah ok. I think I am getting confused by multiple conversations.
@mjberger has observed a relative conservation error of about 1e-5 in GeoClaw. The test case she used was a modified the Chile example, initialized it with a single hump of water in the center of a single grid and solid wall boundary conditions.
I took this example, and modified it slightly to get the following results, which also show an apparent loss of conservation. I compared the conservation on a flat domain with results on the latlong grid. I adjust the radius of the earth (r = 63) so that the total mass in both the flat and latlong case were the same, and use a dam-break type initial condition (disk of height 0.1 over bathymetry=-1)
I've pushed my example here. (Branch : donnaaboise/conservation_test), under examples/tsunami/conservation_test.
Conservation error on the flat domain
The relative conservation error is approximately 1e-15 at the final time.
Conservation on the lat/long domain
The relative conservation error is approximately 1e-5 at the final time.
Here are the two views of the solution.
With no initial perturbation, there is no conservation error, so boundary conditions are working correctly. I've also checked to see that the solution does not reach the boundaries within the 10 time steps shown.
Has anyone else seen this behavior? Or have a possible explanation?