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

Fix for problem with HLLE and near-dry states #163

Merged
merged 1 commit into from
Apr 25, 2021

Conversation

carlosmunozmoncayo
Copy link
Contributor

When running a 1D dam-break simulation with a initial near-dry state, the HLLE solver gave a wrong solution. The following image corresponds to the output of hl=1, hr=1e-33, ul=ur=0, using the Classic solver with mx=4000 and order=1:
Dry_state_HLLE
This seems to be caused by the denominator (s1-s2) getting close to zero while computing middle states. The proposed fix just sets the speeds and waves as zero whenever both hl and hr are smaller than a tolerance (1e-14). This is the output with the same initial values after applying the changes:
Dry_state_HLLE_1

@mandli
Copy link
Member

mandli commented Apr 25, 2021

Good suggestion! This solver was really never meant to really handle dry-states but it should be able to handle simple ones.

@mandli mandli merged commit d177660 into clawpack:master Apr 25, 2021
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