-
Notifications
You must be signed in to change notification settings - Fork 1
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 CompressibleEulerPlasma equations #53
base: main
Are you sure you want to change the base?
Implement CompressibleEulerPlasma equations #53
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. |
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.
Good first effort!
Seeing this, I would in general opt for implementing the Multi-Ion Euler equations, similar to the Multi-Ion MHD equations. Then, we can derive the Electron-Ion as a special case for this.
new{typeof(γ)}(γ, inv_gamma_minus_one) | ||
end | ||
end | ||
|
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.
A general comment: Maybe the best idea is to implement at first Multi-Ion Euler in a general fashion, such as done by Andres. Then, we can derive the Electron-Ion system from that as a special case.
@inline function single_species_flux(rho, rho_v1, rho_e, gamma) | ||
v1 = rho_v1 / rho | ||
p = (gamma - 1) * (rho_e - 0.5 * rho_v1 * v1) | ||
return SVector(rho_v1, rho_v1 * v1 + p, (rho_e + p) * v1) | ||
end |
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 like the idea of the extracted single species flux. Should be dispatched for the equation type and orientation/normal direction, though.
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 see. Maybe the implementation of iterating through each ion species (the way ideal_glm_mhd_multiion_2d.jl is handling this aspect) might be more compact. However, if you still think that this is a good idea, I can bring this function back.
Thank you for your detailed feedback! I have implemented the multi-ion system for compressible Euler equations. Is this now more in line with what you had in mind? Running
P.S. The example also works with lax-friedrichs flux. |
Yeah, looking good! Now we need to find a way to make this system really coupled. Staying for the moment with the ion-only case, you could take a look at the work by Andres and implement the ion-ion collision source terms. I am not sure if the testcase itself makes sense, or if you need for this the electron temperature/pressure business. |
The system consists of two conservation laws, one for ions and the other for electrons. An example of these equations is also added.
This is what running
elixir_euler_ion_electron.jl
yields