Skip to content

temperature as function of V and p for nonideal Eq of State#3093

Open
DanielDoehring wants to merge 19 commits into
trixi-framework:mainfrom
DanielDoehring:Temp_from_V_p
Open

temperature as function of V and p for nonideal Eq of State#3093
DanielDoehring wants to merge 19 commits into
trixi-framework:mainfrom
DanielDoehring:Temp_from_V_p

Conversation

@DanielDoehring

Copy link
Copy Markdown
Member

See #3079 (comment)

Unfortunately, this is breaking as we export temperature.

@DanielDoehring DanielDoehring requested a review from jlchan June 20, 2026 06:56
@DanielDoehring DanielDoehring added enhancement New feature or request breaking refactoring Refactoring code without functional changes example Adding/changing examples (elixirs) labels Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@DanielDoehring DanielDoehring changed the title temperature as function of V and p temperature as function of V and p for nonideal Eq of State Jun 20, 2026

@jlchan jlchan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this!

We can make it non-breaking by having temperature assume V, e variables (or forward to temperature_given_Ve and noting that in the docstring. I think this is preferrable since it would keep dispatch on the specialized implementations of temperature for specific EOS. What do you think?

Comment thread src/equations/equations_of_state.jl Outdated
Comment thread src/equations/equations_of_state.jl Outdated
Comment thread examples/tree_1d_dgsem/elixir_euler_nonideal_density_wave.jl
@DanielDoehring

DanielDoehring commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

We can make it non-breaking by having temperature assume V, e variables (or forward to temperature_given_Ve and noting that in the docstring. I think this is preferrable since it would keep dispatch on the specialized implementations of temperature for specific EOS. What do you think?

I think this is a good idea - although it might look a bit strange that we then forward something like temperature(V, e_internal) to temperature_given_Ve(V, e_internal) - but I think if we provide a link to temperature_given_Vp I think this is fine 👍

@jlchan jlchan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding the overload and removing the "breaking" label! Just two minor notes and one question.

Comment thread src/equations/nonideal_compressible_euler_2d.jl Outdated
Comment thread src/equations/nonideal_compressible_euler_1d.jl Outdated
Comment thread src/Trixi.jl Outdated
Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.89%. Comparing base (099f4e1) to head (cc62dcb).

Files with missing lines Patch % Lines
src/equations/equations_of_state.jl 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3093      +/-   ##
==========================================
+ Coverage   96.88%   96.89%   +0.01%     
==========================================
  Files         652      652              
  Lines       50179    50139      -40     
==========================================
- Hits        48615    48579      -36     
+ Misses       1564     1560       -4     
Flag Coverage Δ
unittests 96.89% <90.48%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/equations/equations_of_state.jl Outdated

@ranocha ranocha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Modulo the discussion on exporting the new function, this looks good to me if you also add a NEWS.md entry. Thanks a lot!

DanielDoehring and others added 3 commits June 23, 2026 21:49
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Comment thread src/equations/equations_of_state.jl Outdated
@jlchan jlchan closed this Jun 24, 2026
@jlchan jlchan reopened this Jun 24, 2026
Comment thread src/equations/equations_of_state.jl Outdated

@jlchan jlchan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @DanielDoehring!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request example Adding/changing examples (elixirs) refactoring Refactoring code without functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants