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

Add entropy-stable dg operators #922

Merged
merged 131 commits into from
Aug 18, 2023
Merged

Add entropy-stable dg operators #922

merged 131 commits into from
Aug 18, 2023

Conversation

MTCam
Copy link
Member

@MTCam MTCam commented Jun 28, 2023

Adds ESDG continued from @thomasgibson's previous work. (#573).

The main pieces are:

  • euler.py
    • Stand-alone entropy_stable_euler_operator
    • Options to use entropy-stable
  • inviscid.py
    • Entropy conserving flux routines:
      - entropy_conserving_flux_chandrashekar (single gas only, passive scalars ok)
      - entropy_conserving_flux_renac (supports mixtures)
    • Facial flux drivers:
      - entropy_stable_inviscid_facial_flux_rusanov ESDG Rusanov-type flux with dissipation
      - entropy_stable_inviscid_facial_flux. General ESDG flux, dissipation optional
  • navierstokes.py
    • Rearranged to use inviscid_fluid_operator = {None, euler_operator, entropy_stable_euler_operator} for inviscid terms (default is None, meaning - do inline inviscid terms)
    • Options to use entropy-stable for inviscid terms
  • gas_model.py
    • Utilities to convert from conservative to/from entropy variables CV <--> EV (move to EOS?)
    • Utilities to create CV from projected EV
  • Examples
    • Added ESDG option to all examples
    • Some work better than others - but we should have the option available so we can exercise/debug it

Review guide:

  • There is a lot of repeated code in the giant gob of examples. The review will go easier/quicker by looking at some representative examples, instead of giving them all detailed attention. Here are some representative examples:
    • Simple case: pulse-mpi.py
    • Complex case: thermally-coupled-mpi.py

Questions for the review:

  • Is the scope and purpose of the PR clear?
    • The PR should have a description.
    • The PR should have a guide if needed (e.g., an ordering).
  • Is every top-level method and class documented? Are things that should be documented actually so?
  • Is the interface understandable? (I.e. can someone figure out what stuff does?) Is it well-defined?
  • Does the implementation do what the docstring claims?
  • Is everything that is implemented covered by tests?
  • Do you see any immediate risks or performance disadvantages with the design? Example: what do interface normals attach to?

@MTCam MTCam changed the title Add ESDG option to examples Add entropy-stable dg operators Jun 29, 2023
@MTCam MTCam added enhancement New feature or request Production Feeder Feeds the production branch labels Jun 29, 2023
@MTCam MTCam mentioned this pull request Jun 29, 2023
@MTCam MTCam requested review from majosm and tulioricci August 16, 2023 16:08
@MTCam MTCam marked this pull request as ready for review August 16, 2023 16:08
Copy link
Collaborator

@tulioricci tulioricci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments/questions.

mirgecom/gas_model.py Outdated Show resolved Hide resolved
mirgecom/euler.py Show resolved Hide resolved
mirgecom/navierstokes.py Outdated Show resolved Hide resolved
mirgecom/navierstokes.py Show resolved Hide resolved
mirgecom/navierstokes.py Show resolved Hide resolved
mirgecom/euler.py Show resolved Hide resolved
mirgecom/initializers.py Outdated Show resolved Hide resolved
mirgecom/initializers.py Show resolved Hide resolved
examples/taylor-green-mpi.py Outdated Show resolved Hide resolved
dd=dd_vol, comm_tag=comm_tag, limiter_func=limiter_func,
entropy_stable=use_esdg)

if use_esdg:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should mix esdg_euler with plain_euler or simply let the driver/navierstokes operator handle which one to use. I have a preference to keep them separate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will push back on this a bit. We have in excess of 20 examples to change. Adding the necessary constructs to all drivers to do in in the driver-side is an onerous undertaking. On the other hand, letting the driver specify use_esdg=True and factoring out the rest into this common code reduces the total amount of code required by a lot , makes it easier to read, and much easier to use.

@MTCam MTCam requested a review from tulioricci August 17, 2023 17:23
@tulioricci tulioricci enabled auto-merge (squash) August 18, 2023 00:56
Copy link
Collaborator

@tulioricci tulioricci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MTCam MTCam disabled auto-merge August 18, 2023 01:26
@MTCam MTCam enabled auto-merge (squash) August 18, 2023 01:33
@MTCam MTCam merged commit 3e3ef3e into main Aug 18, 2023
@MTCam MTCam deleted the entropy-stable-dg branch August 18, 2023 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Production Feeder Feeds the production branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants