-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add Dan Barnes' effective potential (semi-implicit) Poisson solver #5079
base: development
Are you sure you want to change the base?
Conversation
Neat! I think the paper reference is off, though. That one points to Improved C1 shape functions for simplex meshes Is the paper you're referring to this one? (Barnes, Journal of Computational Physics., (2022) 111151) |
I updated the description to specify Appendix A of the reference (see https://www.osti.gov/servlets/purl/1670766) where the semi-implicit method is described. I believe this reference was earlier than the Darwin model paper which is why I opted for it, but it is nice to have the other paper referenced in the PR as well. Thanks @archermarx! |
5b26c50
to
a1f67da
Compare
545a522
to
6e702a5
Compare
Thanks @archermarx! I'll use your script to debug and let you know what I find. I won't have time to get to it until early next week however. Sorry for the delay. |
No worries! Thanks for writing this feature! |
126cd58
to
7f5f366
Compare
…org/10.1109/TPS.2021.3072353 Signed-off-by: roelof-groenewald <[email protected]>
The CI test was updated to more-or-less follow benchmark C from https://doi.org/10.1109/TPS.2021.3072353, but using different parameters in order to exploit the semi-implicit value. Nonetheless, the plasma expansion matches the analytic solution from that paper (dashed lines show analytic result at each time point): |
@archermarx I found the reason why you didn't get any E-field - the E-field was only updated if EBs were used. I fixed that issue now. Would you please pull the latest changes and try your case again? |
Yes, I'm compiling and will test shortly. |
Awesome! Thanks for checking. I'd recommend moving slowly towards larger cell sizes and larger timesteps. Maybe first using the same settings as you use explicitly. It is important to keep the electron streaming factor below 1. |
The results look pretty good to me, I ran at 2x grid size and 2x timestep with a factor of 2 and got results quite close to the explicit results with a total speedup of ~4x. I will run more tests but overall this seems to work great! |
Thanks for following up! I'm glad to hear it is working for your use case so far. I'd be curious to hear how far you can push it before the physics start to suffer. We've run it using |
Interesting! I'm running the explicit version with larger dt and dx to start as a point of comparison, but I'll try 4x now. We're quite close to the streaming limit already so we can only really increase dt by increasing dx. The main question for us is how the larger effective plasma frequency and grid size affect the growth and propagation of the instability we care about, its effects on the plasma, and any numerical heating we might see. |
Do you have any guidance for choosing the implicit parameter? i know it needs to be greater than 1, and that higher values are more stable, but any other rules of thumb? |
Appreciate it, that's useful. |
Signed-off-by: roelof-groenewald <[email protected]>
@RemiLehe and @archermarx I spoke with Dan Barnes and he suggested we use "effective potential" as the name for this method (giving EP-PIC) in order to address Remi's concern of possible confusion with the semi-implicit method of Chen et al. |
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.
Think i found any remaining references to semi-implicit on its own
Co-authored-by: Thomas Marks <[email protected]>
Thanks so much! |
This PR adds a new electrostatic solver based on the semi-implicit scheme developed by Barnes, Journal of Comp. Phys., 424 (2021), 109852 (see Appendix A of reference).
The implementation was tested through the simulation of a Langmuir probe placed inside a uniform plasma. To this end a 2d simulation was performed with an initial uniform plasma with a conducting disk inserted in the center of the domain. The disk is kept at 0 V while Neumann boundary conditions are used for the domain boundary. Electrons and hydrogen ions were injected from all the domain boundaries using the
$V_s = 0.5T_e\ln\left(2\pi\frac{m_e}{2m_p}(1 + \frac{T_i}{T_e})\right) $ .$0.7T_e$ is also expected to form but the exact value of this depends on the domain size since the pre-sheath extends for many Debye lengths.$C_{SI} = 10$ .
UniformFluxDistribution
in order to simulate the particle flux from a uniform plasma. Thermal boundaries were used for the particles with the same temperatures as the initial plasma particles. The expected outcome of this simulation is that a sheath develops around the "Langmuir probe" with valueA pre-sheath of roughly
The figure below shows an example outcome from a simulation as described above in which the semi-implicit factor was set to
Required before merging: