DICTAT
Model API name: dictat
DICTAT
Version: v4
External Input: electronSpectrum
Electron spectrum
| Input | Value | 
|---|---|
| Quantity | energy_flux_spectrum | energy_fluence_spectrum | 
| Qualifiers | 
            
                
                                    species: electron | 
        
    
Input group: dictat / multiplicity: one
Environment
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| exposureDuration | Duration of exposure (hrs) | 
                                
                                    
                                     | 
                            48 | duration | 
| energies | Energy values | 
                                
                                    
                                     | 
                            [1, 2, 3, 4, 5, 6] | energy | 
| fluxes | Flux values | 
                                
                                    
                                     | 
                            [10000000, 10000000, 1000000, 100000, 10000, 1000] | number | 
| fluxTimeseries | Flux timeseries values | 
                                
                                    
                                     | 
                            [[]] | number | 
| solarCycleFraction | Fraction of the solar cycle | 
                                
                                    
                                     | 
                            0.0 | number | 
| yearFraction | Fraction of the year | 
                                
                                    
                                     | 
                            1.0 | number | 
| direction | Direction | 
                                
                                    
                                        mono-directional=Mono-directional isotropic=Isotropic  | 
                            M | number | 
Ground definition
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| groundType | Which surface is grounded, inner surface (furthest from environment) or the outer surface. | 
                                
                                    
                                        inner=Inner outer=Outer  | 
                            inner | number | 
| numberOfGrounds | Number of grounds (1 or 2) | 
                                
                                    
                                        1=One surface 2=Both surfaces  | 
                            1 | number | 
Geometry
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| geometryType | Geometry type | 
                                
                                    
                                        planar=Planar cylindrical=Cylindrical  | 
                            planar | number | 
| fieldOfView | Field of view | 
                                
                                    
                                        
                                            min: 0 max: 90  | 
                            90 | plane_angle | 
Core definition
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| coreMaterial ( Material library ) | 
                                Core material
                                
                                    
                                
                                
                                     Used if geometryType==cylindrical  | 
                            
                                
                                    
                                     | 
                            COPPER | number | 
| coreRadius | 
                                Core thickness/radius
                                
                                    
                                
                                
                                     Used if geometryType==cylindrical  | 
                            
                                
                                    
                                        
                                            min: 0 max: 100  | 
                            0.1 | thickness | 
| 
                                coreMassDensity
                                
                                
                                     material property  | 
                            
                                Core mass density
                                
                                    
                                
                                
                                     Used if geometryType==cylindrical  | 
                            
                                
                                    
                                     | 
                            8.96 | mass_density | 
| 
                                coreAtomicNumber
                                
                                
                                     material property  | 
                            
                                Core atomic mass
                                
                                    
                                
                                
                                     Used if geometryType==cylindrical  | 
                            
                                
                                    
                                     | 
                            1 | number | 
| 
                                coreMassNumber
                                
                                
                                     material property  | 
                            
                                Core mass mass
                                
                                    
                                
                                
                                     Used if geometryType==cylindrical  | 
                            
                                
                                    
                                     | 
                            1 | number | 
Shield definition
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| shieldMaterial ( Material library ) | Shield material | 
                                
                                    
                                        
                                            note: Conductor | 
                            aluminium | number | 
| shieldThickness | Shield thickness | 
                                
                                    
                                     | 
                            0.1 | thickness | 
| 
                                shieldMassDensity
                                
                                
                                     material property  | 
                            Shield mass density | 
                                
                                    
                                     | 
                            8.96 | mass_density | 
| 
                                shieldAtomicNumber
                                
                                
                                     material property  | 
                            Shield atomic mass | 
                                
                                    
                                     | 
                            1 | number | 
| 
                                shieldMassNumber
                                
                                
                                     material property  | 
                            Shield mass mass | 
                                
                                    
                                     | 
                            1 | number | 
Dielectric definition
| Input | Description | Valid values | Default | Quantity | 
|---|---|---|---|---|
| dielectricMaterial ( Material library ) | Dielectric | 
                                
                                    
                                     | 
                            TEFLON | number | 
| 
                                dielectricActivationEnergy
                                
                                
                                     material property  | 
                            Dielectric activation energy | 
                                
                                    
                                     | 
                            0 | energy | 
| 
                                dielectricBreakdownEfield
                                
                                
                                     material property  | 
                            Dielectric breakdown efield | 
                                
                                    
                                     | 
                            10000000.0 | electric_potential | 
| 
                                dielectricDelta
                                
                                
                                     material property  | 
                            Dielectric delta | 
                                
                                    
                                     | 
                            0 | number | 
| 
                                dielectricDielectricConstant
                                
                                
                                     material property  | 
                            Dielectric dielectric_constant | 
                                
                                    
                                     | 
                            0 | number | 
| 
                                dielectricRicDoseRateKp
                                
                                
                                     material property  | 
                            Dielectric RIC dose rate kp | 
                                
                                    
                                     | 
                            0 | number | 
| dielectricThickness | Dielectric thickness | 
                                
                                    
                                     | 
                            0.1 | thickness | 
| dielectricTemperature | Dielectric temperature | 
                                
                                    
                                        
                                            min: 0 max: unbounded  | 
                            298 | temperature | 
            
  | 
    
                        
    None
                    
                    
                    
import matplotlib.pyplot as plt
from nom_client.nom_client import NoMClient
def plot_efield(dictat_result):
    dictat_surface_voltage_over_time = dictat_result.get_model_result_by_name(result_name="surface_voltage_timeseries")
    time = dictat_surface_voltage_over_time.get_variable_data(variable_name="time")
    electric_field = dictat_surface_voltage_over_time.get_variable_data(variable_name="electric_field")
    plt.semilogy(time.T, electric_field.T, linewidth=2.0, markersize=12.0, label='Integral')
    plt.title('Electric field', fontsize=18)
    plt.grid(True)
    plt.xlabel("Time (hr)")
    plt.ylabel("Electric field (V/m)")
    plt.show()
nom_client = NoMClient("DICTAT example",
                       default_server_id="local_server",
                       debug_output=False)
sapre_model = nom_client.get_model('sapre')
sapre_model.set_params(orbitType="GEN", perigeeAltitude=600, apogeeAltitude=70000, trajectoryDuration=0.1, trajectoryFlag=1)
sapre_result = nom_client.run_model(sapre_model)
print(sapre_result)
# ---------------------------------------------------------------------------------------------------------
#print("Running DICTAT with single spectrum")
#dictat_model = nom_client.get_model('dictat')
# dictat_model.set_params(params={
#     "exposureDuration": 20,
#     "geometryType": "cylindrical",
#     "shieldMaterial": "Aluminium",
#     "shieldThickness": 0.03,
#     "dielectricMaterial": "Teflon",
#     "dielectricTemperature": 300,
#     "dielectricThickness": 0.5,
#     "numberOfGrounds": 1,
#     "groundType": "inner",
#     "coreMaterial": "Copper",
#     "coreRadius": 0.047,
#     "direction": "isotropic",
#     #"sequence": "NONE",
#     "energies": [4.00E-02, 7.00E-02, 1.00E-01, 2.50E-01, 5.00E-01, 7.50E-01, 1.00E+00, 1.50E+00, 2.00E+00, 2.50E+00,
#                  3.00E+00, 3.50E+00, 4.00E+00, 4.50E+00, 5.00E+00, 5.50E+00, 6.00E+00, 6.50E+00, 7.00E+00, 7.50E+00,
#                  8.00E+00, 8.50E+00, 1.00E+01],
#     "fluxes": [3.71E+07, 2.13E+07, 1.36E+07, 4.11E+06, 1.04E+06, 4.08E+05, 2.07E+05, 6.54E+04, 1.98E+04, 6.46E+03,
#                2.45E+03,
#                1.05E+03, 5.07E+02, 2.74E+02, 1.68E+02, 1.14E+02, 8.11E+01, 5.79E+01, 4.24E+01, 3.16E+01, 2.27E+01,
#                1.56E+01,
#                0.00E+00]
# })
#
# # sresult = nom_client.run_model(dictat_model)
# # print(sresult)
# # plot_efield(dictat_result=sresult)
#
#
# #sys.exit(0)
#
#
# # ---------------------------------------------------------------------------------------------------------
#
# print("Running DICTAT with timeseries spectrum")
#
# flux_timesseries = [
#     [0, 3.71E+07, 2.13E+07, 1.36E+07, 4.11E+06, 1.04E+06, 4.08E+05, 2.07E+05, 6.54E+04, 1.98E+04, 6.46E+03, 2.45E+03,
#      1.05E+03, 5.07E+02, 2.74E+02, 1.68E+02, 1.14E+02, 8.11E+01, 5.79E+01, 4.24E+01, 3.16E+01, 2.27E+01, 1.56E+01,
#      0.00E+00],
#     [12, 3.71E+08, 2.13E+08, 1.36E+08, 4.11E+07, 1.04E+07, 4.08E+06, 2.07E+06, 6.54E+05, 1.98E+05, 6.46E+04, 2.45E+04,
#      1.05E+04, 5.07E+03, 2.74E+03, 1.68E+03, 1.14E+03, 8.11E+02, 5.79E+02, 4.24E+02, 3.16E+02, 2.27E+02, 1.56E+02,
#      0.00E+00],
#     [24, 1.86E+08, 1.07E+08, 6.80E+07, 2.06E+07, 5.20E+06, 2.04E+06, 1.04E+06, 3.27E+05, 9.90E+04, 3.23E+04, 1.23E+04,
#      5.25E+03, 2.54E+03, 1.37E+03, 8.40E+02, 5.70E+02, 4.06E+02, 2.90E+02, 2.12E+02, 1.58E+02, 1.14E+02, 7.80E+01,
#      0.00E+00],
#     [36, 3.71E+06, 2.13E+06, 1.36E+06, 4.11E+05, 1.04E+05, 4.08E+04, 2.07E+04, 6.54E+03, 1.98E+03, 6.46E+02, 2.45E+02,
#      1.05E+02, 5.07E+01, 2.74E+01, 1.68E+01, 1.14E+01, 8.11E+00, 5.79E+00, 4.24E+00, 3.16E+00, 2.27E+00, 1.56E+00,
#      0.00E+00]]
#
# dictat_model = nom_client.get_model('dictat')
# dictat_model.set_params(params={
#     "exposureDuration": 20,
#     "geometryType": "cylindrical",
#     "shieldMaterial": "Aluminium",
#     "shieldThickness": 0.03,
#     "dielectricMaterial": "Teflon",
#     "dielectricTemperature": 300,
#     "dielectricThickness": 0.5,
#     "numberOfGrounds": 1,
#     "groundType": "inner",
#     "coreMaterial": "Copper",
#     "coreRadius": 0.047,
#     "direction": "isotropic",
#     "spectrumDefinition": "user-defined",
#     "energies": [4.00E-02, 7.00E-02, 1.00E-01, 2.50E-01, 5.00E-01, 7.50E-01, 1.00E+00, 1.50E+00, 2.00E+00, 2.50E+00,
#                  3.00E+00, 3.50E+00, 4.00E+00, 4.50E+00, 5.00E+00, 5.50E+00, 6.00E+00, 6.50E+00, 7.00E+00, 7.50E+00,
#                  8.00E+00, 8.50E+00, 1.00E+01],
#     "fluxTimeseries": flux_timesseries
# })
#
# sresult = nom_client.run_model(dictat_model)
# print(sresult)
# plot_efield(dictat_result=sresult)
print("Running Ae8")
ap8ae8_model = nom_client.get_model('ae8ap8')
ap8ae8_model.set_external_input(external_input_name="trajectory", external_input=sapre_result)
ap8ae8_results = nom_client.run_model(ap8ae8_model)
print(ap8ae8_results)
# ---------------------------------------------------------------------------------------------------------
# print("Running DICTAT using orbit average electron spectrum from Ae8")
#
# dictat_model = nom_client.get_model('dictat')
# dictat_model.set_external_input(external_input_name="electronSpectrum", external_input=ap8ae8_results,
#                                 result_name='orbit_averaged_electron_spectrum')
# dictat_model.set_params(params={
#     "geometryType": "cylindrical",
#     "shieldMaterial": "Aluminium",
#     "shieldThickness": 0.03,
#     "dielectricMaterial": "Teflon",
#     "dielectricTemperature": 300,
#     "dielectricThickness": 0.5,
#     "numberOfGrounds": 1,
#     "groundType": "inner",
#     "coreMaterial": "Copper",
#     "coreRadius": 0.047,
#     "direction": "isotropic"
# })
#
# sresult = nom_client.run_model(dictat_model)
# print(sresult)
# plot_efield(dictat_result=sresult)
# ---------------------------------------------------------------------------------------------------------
print("Running DICTAT using orbit electron spectrum from Ae8 (takes a while)")
dictat_model = nom_client.get_model('dictat')
dictat_model.set_external_input(external_input_name="electronSpectrum", external_input=ap8ae8_results['electron_spectrum_over_trajectory'],
                                result_name='electron_spectrum_over_trajectory')
dictat_model.set_params(params={
    "geometryType": "cylindrical",
    "shieldMaterial": "Aluminium",
    "shieldThickness": 0.1,
    "dielectricMaterial": "Teflon",
    "dielectricTemperature": 300,
    "dielectricThickness": 0.1,
    "numberOfGrounds": 1,
    "groundType": "inner",
    "coreMaterial": "Copper",
    "coreRadius": 0.1,
    "direction": "isotropic",
    "spectrumDefinition": "user-defined"
})
sresult = nom_client.run_model(dictat_model)
print(sresult)
plot_efield(dictat_result=sresult)
         
            No references