Add passive_momentum option to neutral_mixed#592
Open
Vandoo wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #592 +/- ##
==========================================
- Coverage 49.08% 48.80% -0.29%
==========================================
Files 96 96
Lines 10038 10133 +95
Branches 1452 1484 +32
==========================================
+ Hits 4927 4945 +18
- Misses 4606 4675 +69
- Partials 505 513 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Re-applies the previously-proposed neutral_passive_momentum feature onto current master (the original branch had drifted ~600 commits behind). New options: - passive_momentum: evolve only the neutral density; momentum and pressure are passive (pressure is not added to the solver). - temperature_from: take Tn from another species (e.g. the ion, Tn=Ti). - evolve_pressure: defaults to !passive_momentum. - anomalous_transport_momentum (AnomalousDiffusion): toggle anomalous transport of parallel momentum. In passive_momentum mode NVn is set from an ion-equilibrium relation NVn = Nn_eq * Vi, with Nn_eq built from cx/iz/rec collision frequencies, and nu_cx/nu_iz/nu_rec/Nn_eq exposed as diagnostics. The preconditioner gains a density-only branch (I - gamma*Div_perp(Dnn*Grad_perp))*ddt(Nn) when pressure is not evolved. Pressure/momentum terms, sources, diagnostics, time-derivative scaling, freeze_low_density and CHECK blocks are gated on the new flags. Reading another species' temperature declares the required GuardedOptions read permission. Tested on a 3D MAST-U Super-X case: builds clean, runs to completion with finite fields, reproduces the original branch's passive behaviour (Tn tracks Ti to ~0.1%, 7 evolved fields, consistent neutral diagnostics).
29f1eb4 to
5aa5ae8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-applies the previously-proposed neutral_passive_momentum feature onto current master (the original branch had drifted ~600 commits behind).
New options:
In passive_momentum mode NVn is set from an ion-equilibrium relation NVn = Nn_eq * Vi, with Nn_eq built from cx/iz/rec collision frequencies, and nu_cx/nu_iz/nu_rec/Nn_eq exposed as diagnostics.
The preconditioner gains a density-only branch (I - gammaDiv_perp(DnnGrad_perp))*ddt(Nn) when pressure is not evolved. Pressure/momentum terms, sources, diagnostics, time-derivative scaling, freeze_low_density and CHECK blocks are gated on the new flags. Reading another species' temperature declares the required GuardedOptions read permission.
Tested on a 3D MAST-U CD case: builds clean, runs to completion with finite fields, reproduces the original branch's passive behaviour (Tn tracks Ti to ~0.1%, 7 evolved fields, consistent neutral diagnostics).