Experiment with explicit hybrid solver#22
Open
henry2004y wants to merge 1 commit intoSWMFsoftware:masterfrom
Open
Experiment with explicit hybrid solver#22henry2004y wants to merge 1 commit intoSWMFsoftware:masterfrom
henry2004y wants to merge 1 commit intoSWMFsoftware:masterfrom
Conversation
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.
This is the first experiment with an explicit hybrid solver in FLEKS. During the changes, I noticed that the current design always assumes species 0 to be electron. As a temporary workaround, we introduced a
activeSpeciesvector to keep track of active populations.Summary of Changes
Implemented the full generalized Ohm's law:
where:
New Parameters:
useHybridPIC(logical): Activates hybrid mode (disables Maxwell solver).etaResistivity(real): ResistivityelectronTemperature,electronGamma,electronDensity0(real): For adiabatic pressure gradient.nHallSubcycle(int): Number of subcycles for B-field update (Hall term stability).update_E_hybrid(): Computes the convection termupdate_B_hybrid(): New function that subcycles the B-field update. In each substep (dt_sub = dt/nHallSubcycle), it:Pic.h: Added new parameters andupdate_B_hybriddeclaration.Pic.cpp:update_E_hybridandupdate_B_hybrid.particle_moverand iterators to useactiveSpecies.#HYBRIDPIC,#RESISTIVITY,#ELECTRONTEMPERATURE,#HALLSUBCYCLE.Domain.cpp: Registered new commands.PARAM.XML: Updated XML schema for new commands.Verification
Hybrid Mode Validation
test_hybrid(based ontest16_2d, not included in this PR since it is in the SWMF git repository; this is quite annoying for development!)useHybridPIC = TetaResistivity = 1.0electronTemperature = 5.12e-4,gamma = 5/3nHallSubcycle = 4Regression Testing (Standard GM-PC)
Verified that standard GM-PC functionality is unaffected by running the following regression tests (all passed with 0 differences against reference):
test16_2d(GM-PC 2D)test16_3d(GM-PC 3D)test17(2D Alfven Wave)test18(3D Reconnection)test23_2d(2D Fast Wave AMR)test23_3d(3D Fast Wave AMR)test25(3D Light Wave AMR)