Module: dentonFluxModel

Executive Summary

This module provides the GEO electron and ion flux based on 82 satellite-years as discussed in this paper by M. H. Denton and on this website. A Fortran module can be downloaded from this website which computes the electron and ion flux for a given \(K_p\) index, local time and particle energy, and also includes the relevant flux data. The Basilisk module only uses the mean flux data.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

../../../../_images/moduleDentonFluxModel.svg

Figure 1: dentonFluxModel() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

scStateInMsg

SCStatesMsgPayload

spacecraft state input message

earthStateInMsg

SpicePlanetStateMsgPayload

Earth planet state input message

sunStateInMsg

SpicePlanetStateMsgPayload

Sun state input message

fluxOutMsg

PlasmaFluxMsgPayload

output ion and electron fluxes

Module Assumptions and Limitations

This module assumes that the position vectors of the spacecraft, Sun and Earth are expressed in an Earth equatorial frame with the z-component perpendicular to the equatorial plane. The local time of the spacecraft is determined by projecting the spacecraft and Sun position vectors onto the equatorial plane and computing the angle between the resulting projected vectors. When both projected vectors point in the same direction, then the local time (LT) is 12 hours.

The particle energies are limited between 100 eV and 40 keV. The lower limit of 100 eV is recommended by M. H. Denton, because the fluxes of smaller energies are unreliable due to contamination with secondary electrons and photoelectrons. The flux data provided by Denton does not provide information above 40 keV.

Since the flux data is only valid for the GEO regime, a BSK warning message is generated if the spacecraft location is more than 4,000 km away from Geostationary Orbit (equatorial orbit with radius of 42,000 km).

User Guide

The Denton model averaged GEO space plasma properties module is created using:

1fluxModule = dentonFluxModel.DentonFluxModel()
2fluxModule.ModelTag = "dentonFluxModule"
3fluxModule.dataPath = bskPath + '/supportData/DentonGEO/'
4fluxModule.kpIndex = "2+"
5fluxModule.numOutputEnergies = 30
6scSim.AddModelToTask(dynTaskName, fluxModule)

The \(K_p\) index (kpIndex) and number of output energies (numOutputEnergies) must be added to FluxModule as well, while the local time is computed within the module using the position vectors of the spacecraft, Sun and Earth.

Note that the Kp index (global geomagnetic activity index) ranges from 0 to 9, with sub-indices ‘-‘,’o’ and ‘+’ and therefore a total number of 28 indices (\(K_p\) index 0- and 9+ do not exist). In this module, the Kp index is specified with a string of length 2, for example ‘5-‘.


Defines

MAX_NUM_KPS
MAX_NUM_ENERGIES
MAX_NUM_LOCAL_TIMES
MAX_NUM_VALUE_TYPES
class DentonFluxModel : public SysModel
#include <dentonFluxModel.h>

This module provides the 10-year averaged GEO elecon and ion flux as discussed in the paper by Denton.

Public Functions

DentonFluxModel()

This is the constructor for the module class. It sets default variable values and initializes the various parts of the model

~DentonFluxModel()

Module Destructor

void Reset(uint64_t CurrentSimNanos) override

This method is used to reset the module and checks that required input messages are connect.

Parameters:

CurrentSimNanos – current simulation time in nano-seconds

Returns:

void

void UpdateState(uint64_t CurrentSimNanos) override

This is the main method that gets called every time the module is updated. Provide an appropriate description.

Parameters:

CurrentSimNanos – current simulation time in nano-seconds

Returns:

void

Public Members

int numOutputEnergies = -1

number of energy bins used in the output message

std::string kpIndex = ""

Kp index.

std::string dataPath = ""

&#8212; String with the path to the Denton GEO data

std::string eDataFileName = "model_e_array_all.txt"

file name of the electron data file

std::string iDataFileName = "model_i_array_all.txt"

file name of the ion data file

ReadFunctor<SCStatesMsgPayload> scStateInMsg

spacecraft state input message

ReadFunctor<SpicePlanetStateMsgPayload> earthStateInMsg

Earth planet state input message.

ReadFunctor<SpicePlanetStateMsgPayload> sunStateInMsg

sun state input message

Message<PlasmaFluxMsgPayload> fluxOutMsg

output message with ion and electron fluxes

BSKLogger bskLogger

&#8212; BSK Logging

Private Functions

void calcLocalTime(double v1[3], double v2[3])

method to calculate the local time of the spacecraft within the GEO belt

Parameters:
  • r_SE_N – sun position vector relative to the Earth

  • r_BE_N – spacecraft position vector relative to the Earth

Returns:

void

double bilinear(int, int, double, double, double, double, double, double, double)

Bilinear interpolation method

Returns:

void

void readDentonDataFile(std::string fileName, double data[MAX_NUM_KPS][MAX_NUM_ENERGIES][MAX_NUM_LOCAL_TIMES])

Read in the Denton data file

Parameters:
  • fileName – data file name

  • data – data array pointer

Returns:

void

Private Members

int kpIndexCounter

Kp index counter (betweeen 0 and 27)

double localTime

spacecraft location time relative to sun heading at GEO

double logEnElec[MAX_NUM_ENERGIES]

log of the electron energies

double logEnProt[MAX_NUM_ENERGIES]

log of the proton energies

double inputEnergies[MAX_NUM_ENERGIES]

input energies considered in this module

Electron Flux:

double mean_e_flux[MAX_NUM_KPS][MAX_NUM_ENERGIES][MAX_NUM_LOCAL_TIMES]

Ion Flux:

double mean_i_flux[MAX_NUM_KPS][MAX_NUM_ENERGIES][MAX_NUM_LOCAL_TIMES]

Fill average centre energies, normalized by satellite.

double enElec[40] = {1.034126, 1.346516, 1.817463, 2.399564, 3.161048, 4.153217, 5.539430, 7.464148, 9.836741, 12.543499, 16.062061, 20.876962, 27.183572, 35.843437, 47.179073, 61.424732, 80.120170, 104.563461, 136.914871, 179.740982, 235.406829, 309.020721, 405.806213, 532.664123, 699.243896, 917.146484, 1205.174438, 1582.510986, 2069.619628, 2703.301269, 3540.124511, 4639.775390, 6069.347656, 7957.457519, 10436.841796, 13677.195312, 17923.560546, 23488.560546, 30782.000000, 40326.937500}
double enProt[40] = {1.816424, 2.284231, 2.904752, 3.639589, 4.483188, 5.671049, 7.343667, 9.450922, 11.934194, 15.105951, 19.372854, 24.943658, 32.053474, 41.142940, 53.239536, 68.940170, 89.082473, 115.585487, 150.529022, 196.249755, 256.610107, 335.709136, 439.549621, 574.766357, 749.907531, 982.261108, 1278.967041, 1662.856079, 2170.886474, 2829.989013, 3691.509765, 4822.499023, 6300.260742, 8217.569335, 10726.390625, 14001.280273, 18276.244140, 23856.085937, 31140.962890, 40649.562500}