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 ghost cells being used for mac velocity BC functions #1093

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

marchdf
Copy link
Contributor

@marchdf marchdf commented Jun 6, 2024

Summary

Fixing the fact that the UDFs are called on cell-centered and face centered velocities and, therefore, the indices of the cells should be set appropriately.

Pull request type

Please check the type of change introduced:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Checklist

Left to do:

  • I need to do the same for lev != 0

The following is included:

  • new unit-test(s)
  • new regression test(s)
  • documentation for new capability

This PR was tested by running:

  • the unit tests
    • on GPU
    • on CPU
  • the regression tests
    • on GPU
    • on CPU

Additional background

With these changes, the fillpatch of the mac velocities now touches the following indices depending on the face-centered mac velocity component. For umac, we need to be touching -1 and 41 (with n_cell = 40). For the others it is -1 and 40.

  MAC_projection                 9         0.01766980429       1.787159811e-14
this face_idir: 0
Rankine.H op: filling 10.73181747 at i=-1
Rankine.H op: filling 10.13957005 at i=41
this face_idir: 1
Rankine.H op: filling 1.016180833 at i=-1
Rankine.H op: filling 0.5357916479 at i=40
this face_idir: 2
Rankine.H op: filling 0 at i=-1
Rankine.H op: filling 0 at i=40

Issue Number: #1076

@mbkuhn
Copy link
Contributor

mbkuhn commented Jun 6, 2024

🏆 for this PR name!

@marchdf
Copy link
Contributor Author

marchdf commented Jun 7, 2024

This is mostly done. But I am still waiting on something to be cleared up. Basically a bunch of stuff happens in IAMR and PeleLMeX that doesn't happen in incflo and I am not sure which is the right direction for amr-wind. Discussion is on-going in several places and here's one of them: AMReX-Combustion/PeleLMeX#386.

I have that stuff implemented for amr-wind and it causes diffs but no significant changes in the solution. So I can push it up here or ditch it depending on where these discussions go.

@marchdf marchdf changed the title Once more unto the breach, dear friends, once more Fix ghost cells being used for mac velocity BC functions Jun 11, 2024
@marchdf marchdf marked this pull request as ready for review June 11, 2024 13:31
@marchdf marchdf requested a review from mbkuhn June 11, 2024 13:31
@marchdf
Copy link
Contributor Author

marchdf commented Jun 11, 2024

If it turns out that stuff in IAMR/PeleLMeX is needed I can add it as a separate PR. Right now it is looking like it is not needed (at least for most cases, maybe needed for variable density?). Discussion is ongoing but shouldn't hold this PR up. I don't expect any diffs with this PR.

@marchdf marchdf merged commit a037e52 into Exawind:main Jun 11, 2024
13 checks passed
@marchdf marchdf deleted the another-mac-fix branch June 11, 2024 15:37
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