Skip to content

Commit ca9f01f

Browse files
authored
Merge pull request #167 from AetherModel/cet
FEAT: Electron Temperature
2 parents 7aa0614 + c4126da commit ca9f01f

File tree

9 files changed

+835
-11
lines changed

9 files changed

+835
-11
lines changed

include/inputs.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,50 @@ class Inputs {
436436
bool get_O_cooling();
437437

438438
/**********************************************************************
439-
\brief returns settings["
439+
\brief returns settings["Sources"]["Ions"]["IncludePhotoElectronHeating"]
440+
\param none
441+
**/
442+
bool get_do_photoelectron_heating();
443+
444+
/**********************************************************************
445+
\brief returns settings["Sources"]["Ions"]["IncludeIonizationHeating"]
446+
\param none
447+
**/
448+
bool get_do_ionization_heating();
449+
450+
/**********************************************************************
451+
\brief returns settings["Sources"]["Ions"]["IncludeElectronIonCollisionalHeating"]
452+
\param none
453+
**/
454+
bool get_do_electron_ion_collisional_heating();
455+
456+
/**********************************************************************
457+
\brief returns settings["Sources"]["Ions"]["IncludeElectronNeutralElasticCollisionalHeating"]
458+
\param none
459+
**/
460+
bool get_do_electron_neutral_elastic_collisional_heating();
461+
462+
/**********************************************************************
463+
\brief returns settings["Sources"]["Ions"]["IncludeElectronNeutralInelasticCollisionalHeating"]
464+
\param none
465+
**/
466+
bool get_do_electron_neutral_inelastic_collisional_heating();
467+
468+
469+
/**********************************************************************
470+
\brief returns settings["Sources"]["Ions"]["IncludeThermoelectricHeating"]
471+
\param none
472+
**/
473+
bool get_do_thermoelectric_heating();
474+
475+
/**********************************************************************
476+
\brief returns settings["
477+
\param
478+
**/
479+
bool get_use_centripetal();
480+
481+
/**********************************************************************
482+
\brief returns settings["
440483
\param
441484
**/
442485
bool get_use_coriolis();

include/ions.h

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Ions {
172172
/// Specific heat (constant volume):
173173
arma_cube Cv_scgc;
174174

175-
/// Head Conduction (bulk):
175+
/// Heat Conduction (bulk):
176176
arma_cube lambda;
177177

178178
// Electrodynamics:
@@ -348,8 +348,75 @@ class Ions {
348348
\brief Calculates the electron temperature on the given grid
349349
\param neutrals these are needed for the collision terms
350350
\param grid this is the grid to solve the equation on
351+
\param time the time class to know dt
351352
**/
352-
void calc_electron_temperature(Neutrals neutrals, Grid grid);
353+
void calc_electron_temperature(Neutrals neutrals, Grid grid, Times time);
354+
355+
/**********************************************************************
356+
/// @brief Calculate epsilon
357+
/// @details intermediate variable used in photoelectron & ionization heating
358+
/// From (Smithro & Solomon, 2008).
359+
/// @param neutrals
360+
/// @return epsilon
361+
**/
362+
arma_cube calc_epsilon(Neutrals &neutrals);
363+
364+
/**********************************************************************
365+
\brief Calculates photoelectron heating
366+
\details Based on (Swartz & Nisbet, 1972) & (Smithro & Solomon, 2008)
367+
Uses equations 9-12 from (Zhu & Ridley, 2016)
368+
https://doi.org/10.1016/j.jastp.2016.01.005
369+
\param epsilon
370+
\return Qphe
371+
**/
372+
arma_cube calc_photoelectron_heating(arma_cube epsilon);
373+
374+
/**********************************************************************
375+
\brief Calculates auroral heating
376+
\details NOTE: in GITM this is solved separately for ion precipitation & auroral
377+
ionization. In Aether these are both in ions.species[iIon].ionization_scgc...
378+
\param epsilon
379+
\return Qaurora
380+
**/
381+
arma_cube calc_ionization_heating(arma_cube epsilon);
382+
383+
/**********************************************************************
384+
\brief Calculates electron-ion (elastic) collisional heating
385+
\details From Schunk and Nagy 2009, and Bei-Chen Zhang and Y. Kamide 2003
386+
- This differs slightly from the GITM implementation, which assumes several ion species are present.
387+
Instead, here we use each ion species for the sum.
388+
- electon-ion collision frequency (from Schunk and Nagy 2009) = 5.45E-5
389+
- This is capable of handling BOTH the bulk & individual ion temperatures
390+
\return vector<Qeicp, Qeicm, Qeic_v>
391+
**/
392+
std::vector<arma_cube> calc_electron_ion_collisions();
393+
394+
/**********************************************************************
395+
\brief Calculates electron-neutral elastic collisional heating
396+
\details From Schunk and Nagy 2009
397+
\param neutrals
398+
\return vector<Qencp, Qencm, Qenc_v>
399+
**/
400+
std::vector<arma_cube> calc_electron_neutral_elastic_collisions(Neutrals &neutrals);
401+
402+
/**********************************************************************
403+
\brief Calculates the electron-neutral inelastic collisional heating
404+
\details From Schunk and Nagy 2009 pages 277, 282.
405+
This includes N2, O2 rotation, fine structure, O(1D) exitation & vibration, N2 vibration.
406+
See equation 15 from (Zhu, Ridley, Deng, 2016) https://doi.org/10.1016/j.jastp.2016.01.005
407+
\param neutrals
408+
\return vector<Qencp, Qencm, Qenc_v>
409+
**/
410+
std::vector<arma_cube> calc_electron_neutral_inelastic_collisions(Neutrals &neutrals);
411+
412+
/**********************************************************************
413+
\brief Calculate the thermoelectric current (same at all altitudes)
414+
\details Use eq. 6 of https://doi.org/10.1016/j.jastp.2016.01.005
415+
- Since we do not know e- parallel velocity, the dipole needs to do it this way too.
416+
\param grid
417+
\return arma_mat JParaAlt
418+
**/
419+
arma_mat calc_thermoelectric_current(Grid &grid);
353420

354421
/**********************************************************************
355422
\brief Check all of the variables for nonfinites, such as nans

include/solvers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ arma_vec solver_conduction(
4040
arma_vec dx,
4141
precision_t dt,
4242
int64_t nGCs,
43-
bool return_diff);
43+
bool return_diff = false,
44+
arma_vec source2 = arma_vec());
4445

4546
arma_cube solver_chemistry(arma_cube density,
4647
arma_cube source,

share/run/UA/inputs/defaults.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@
104104
"Cent_acc": true },
105105
"Neutrals" : {
106106
"NO_cool" : false,
107-
"O_cool": false } },
107+
"O_cool": false },
108+
"Ions":{
109+
"IncludePhotoElectronHeating": true,
110+
"IncludeIonizationHeating": true,
111+
"IncludeElectronIonCollisionalHeating":true,
112+
"IncludeElectronNeutralElasticCollisionalHeating":true,
113+
"IncludeElectronNeutralInelasticCollisionalHeating":true}
114+
},
108115

109116
"Seed" : 0,
110117

src/advance.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ bool advance(Planets &planet,
200200
}
201201

202202
ions.calc_ion_temperature(neutrals, gGrid, time);
203-
ions.calc_electron_temperature(neutrals, gGrid);
203+
// ions.calc_electron_temperature(neutrals, gGrid, time);
204204
//ionsMag.calc_ion_temperature(neutralsMag, mGrid, time);
205-
//ionsMag.calc_electron_temperature(neutralsMag, mGrid);
205+
ionsMag.calc_electron_temperature(neutralsMag, mGrid, time);
206206

207207
if (didWork & input.get_check_for_nans())
208208
didWork = neutrals.check_for_nonfinites("After Vertical Advection");

0 commit comments

Comments
 (0)