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

Enable viz of native boundary files #1356

Merged
merged 9 commits into from
Nov 25, 2024
Merged

Enable viz of native boundary files #1356

merged 9 commits into from
Nov 25, 2024

Conversation

marchdf
Copy link
Contributor

@marchdf marchdf commented Nov 19, 2024

Summary

This PR add "Header" files for the native boundary plane files. We couldn't visualize these before, now we can. For example, this is viewing the xlo boundary plane and the mesh in the background is the full domain from the plt file:

Screenshot 2024-11-19 at 10 41 47 AM

The one thing is that Visit and Paraview expect plain "Header" file names so to viz different planes you need to simlink the header file you want to viz to "Header".

This also reduces the amount written to disk. For higher levels we wrote the entire BC to disk but now I use a min box to only write out the level data that is populated.

Still a couple things I want to check and also add documentation.

This is a stepping stone to other things but is useful in and of itself.

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

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

@marchdf
Copy link
Contributor Author

marchdf commented Nov 19, 2024

Do we know if people tend to run ABL precursors with multiple levels at the BCs? My idea of writing out just the data we need at the BC and then reading that is breaking backwards compatibility. But this would only affect users that have multiple levels touching the boundary and using the native format.

@mchurchf
Copy link
Contributor

Marc,

Yes, people increasingly run precursors with multiple levels of refinement that completely span the horizontal extent of the domain, so the boundary has multiple refinement levels on it.

Matt

@marchdf
Copy link
Contributor Author

marchdf commented Nov 19, 2024

Thanks, Matt. I am debating what to do here. I like that this is only outputting the right data and not extra data. But I don't like that this might mean some boundary files will be obsolete. grrr. Maybe I just give up the idea of not doing the right thing?

@hgopalan
Copy link
Contributor

This can be useful when you have inflow and outflow in the same boundary plane.

@rybchuk
Copy link
Contributor

rybchuk commented Nov 20, 2024

Hey just chiming in to say this would be a wonderful feature! And echoing what Matt said, I just finished up running offshore ABL simulations where I had refinement zones near the air-sea interface spanning across all x and y values.

@marchdf
Copy link
Contributor Author

marchdf commented Nov 20, 2024

Great! I figured out a way to not break backwards compatibility so that won't be a concern.

@marchdf marchdf force-pushed the bndry branch 3 times, most recently from 8dad68e to 90ac88c Compare November 20, 2024 23:46
@marchdf
Copy link
Contributor Author

marchdf commented Nov 20, 2024

So things got a little bit crazy in trying to make this work. Basically if it's using the new capability, it uses the header files to read in the boundary geom/domain. If not, it goes back to what was before.

I am pretty sure I didn't break backwards compatibility. But I would really appreciate help from @hgopalan and/or @rybchuk. Could you run a restart using this branch using a precursor run you already have (ie not using the stuff in this PR)? Basically I want to be sure I didn't break your current files. So don't rerun the precursor! Just the restart. Thanks in advance!!

@rybchuk
Copy link
Contributor

rybchuk commented Nov 21, 2024

So things got a little bit crazy in trying to make this work. Basically if it's using the new capability, it uses the header files to read in the boundary geom/domain. If not, it goes back to what was before.

I am pretty sure I didn't break backwards compatibility. But I would really appreciate help from @hgopalan and/or @rybchuk. Could you run a restart using this branch using a precursor run you already have (ie not using the stuff in this PR)? Basically I want to be sure I didn't break your current files. So don't rerun the precursor! Just the restart. Thanks in advance!!

Looks good to me! I grabbed the code from commit 6241ead and ran 10 timesteps of an inflow-outflow simulation using BC data that was generated with an older commit.

@hgopalan
Copy link
Contributor

Same. Worked fine.

@marchdf marchdf marked this pull request as ready for review November 21, 2024 18:27
@marchdf
Copy link
Contributor Author

marchdf commented Nov 21, 2024

Thanks much! I am assuming "worked fine and results looked reasonable".

To be clear, this viz capability will only be available for now with new files that are generated past this commit (I might write a script to generate the headers post-facto). All the regtests pass so hopefully we are good to go. Messing with the boundary planes makes me nervous because they are so integral to so many workflows. Let me know ASAP if things aren't working anymore and apologies in advance ;)

@marchdf marchdf marked this pull request as draft November 21, 2024 19:02
@marchdf marchdf marked this pull request as ready for review November 21, 2024 19:56
@marchdf marchdf force-pushed the bndry branch 2 times, most recently from 381fcd6 to 8c37c84 Compare November 22, 2024 21:01
@marchdf
Copy link
Contributor Author

marchdf commented Nov 22, 2024

@moprak-nrel and @mbkuhn, would you mind checking this? I think I did want I intended to do with this one.

@marchdf marchdf merged commit 68753c2 into Exawind:main Nov 25, 2024
15 checks passed
@marchdf marchdf deleted the bndry branch November 25, 2024 20:01
@marchdf marchdf mentioned this pull request Nov 26, 2024
11 tasks
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.

5 participants