Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to rpt2_geoclaw #159

Merged
merged 6 commits into from
Nov 8, 2020
Merged

Conversation

rjleveque
Copy link
Member

Various issues were found in trying to determine (with @mjberger) why radially-symmetric initial data does not lead to symmetric solutions (to machine accuracy). This PR has several modifications that might change the results obtained, so do not merge until it is more carefully tested and compared with previous results on some real-world problems.

Switch to using Jacobian from left or right state, not Roe average, in determining wave speeds and eigenvectors.

The original used ql, qr to compute Roe averages, but since the transverse solver splits up a left-going asdq (if imp==1) or a right-going asdq (if imp==2) into up-going and down-going components, there is not good justification for using the state from the other side of the normal solve that generated asdq. Now it uses the Jacobian matrix from the appropriate side.

Ideally we would also use q in the row of cells above or below, similar to what is done for variable-coefficient acoustics, but in that case the necessary info is in the aux arrays and we do pass aux from above and below into rpt2 as aux3 and aux1 respectively. But we do not pass in q from above and below.

In addition, a bug in the second component of the eigenvectors was fixed. It should be the orthogonal component of velocity to the one that defines s(2).

Finally, when s(2) is close to zero this component of the flux difference is now split equally between bmasdq and bpasdq to improve symmetry. The cutoff is when abs(s(2)) < 0.001 * sqrt(g*hlr) where hlr is now h on the proper side. Not clear if this is the best tolerance.

Note that indentation is screwy in this routine and should also be cleaned up, but for now I left alone to highlight the lines that changed more substantially.

rjleveque added a commit to rjleveque/geoclaw that referenced this pull request Oct 1, 2020
The logic is now cleaner and some work is skipped in dry cells so it
is faster.  Relative to earlier tests on this branch, this goes back
to the original approach of putting fluctuations in bmasdq if s<0 and
into bpasdq if s>0 without splitting if s near 0.  But it now skips
the splitting entirely only if eta < min(topo1,topo3) rather than max(..)
and creates transverse fluctuation going into the cell if eta < topo,
which seems more correct but could cause changes in results.
@mandli
Copy link
Member

mandli commented Oct 26, 2020

I can indeed confirm that this improves behavior of the storm surge examples both removing much of the instability in shallow waters away from the storm and allowing for us to safely increase to second order. I think this then says it is safe to merge this and update all the tests.

@rjleveque
Copy link
Member Author

Additional tests by @mandli and myself have shown this gives results that are similar to past results and seem better when different, in particular this may eliminate some of the stability issues seen in the past for long runs.

@rjleveque rjleveque changed the title WIP: Modifications to rpt2_geoclaw Modifications to rpt2_geoclaw Nov 8, 2020
@rjleveque rjleveque merged commit 78c2236 into clawpack:master Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants