-
Notifications
You must be signed in to change notification settings - Fork 21
Fluid equation of state with density floor #359
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
base: master
Are you sure you want to change the base?
Conversation
Consistently treat internal energy as Nlim * T, so that advection of thermal energy takes into account the density floor. Appears to reduce artefacts where the density falls below the floor.
Improve handling of low density regions by defining the fluid internal energy as Nlim * T. Modifies the pressure equation.
The internal energy of a fluid is modified to be Nlim * T. This changes the pressure equation to be consistent with the application of a density floor.
|
@bendudson this is awesome. Looking at What about flooring pressure itself? I see that now it's only flooring the density. I raised an issue to put clang-format in the CI: #360 |
|
Hey @mikekryjak . Thanks! The solver now evolves a modified internal energy |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #359 +/- ##
===========================================
- Coverage 40.45% 19.20% -21.25%
===========================================
Files 89 87 -2
Lines 8236 8069 -167
Branches 1170 1143 -27
===========================================
- Hits 3332 1550 -1782
- Misses 4506 6366 +1860
+ Partials 398 153 -245
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Perpendicular advection of NV uses Nlim, consistent with parallel advection.
A relatively simple fix that seems to greatly help reduce unphysical behavior near density floors.
Defines the internal energy E as E = Cv * Nlim * T rather than the usual Cv * N * T. This effectively puts a floor on the heat capacity of the fluid. Then solve the pressure equation consistent with this equation of state.
Changes made to pressure equations in
evolve_pressure,neutral_mixedandneutral_full_velocity. Unfortunately I ran clang-format on the files so the changes seem numerous. The actual change is quite small: In the pressure advection replace(5/3)PwithNlim * T + (2/3) * P.This is an example from the midplane of a DIII-D simulation using
neutral_full_velocity. The density floor is 1e-5, and previously produced quite unphysical behavior.