-
Notifications
You must be signed in to change notification settings - Fork 114
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
Implement collision source terms for multi-ion MHD #2213
base: main
Are you sure you want to change the base?
Conversation
Review checklistThis 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
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2213 +/- ##
==========================================
+ Coverage 96.37% 96.38% +0.01%
==========================================
Files 486 487 +1
Lines 39186 39291 +105
==========================================
+ Hits 37764 37869 +105
Misses 1422 1422
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
v_mag = sqrt(v1^2 + v2^2 + v3^2) | ||
gamma = equations.gammas[k] | ||
p[k] = (gamma - 1) * | ||
(rho_e - 0.5f0 * rho * v_mag^2 - 0.5f0 * (B1^2 + B2^2 + B3^2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little inconsistent as there is v_mag
but no B_mag
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, one could save the root and square operations as v_mag
is not used anywhere else. Plus, maybe avoid mag
but use maybe just speed_squared = v1^2 + v2^2 + v3^2
to avoid possible confusion of _mag_nitude with _mag_netic
References: | ||
- P. Rambo, J. Denavit, Interpenetration and ion separation in colliding plasmas, Physics of Plasmas 1 (1994) 4050–4060. | ||
- Schunk, R. W., Nagy, A. F. (2000). Ionospheres: Physics, plasma physics, and chemistry. | ||
Cambridge university press. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide the DOI here?
function source_terms_collision_ion_ion(u, x, t, | ||
equations::AbstractIdealGlmMhdMultiIonEquations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Could one re-use this for a 2 fluid (ion-electron) Euler-Poisson Plasma approximation?
References: | ||
- P. Rambo, J. Denavit, Interpenetration and ion separation in colliding plasmas, Physics of Plasmas 1 (1994) 4050–4060. | ||
- Schunk, R. W., Nagy, A. F. (2000). Ionospheres: Physics, plasma physics, and chemistry. | ||
Cambridge university press. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
- Schunk, R. W., & Nagy, A. F. (2000). Ionospheres: Physics, plasma physics, and chemistry. | ||
Cambridge university press. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above: DOI would be nice.
mesh = TreeMesh(coordinates_min, coordinates_max, | ||
initial_refinement_level = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention again here why such a coarse mesh is used?
Compute the ion-ion collision source terms for the momentum and energy equations of each ion species as | ||
```math | ||
\begin{aligned} | ||
\vec{s}_{\rho_k \vec{v}_k} =& \rho_k\sum_{k'}\bar{\nu}_{kk'}(\vec{v}_{k'} - \vec{v}_k),\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you have k'
for consistency with the paper. Alternatively, one could maybe think about using l
as in the implementation?
Co-authored-by: Daniel Doehring <[email protected]>
This PR introduces collision source terms for multi-ion MHD, accompanied by detailed documentation and a physically relevant test case based on the following reference:
The Figure shows the temperature of two ion species for the second frictional slow-down test described in the reference above, as computed with
examples/tree_2d_dgsem/elixir_mhdmultiion_collisions.jl
andsource_terms = source_terms_collision_ion_ion
.