Skip to content

Commit

Permalink
FEAT: enable 1D ion advection
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjridley committed Nov 6, 2024
1 parent 7daea57 commit 04b038a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/inputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ class Inputs {
bool get_advection_neutrals_bulkwinds();
bool get_advection_neutrals_implicitfriction();


std::string get_advection_ions_along();

/**********************************************************************
\brief returns settings["
\param
Expand Down
1 change: 1 addition & 0 deletions include/ions.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class Ions {
bool set_bcs(Grid grid, Times time, Indices indices);
bool set_upper_bcs(Grid grid);
bool set_lower_bcs(Grid grid, Times time, Indices indices);
bool advect_vertical(Grid grid, Times time);

int get_species_id(std::string name);
void calc_efield(Grid grid);
Expand Down
4 changes: 3 additions & 1 deletion src/advance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ bool advance(Planets &planet,
if (didWork)
didWork = neutralsMag.set_bcs(mGrid, time, indices);

if (gGrid.get_nAlts(false) > 1)
if (gGrid.get_nAlts(false) > 1) {
neutrals.advect_vertical(gGrid, time);
ions.advect_vertical(gGrid, time);
}

neutrals.exchange_old(gGrid);
advect(gGrid, time, neutrals);
Expand Down
4 changes: 4 additions & 0 deletions src/inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,10 @@ std::string Inputs::get_advection_neutrals_vertical() {
return get_setting_str("Advection", "Neutrals", "Vertical");
}

std::string Inputs::get_advection_ions_along() {
return get_setting_str("Advection", "Ions", "Along");
}

bool Inputs::get_advection_neutrals_bulkwinds() {
return get_setting_bool("Advection", "Neutrals", "useBulkWinds");
}
Expand Down

0 comments on commit 04b038a

Please sign in to comment.