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

Wrong sign on divu(ueint) and pdivu ? #67

Closed
marchdf opened this issue Dec 22, 2023 · 2 comments
Closed

Wrong sign on divu(ueint) and pdivu ? #67

marchdf opened this issue Dec 22, 2023 · 2 comments

Comments

@marchdf
Copy link
Contributor

marchdf commented Dec 22, 2023

I think that the line here: https://github.com/AMReX-Fluids/CAMR/blob/development/Source/Hydro/Hydro_utils_eb_K.H#L107
should be: divu(i,j,k,UEINT) -= pdivu;. And similarly for this line: https://github.com/AMReX-Fluids/CAMR/blob/development/Source/Hydro/Hydro_utils_eb_K.H#L156, it should be divu(i,j,k,UEINT) -= ... . And similarly for the 3D version in that function (4 spots total).

This would make things consistent with the non-EB version:

update(i, j, k, UEINT) -= pdivu(i, j, k);

The reason for an issue vs a opening a PR is that I am not 100% sure because it seems to make no difference when I run the shock-cylinder case. Thoughts @asalmgren ?

@jbbel
Copy link

jbbel commented Dec 23, 2023

Marc, i have looked over the code and i believe you are correct. go ahead and submit a PR. this only does something when equation for total energy gives bad results. It may well never be used in a shock-cylinder case. Usually associated with hypersonic stuff from astrophysics or cosmology

@marchdf
Copy link
Contributor Author

marchdf commented Jan 3, 2024

Thanks, John. I fixed it (and a couple others) in #66

@marchdf marchdf closed this as completed Jan 3, 2024
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

No branches or pull requests

2 participants