-
Notifications
You must be signed in to change notification settings - Fork 112
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
Draft: Implement the multi-ion MHD system of Toth #1427
base: main
Are you sure you want to change the base?
Conversation
…rsion with only conservative flux and estimates of wavespeeds
…e on-species case
…n LLF variant that is consistent with single species MHD)
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.
My first impression is that there are a lot of type instabilities in lower-level functions due to the approach to multiple components. Some ways to resolve them are
- use
MVector
s not crossing function borders - use
ntuple
withVal{ncomponents(equations)}()
- use StrideArrays.jl as we do in our manual SIMD optimizations
- use
Base.Cartesian
- last resort:
@generated
code
src/Trixi.jl
Outdated
@@ -174,14 +175,14 @@ export boundary_condition_do_nothing, | |||
boundary_condition_wall, | |||
BoundaryConditionNavierStokesWall, NoSlip, Adiabatic, Isothermal | |||
|
|||
export initial_condition_convergence_test, source_terms_convergence_test | |||
export initial_condition_convergence_test, source_terms_convergence_test, source_terms_standard |
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 very general name that can lead to a lot of confusion
It would be great to see some timer output to verify whether that's the case |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1427 +/- ##
==========================================
+ Coverage 96.37% 96.39% +0.02%
==========================================
Files 486 488 +2
Lines 39186 40090 +904
==========================================
+ Hits 37764 38644 +880
- Misses 1422 1446 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 had only a very cursory look at the equations, since there are probably more changes incoming from the performance PR, but at least this is a start
|
||
cons = ("B1", "B2", "B3") | ||
for i in eachcomponent(equations) | ||
cons = (cons..., tuple("rho_" * string(i),"rho_v1_" * string(i), "rho_v2_" * string(i), "rho_v3_" * string(i), "rho_e_" * string(i))...) |
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 probably not type stable, thus I wonder if this needs to be fixed. It would probably be safer to do so.
|
||
prim = ("B1", "B2", "B3") | ||
for i in eachcomponent(equations) | ||
prim = (prim..., tuple("rho_" * string(i),"v1_" * string(i), "v2_" * string(i), "v3_" * string(i), "p_" * string(i))...) |
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
Co-authored-by: Hendrik Ranocha <[email protected]>
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
…st_wave compatible with single precision
… and removed duplicated code
This PR implements the non-conservative multi-ion MHD system of Toth. The multi-ion MHD system describes the motion of multi-species plasmas, where each ion species has its own heat capacity ratio and charge, which leads to independent mass, momentum, and energy equations for each ion species. See, e.g.,
In this PR, we include entropy consistent discretizations in 1D and 2D. We neglect the electron pressure for the moment, and do not consider collision or reaction source terms. No divergence-cleaning technique is added.