Main FIDASIM library
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=30), | public | :: | version | = | '' | FIDASIM version number |
|
| integer, | public, | dimension(8) | :: | time_start | Start time |
||
| integer, | public, | parameter | :: | charlim | = | 150 | Defines character limit for files and directories |
| character, | public | :: | namelist_file | Input namelist file |
|||
| integer, | public, | parameter | :: | nbif_type | = | 1 | Identifier for full energy NBI neutral interaction |
| integer, | public, | parameter | :: | nbih_type | = | 2 | Identifier for half energy NBI neutral interaction |
| integer, | public, | parameter | :: | nbit_type | = | 3 | Identifier for third energy NBI neutral interaction |
| integer, | public, | parameter | :: | dcx_type | = | 4 | Identifier for dcx neutral interaction |
| integer, | public, | parameter | :: | halo_type | = | 5 | Identifier for halo neutral interaction |
| integer, | public, | parameter | :: | fida_type | = | 6 | Identifier for fida neutral interaction |
| integer, | public, | parameter | :: | brems_type | = | 7 | Identifier for bremsstrahlung interaction. Acts as dummy type |
| integer, | public, | parameter | :: | ntypes | = | 7 | Number of different types of neutrals |
| real(kind=Float64), | public, | parameter | :: | e_amu | = | 5.48579909070d-4 | Atomic mass of an electron [amu] |
| real(kind=Float64), | public, | parameter | :: | H1_amu | = | 1.007276466879d0 | Atomic mass of Hydrogen-1 (protium) [amu] |
| real(kind=Float64), | public, | parameter | :: | H2_amu | = | 2.013553212745d0 | Atomic mass of Hydrogen-2 (deuterium) [amu] |
| real(kind=Float64), | public, | parameter | :: | H3_amu | = | 3.01550071632d0 | Atomic mass of Hydrogen-3 (tritium) [amu] |
| real(kind=Float64), | public, | parameter | :: | He3_amu | = | 3.01602931914d0 | Atomic mass of Helium-3 [amu] |
| real(kind=Float64), | public, | parameter | :: | B5_amu | = | 10.81d0 | Atomic mass of Boron [amu] |
| real(kind=Float64), | public, | parameter | :: | C6_amu | = | 12.011d0 | Atomic mass of Carbon [amu] |
| real(kind=Float64), | public, | parameter | :: | mass_u | = | 1.660539040d-27 | Atomic mass unit [kg] |
| real(kind=Float64), | public, | parameter | :: | e0 | = | 1.60217733d-19 | Electron charge [C] |
| real(kind=Float64), | public, | parameter | :: | pi | = | 3.14159265358979323846264d0 | Pi |
| real(kind=Float64), | public, | parameter | :: | c0 | = | 2.99792458d+08 | Speed of light [m/s] |
| real(kind=Float64), | public, | parameter | :: | h_planck | = | 4.135667516d-15 | Planck's constant [eV*s] |
| real(kind=Float64), | public, | parameter | :: | v2_to_E_per_amu | = | mass_u/(2.*e0*1.d3)*1.d-4 | to keV conversion factor |
| real(kind=Float64), | public, | parameter | :: | log_10 | = | log(10.d0) | Natural log of 10.0 |
| real(kind=Float64), | public, | parameter | :: | a_0 | = | 5.29177210903d-11 | bohr radius in [m] |
| real(kind=Float64), | public | :: | line_lambda0(3) | = | [0.00000d0, 0.00000d0, 0.00000d0] | H/D/T emission lines [nm] |
|
| integer, | public | :: | n_stark | = | 0 | Number of Stark lines |
|
| real(kind=Float64), | public, | dimension(:), allocatable | :: | stark_wavel | Stark wavelengths [nm*m/V] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | stark_intens | Stark Intensities |
||
| integer, | public, | dimension(:), allocatable | :: | stark_pi | Pi line indicators |
||
| integer, | public, | dimension(:), allocatable | :: | stark_sigma | Sigma line indicators |
||
| integer, | public | :: | initial_state | = | 0 | intial state energy level of transition |
|
| integer, | public | :: | final_state | = | 0 | final state energy level of transition |
|
| integer, | public, | parameter | :: | nlevs | = | 6 | Number of atomic energy levels |
| integer, | public | :: | nbi_outside | = | 0 | Keeps track of how many beam neutrals do not hit the beam_grid |
|
| integer, | public, | parameter | :: | reservoir_size | = | 50 | Size of Neutral Particle Reservoir |
| integer, | public | :: | istart | = | 1 | Starting loop counter (1 if OpenMP, processor number if MPI) |
|
| integer, | public | :: | istep | = | 1 | Loop step size (1 if OpenMP, number of processes if MPI) |
|
| integer, | public, | parameter | :: | max_species | = | 3 | Maximum number of thermal isotopes |
| real(kind=Float64), | public, | parameter | :: | supported_masses(max_species) | = | [H1_amu, H2_amu, H3_amu] | Supported Hydrogen isotopes masses [amu] |
| integer, | public | :: | n_thermal | = | 1 | Number of thermal hydrogen species/isotopes |
|
| real(kind=Float64), | public | :: | thermal_mass(max_species) | = | 0.d0 | Thermal ion species mass [amu] |
|
| real(kind=Float64), | public | :: | thermal_lambda0(max_species) | = | 0.d0 | Reference wavelengths for thermal species/isotopes [nm] |
|
| integer, | public | :: | impurity_charge | = | 1 | Charge of main impurity (boron=5, carbon=6,...) |
|
| real(kind=Float64), | public | :: | impurity_mass | = | 0.d0 | Impurity species mass [amu] |
|
| real(kind=Float64), | public | :: | beam_mass | = | 0.d0 | Beam species mass [amu] |
|
| real(kind=Float64), | public | :: | beam_lambda0 | = | 0.d0 | Reference wavelength for beam species |
|
| type(BeamGrid), | public, | save | :: | beam_grid | Variable containing beam grid definition |
||
| type(InterpolationGrid), | public, | save | :: | inter_grid | Variable containing interpolation grid definition |
||
| type(InterpolationGrid), | public, | save | :: | pass_grid | Variable containing passive neutral grid definition |
||
| type(FastIonDistribution), | public, | save | :: | fbm | Variable containing the fast-ion distribution function |
||
| type(FastIonParticles), | public, | save | :: | particles | Variable containing a MC fast-ion distribution |
||
| type(Equilibrium), | public, | save | :: | equil | Variable containing the plasma parameters and fields |
||
| type(NeutralBeam), | public, | save | :: | nbi | Variable containing the neutral beam geometry and settings |
||
| type(AtomicTables), | public, | save | :: | tables | Variable containing the atomic tables |
||
| type(NPAResults), | public, | save | :: | npa | Variable for storing the calculated active NPA results |
||
| type(NPAResults), | public, | save | :: | pnpa | Variable for storing the calculated passive NPA results |
||
| type(SpectralChords), | public, | save | :: | spec_chords | Variable containing the spectral system definition |
||
| type(NPAChords), | public, | save | :: | npa_chords | Variable containing the NPA system definition |
||
| type(SimulationInputs), | public, | save | :: | inputs | Variable containing the simulation inputs |
||
| type(BirthProfile), | public, | save | :: | birth | Variable for storing the calculated birth profile |
||
| type(Neutrals), | public, | save | :: | neut | Variable for storing the calculated beam density |
||
| type(Spectra), | public, | save | :: | spec | Variable for storing the calculated spectra |
||
| type(NeutronRate), | public, | save | :: | neutron | Variable for storing the neutron rate |
||
| type(CFPDRate), | public, | save | :: | cfpd | Variable for storing the Charged Fusion Product rate |
||
| type(FIDAWeights), | public, | save | :: | fweight | Variable for storing the calculated FIDA weights |
||
| type(NPAWeights), | public, | save | :: | nweight | Variable for storing the calculated NPA weights |
||
| type(CFPDTable), | public, | save | :: | ctable | Variable for storing the calculated Charged Fusion Product orbits |
||
| type(SpatialSpectra), | public, | save | :: | spatres | Variable for storing birth neutral for spatial resolution |
Allows for assigning Profiles,LocalProfiles, EMFields,LocalEMFields,FastIon, NPAParticle, and BirthParticle
Defines how to assign Profiles types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(inout) | :: | p1 | |||
| type(Profiles), | intent(in) | :: | p2 |
Defines how to assign a Profiles type to a LocalProfiles type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(inout) | :: | p1 | |||
| type(Profiles), | intent(in) | :: | p2 |
Defines how to assign a LocalProfiles type to a Profiles type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(inout) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to assign LocalProfiles types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(inout) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to assign EMFields types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(inout) | :: | p1 | |||
| type(EMFields), | intent(in) | :: | p2 |
Defines how to assign a EMFields type to a LocalEMFields type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(inout) | :: | p1 | |||
| type(EMFields), | intent(in) | :: | p2 |
Defines how to assign a LocalEMFields type to a EMFields type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(inout) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Defines how to assign LocalEMFields types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(inout) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Defines how to assign FastIon types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(FastIon), | intent(out) | :: | p1 | |||
| type(FastIon), | intent(in) | :: | p2 |
Defines how to assign NPAParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NPAParticle), | intent(out) | :: | p1 | |||
| type(NPAParticle), | intent(in) | :: | p2 |
Defines how to assign BirthParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(BirthParticle), | intent(out) | :: | p1 | |||
| type(BirthParticle), | intent(in) | :: | p2 |
Defines how to assign NeutralParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticle), | intent(out) | :: | p1 | |||
| type(NeutralParticle), | intent(in) | :: | p2 |
Defines how to assign NeutralParticleReservoir to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | r1 | |||
| type(NeutralParticleReservoir), | intent(in) | :: | r2 |
Defines how to assign NeutralPopulation to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | n1 | |||
| type(NeutralPopulation), | intent(in) | :: | n2 |
Defines how to assign CFPDTable types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(CFPDTable), | intent(out) | :: | p1 | |||
| type(CFPDTable), | intent(in) | :: | p2 |
Allows for adding Profiles,LocalProfiles, EMFields, and LocalEMFields
Defines how to add two Profiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(in) | :: | p1 | |||
| type(Profiles), | intent(in) | :: | p2 |
Defines how to add two LocalProfiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to add two EMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(in) | :: | p1 | |||
| type(EMFields), | intent(in) | :: | p2 |
Defines how to add two LocalEMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Allows for subtracting Profiles,LocalProfiles, EMFields, and LocalEMFields
Defines how to subtract two Profiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(in) | :: | p1 | |||
| type(Profiles), | intent(in) | :: | p2 |
Defines how to subtract two LocalProfiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to subtract two EMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(in) | :: | p1 | |||
| type(EMFields), | intent(in) | :: | p2 |
Defines how to subtract two LocalEMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Allows for multiplying Profiles,LocalProfiles, EMFields, and LocalEMFields by scalars
Defines how to multiply Profiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(Profiles), | intent(in) | :: | p1 |
Defines how to multiply Profiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(LocalProfiles), | intent(in) | :: | p1 |
Defines how to multiply EMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(EMFields), | intent(in) | :: | p1 |
Defines how to multiply EMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(LocalEMFields), | intent(in) | :: | p1 |
Allows for dividing Profiles,LocalProfiles, EMFields, and LocalEMFields by scalars
Defines how to divide Profiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to divide LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to divide EMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to divide LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines a 3D grid for neutral beam calculations
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | nx | Number of cells in the x direction |
|||
| integer(kind=Int32), | public | :: | ny | Number of cells in the y direction |
|||
| integer(kind=Int32), | public | :: | nz | Number of cells in the z direction |
|||
| real(kind=Float64), | public | :: | xmin | Minimum x value |
|||
| real(kind=Float64), | public | :: | xmax | Maximum x value |
|||
| real(kind=Float64), | public | :: | ymin | Minimum y value |
|||
| real(kind=Float64), | public | :: | ymax | Maximum y value |
|||
| real(kind=Float64), | public | :: | zmin | Minimum z value |
|||
| real(kind=Float64), | public | :: | zmax | Maximum z value |
|||
| real(kind=Float64), | public | :: | alpha | Tait-Bryan angle for a rotation about z [radians] |
|||
| real(kind=Float64), | public | :: | beta | Tait-Bryan angle for a rotation about y' [radians] |
|||
| real(kind=Float64), | public | :: | gamma | Tait-Bryan angle for a rotation about x" [radians] |
|||
| real(kind=Float64), | public | :: | drmin | Minimum cell spacing: |
|||
| real(kind=Float64), | public | :: | dv | Cell volume [] |
|||
| real(kind=Float64), | public | :: | volume | Grid volume [] |
|||
| integer(kind=Int32), | public | :: | ntrack | Maximum number of cell for particle tracking |
|||
| integer(kind=Int32), | public | :: | ngrid | Number of cells |
|||
| integer(kind=Int32), | public, | dimension(3) | :: | dims | Dimensions of beam grid |
||
| real(kind=Float64), | public, | dimension(3) | :: | origin | Origin of beam grid in machine coordinates |
||
| real(kind=Float64), | public, | dimension(3) | :: | center | Center of beam grid in beam coordinates |
||
| real(kind=Float64), | public, | dimension(3) | :: | dr | Cell spacings [dx, dy, dz] |
||
| real(kind=Float64), | public, | dimension(3) | :: | lwh | Grid [length(x), width(y), height(z)] |
||
| real(kind=Float64), | public, | dimension(3,3) | :: | basis | Beam grid basis for converting from beam coordinates(xyz) to machine coordinates(uvw): (\uvw = B*xyz + origin) |
||
| real(kind=Float64), | public, | dimension(3,3) | :: | inv_basis | Inverse basis for reverse transformation: (\xyz = B^{-1}*(uvw - origin)) |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | xc | x positions of cell centers |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | yc | y positions of cell centers |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | zc | z positions of cell centers |
Defines a 3D R-Z-phi grid for interpolating plasma parameters and fields
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | nr | Number of Radii |
|||
| integer(kind=Int32), | public | :: | nz | Number of Z values |
|||
| integer(kind=Int32), | public | :: | nphi | Number of phi values |
|||
| real(kind=Float64), | public | :: | dr | Radial spacing [cm] |
|||
| real(kind=Float64), | public | :: | dz | Vertical spacing [cm] |
|||
| real(kind=Float64), | public | :: | dphi | Angular spacing [rad] |
|||
| real(kind=Float64), | public | :: | da | Grid element area [] |
|||
| real(kind=Float64), | public | :: | dv | drdzdphi [] |
|||
| integer(kind=Int32), | public | :: | dims(3) | Dimension of the interpolation grid |
|||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | r | Radii values [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | z | Z values [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | phi | Angular values [rad] |
||
| integer(kind=Int32), | public | :: | ntrack | Maximum number of cells for particle tracking |
|||
| integer(kind=Int32), | public | :: | ngrid | Number of cells |
Torodial symmetric plasma parameters at a given R-Z
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | dene | = | 0.d0 | Electron density [] |
|
| real(kind=Float64), | public | :: | deni(max_species) | = | 0.d0 | Ion density [] |
|
| real(kind=Float64), | public | :: | denimp | = | 0.d0 | Impurity density [] |
|
| real(kind=Float64), | public | :: | denf | = | 0.d0 | Fast-ion density [] |
|
| real(kind=Float64), | public | :: | te | = | 0.d0 | Electron temperature [kev] |
|
| real(kind=Float64), | public | :: | ti | = | 0.d0 | Ion temperature [kev] |
|
| real(kind=Float64), | public | :: | zeff | = | 0.d0 | Effective Nuclear Charge |
|
| real(kind=Float64), | public | :: | vr | = | 0.d0 | Plasma rotation in radial direction |
|
| real(kind=Float64), | public | :: | vt | = | 0.d0 | Plasma rotation in torodial/phi direction |
|
| real(kind=Float64), | public | :: | vz | = | 0.d0 | Plasma rotation in z direction |
|
| real(kind=Float64), | public | :: | denn(nlevs,max_species) | = | 0.d0 | Cold neutral densities [] |
Plasma parameters at given position
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | dene | = | 0.d0 | Electron density [] |
|
| real(kind=Float64), | public | :: | deni(max_species) | = | 0.d0 | Ion density [] |
|
| real(kind=Float64), | public | :: | denimp | = | 0.d0 | Impurity density [] |
|
| real(kind=Float64), | public | :: | denf | = | 0.d0 | Fast-ion density [] |
|
| real(kind=Float64), | public | :: | te | = | 0.d0 | Electron temperature [kev] |
|
| real(kind=Float64), | public | :: | ti | = | 0.d0 | Ion temperature [kev] |
|
| real(kind=Float64), | public | :: | zeff | = | 0.d0 | Effective Nuclear Charge |
|
| real(kind=Float64), | public | :: | vr | = | 0.d0 | Plasma rotation in radial direction |
|
| real(kind=Float64), | public | :: | vt | = | 0.d0 | Plasma rotation in torodial/phi direction |
|
| real(kind=Float64), | public | :: | vz | = | 0.d0 | Plasma rotation in z direction |
|
| real(kind=Float64), | public | :: | denn(nlevs,max_species) | = | 0.d0 | Cold neutral densities [] |
|
| logical, | public | :: | in_plasma | = | .False. | Indicates whether plasma parameters are valid/known |
|
| integer, | public | :: | coords | = | 0 | Indicates coordinate system of vectors. Beam grid (0), machine (1) and cylindrical (2) |
|
| real(kind=Float64), | public, | dimension(3) | :: | pos | = | 0.d0 | Position in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | uvw | = | 0.d0 | Position in machine coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | vrot | = | 0.d0 | Plasma rotation in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | vrot_uvw | = | 0.d0 | Plasma rotation in machine coordinates |
| type(InterpolCoeffs3D), | public | :: | b | Cylindrical Interpolation Coefficients and indicies for interpolation at |
Torodial symmetric electro-magnetic fields at given R-Z
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | br | = | 0.d0 | Radial magnetic field [T] |
|
| real(kind=Float64), | public | :: | bt | = | 0.d0 | Torodial magnetic field [T] |
|
| real(kind=Float64), | public | :: | bz | = | 0.d0 | Vertical magnetic field [T] |
|
| real(kind=Float64), | public | :: | er | = | 0.d0 | Radial electric field [V/m] |
|
| real(kind=Float64), | public | :: | et | = | 0.d0 | Torodial electric field [V/m] |
|
| real(kind=Float64), | public | :: | ez | = | 0.d0 | Vertical electric field [V/m] |
|
| real(kind=Float64), | public | :: | dbr_dr | = | 0.d0 | Radial derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbr_dphi | = | 0.d0 | Angular derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbr_dz | = | 0.d0 | Vertical derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dr | = | 0.d0 | Radial derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dphi | = | 0.d0 | Angular derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dz | = | 0.d0 | Vertical derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dr | = | 0.d0 | Radial derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dphi | = | 0.d0 | Angular derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dz | = | 0.d0 | Vertical derivative of the vertical magnetic field [T/m] |
Electro-magnetic fields at given position
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | br | = | 0.d0 | Radial magnetic field [T] |
|
| real(kind=Float64), | public | :: | bt | = | 0.d0 | Torodial magnetic field [T] |
|
| real(kind=Float64), | public | :: | bz | = | 0.d0 | Vertical magnetic field [T] |
|
| real(kind=Float64), | public | :: | er | = | 0.d0 | Radial electric field [V/m] |
|
| real(kind=Float64), | public | :: | et | = | 0.d0 | Torodial electric field [V/m] |
|
| real(kind=Float64), | public | :: | ez | = | 0.d0 | Vertical electric field [V/m] |
|
| real(kind=Float64), | public | :: | dbr_dr | = | 0.d0 | Radial derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbr_dphi | = | 0.d0 | Angular derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbr_dz | = | 0.d0 | Vertical derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dr | = | 0.d0 | Radial derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dphi | = | 0.d0 | Angular derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbt_dz | = | 0.d0 | Vertical derivative of the torodial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dr | = | 0.d0 | Radial derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dphi | = | 0.d0 | Angular derivative of the radial magnetic field [T/m] |
|
| real(kind=Float64), | public | :: | dbz_dz | = | 0.d0 | Vertical derivative of the vertical magnetic field [T/m] |
|
| logical, | public | :: | in_plasma | = | .False. | Indicates whether fields are valid/known |
|
| integer, | public | :: | coords | = | 0 | Indicates coordinate system of vectors. Beam grid (0), machine (1) and cylindrical (2) |
|
| real(kind=Float64), | public | :: | b_abs | = | 0.d0 | Magnitude of magnetic field |
|
| real(kind=Float64), | public | :: | e_abs | = | 0.d0 | Magnitude of electrin field |
|
| real(kind=Float64), | public, | dimension(3) | :: | pos | = | 0.d0 | Position in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | uvw | = | 0.d0 | Position in machine coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | b_norm | = | 0.d0 | Direction of magnetic field in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | a_norm | = | 0.d0 | Vector perpendicular to |
| real(kind=Float64), | public, | dimension(3) | :: | c_norm | = | 0.d0 | Vector perpendicular to |
| real(kind=Float64), | public, | dimension(3) | :: | e_norm | = | 0.d0 | Direction of electric field in beam grid coordinates |
| type(InterpolCoeffs3D), | public | :: | b | Cylindrical Interpolation Coefficients and indicies for interpolation at |
MHD Equilbrium
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(EMFields), | public, | dimension(:,:,:), allocatable | :: | fields | Electro-magnetic fields at points defined in inter_grid |
||
| type(Profiles), | public, | dimension(:,:,:), allocatable | :: | plasma | Plasma parameters at points defined in inter_grid |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | mask | Indicates whether fields and plasma are well-defined at points defined in inter_grid |
Defines a Guiding Center Fast-ion Distribution Function: F(E,p,R,Z,Phi)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | A | = | H2_amu | Atomic Mass |
|
| integer(kind=Int32), | public | :: | nenergy | Number of energies |
|||
| integer(kind=Int32), | public | :: | npitch | Number of pitches |
|||
| integer(kind=Int32), | public | :: | nr | Number of radii |
|||
| integer(kind=Int32), | public | :: | nz | Number of z values |
|||
| integer(kind=Int32), | public | :: | nphi | Number of phi values |
|||
| real(kind=Float64), | public | :: | dE | Energy spacing [keV] |
|||
| real(kind=Float64), | public | :: | dp | Pitch spacing |
|||
| real(kind=Float64), | public | :: | dr | Radial spacing [cm] |
|||
| real(kind=Float64), | public | :: | dz | Z spacing [cm] |
|||
| real(kind=Float64), | public | :: | dphi | Angular spacing [rad] |
|||
| real(kind=Float64), | public | :: | emin | Minimum energy [keV] |
|||
| real(kind=Float64), | public | :: | emax | Maximum energy [keV] |
|||
| real(kind=Float64), | public | :: | e_range | Energy interval length [keV] |
|||
| real(kind=Float64), | public | :: | pmin | Minimum pitch |
|||
| real(kind=Float64), | public | :: | pmax | Maximum pitch |
|||
| real(kind=Float64), | public | :: | p_range | Pitch interval length |
|||
| real(kind=Float64), | public | :: | rmin | Minimum radius [cm] |
|||
| real(kind=Float64), | public | :: | rmax | Maximum radius [cm] |
|||
| real(kind=Float64), | public | :: | r_range | Radius interval length [cm] |
|||
| real(kind=Float64), | public | :: | zmin | Minimum Z [cm] |
|||
| real(kind=Float64), | public | :: | zmax | Maximum Z [cm] |
|||
| real(kind=Float64), | public | :: | z_range | Z interval length [cm] |
|||
| real(kind=Float64), | public | :: | phimin | Minimum Phi [rad] |
|||
| real(kind=Float64), | public | :: | phimax | Maximum Phi [rad] |
|||
| real(kind=Float64), | public | :: | phi_range | Phi interval length [rad] |
|||
| real(kind=Float64), | public | :: | n_tot | = | 0.d0 | Total Number of fast-ions |
|
| real(kind=Float64), | public, | dimension(:), allocatable | :: | energy | Energy values [keV] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | pitch | Pitch w.r.t. the magnetic field |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | r | Radius [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | z | Z [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | phi | Angles [rad] |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | denf | Fast-ion density defined on the inter_grid: denf(R,Z,Phi) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | f | Fast-ion distribution function defined on the inter_grid: F(E,p,R,Z,Phi) |
Defines a fast-ion
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | A | = | H2_amu | Fast-ion atomic mass |
|
| logical, | public | :: | beam_grid_cross_grid | = | .False. | Indicates whether the fast-ion crosses the beam_grid |
|
| real(kind=Float64), | public | :: | r | = | 0.d0 | Radial position of fast-ion [cm] |
|
| real(kind=Float64), | public | :: | phi | = | 0.d0 | Angular position of fast-ion [rad] |
|
| real(kind=Float64), | public | :: | z | = | 0.d0 | Vertical position of fast-ion [cm] |
|
| real(kind=Float64), | public | :: | beam_grid_phi_enter | = | 0.d0 | Torodial/phi position where fast-ion enters the beam_grid [radians] |
|
| real(kind=Float64), | public | :: | delta_phi | = | 2*pi | Angle subtended by the beam_grid at (r,z) |
|
| real(kind=Float64), | public | :: | energy | = | 0.d0 | Energy [keV] |
|
| real(kind=Float64), | public | :: | pitch | = | 0.d0 | Pitch w.r.t. the magnetic field |
|
| real(kind=Float64), | public | :: | vabs | = | 0.d0 | Speed [cm/s] |
|
| real(kind=Float64), | public | :: | vr | = | 0.d0 | Radial velocity [cm/s] |
|
| real(kind=Float64), | public | :: | vt | = | 0.d0 | Torodial velocity [cm/s] |
|
| real(kind=Float64), | public | :: | vz | = | 0.d0 | Z velocity [cm/s] |
|
| real(kind=Float64), | public | :: | weight | = | 0.d0 | Particle weight: How many fast-ions does particle represent. |
|
| integer(kind=Int32), | public | :: | class | = | 0 | Orbit class id |
Collection of fast-ion particles
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | nparticle | = | 0 | Number of particles |
|
| integer(kind=Int32), | public | :: | nclass | = | 1 | Number of orbit classes |
|
| logical, | public | :: | axisym | = | .True. | Indicates whether distribution function is axisymmetric |
|
| type(FastIon), | public, | dimension(:), allocatable | :: | fast_ion | Fast-ion particles |
Defines a neutral beam with +x defined to be into the plasma
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=25), | public | :: | name | = | '' | Beam name |
|
| integer, | public | :: | shape | Beam source shape 1="rectangular", 2="circular" |
|||
| real(kind=Float64), | public | :: | widy | Half width of source in y direction |
|||
| real(kind=Float64), | public | :: | widz | Half height of source in z direction |
|||
| real(kind=Float64), | public | :: | focy | Focal length in y direction |
|||
| real(kind=Float64), | public | :: | focz | Focal length in z direction |
|||
| real(kind=Float64), | public | :: | einj | NBI voltage [kV] |
|||
| real(kind=Float64), | public | :: | pinj | NBI power [MW] |
|||
| real(kind=Float64), | public | :: | vinj | NBI velocity [cm/s] |
|||
| real(kind=Float64), | public | :: | alpha | Z rotation not same as beam_grid alpha |
|||
| real(kind=Float64), | public | :: | beta | Tilt rotation not same as beam_grid beta |
|||
| real(kind=Float64), | public, | dimension(3) | :: | divy | Energy dependent divergence in y direction |
||
| real(kind=Float64), | public, | dimension(3) | :: | divz | Energy dependent divergence in z direction |
||
| real(kind=Float64), | public, | dimension(3) | :: | current_fractions | Fractions of full, half, and third energy neutrals |
||
| real(kind=Float64), | public, | dimension(3) | :: | src | Position of source in beam grid coordinates [cm] |
||
| real(kind=Float64), | public, | dimension(3) | :: | axis | Beam centerline |
||
| integer, | public | :: | naperture | Number of beam apertures |
|||
| integer, | public, | dimension(:), allocatable | :: | ashape | Aperture shape 1="rectangular", 2="circular" |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | awidy | Half width of the aperture(s) in y direction |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | awidz | Half height of the aperture(s) in z direction |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | aoffy | Horizontal (y) offset of the aperture(s) relative to the beam centerline [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | aoffz | Vertical (z) offset of the aperture(s) relative to the beam centerline [cm] |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | adist | Distance from the center of the beam source grid to the aperture(s) plane [cm] |
||
| real(kind=Float64), | public, | dimension(3,3) | :: | basis | Beam basis for converting from centerline coordinates to beam grid coordinates |
||
| real(kind=Float64), | public, | dimension(3,3) | :: | inv_basis | Inverse basis for reverse transfomation |
Defines a n/m-resolved atomic cross section table
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nenergy | = | 1 | Number of beam energies |
|
| real(kind=Float64), | public | :: | logemin | = | 0.d0 | Log-10 minimum energy |
|
| real(kind=Float64), | public | :: | logemax | = | 0.d0 | Log-10 maximum energy |
|
| integer, | public | :: | n_max | = | nlevs | Number of initial atomic energy levels |
|
| integer, | public | :: | m_max | = | nlevs | Number of final atomic energy levels |
|
| real(kind=Float64), | public | :: | dlogE | = | 0.d0 | Log-10 energy spacing |
|
| real(kind=Float64), | public | :: | minlog_cross | Log-10 minimum cross section |
|||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | log_cross | Log-10 cross sections |
Defines a n/m-resolved atomic cross section table
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nenergy | = | 1 | Number of beam energies/amu |
|
| real(kind=Float64), | public | :: | logemin | = | 0.d0 | Log-10 minimum energy/amu |
|
| real(kind=Float64), | public | :: | logemax | = | 0.d0 | Log-10 maximum energy/amu |
|
| integer, | public | :: | ntemp | = | 1 | Number of target temperatures |
|
| real(kind=Float64), | public | :: | logtmin | = | 0.d0 | Log-10 minimum temperature |
|
| real(kind=Float64), | public | :: | logtmax | = | 0.d0 | Log-10 maximum temperature |
|
| integer, | public | :: | n_max | = | nlevs | Number of initial atomic energy levels |
|
| integer, | public | :: | m_max | = | nlevs | Number of final atomic energy levels |
|
| real(kind=Float64), | public | :: | dlogE | = | 0.d0 | Log-10 energy spacing |
|
| real(kind=Float64), | public | :: | dlogT | = | 0.d0 | Log-10 temperature spacing |
|
| real(kind=Float64), | public | :: | minlog_rate | = | 0.d0 | Log-10 minimum reaction rate |
|
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | log_rate | Log-10 beam-target rates |
Defines an atomic table for populating and de-populating reaction rates
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nenergy | = | 1 | Number of beam energies/amu |
|
| real(kind=Float64), | public | :: | logemin | = | 0.d0 | Log-10 minimum energy/amu |
|
| real(kind=Float64), | public | :: | logemax | = | 0.d0 | Log-10 maximum energy/amu |
|
| integer, | public | :: | ntemp | = | 1 | Number of target temperatures |
|
| real(kind=Float64), | public | :: | logtmin | = | 0.d0 | Log-10 minimum temperature |
|
| real(kind=Float64), | public | :: | logtmax | = | 0.d0 | Log-10 maximum temperature |
|
| integer, | public | :: | n_max | = | nlevs | Number of initial atomic energy levels |
|
| integer, | public | :: | m_max | = | nlevs | Number of final atomic energy levels |
|
| real(kind=Float64), | public | :: | dlogE | = | 0.d0 | Log-10 energy spacing |
|
| real(kind=Float64), | public | :: | dlogT | = | 0.d0 | Log-10 temperature spacing |
|
| real(kind=Float64), | public | :: | minlog_pop | = | 0.d0 | Log-10 minimum reaction rates for populating transistions |
|
| real(kind=Float64), | public | :: | minlog_depop | = | 0.d0 | Log-10 minimum reaction rates for de-populating transistions |
|
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | log_pop | Log-10 reaction rates for populating transistions |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | log_depop | Log-10 reaction rates for de-populating transistions |
Nuclear reaction rates
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nbranch | = | 1 | Number of reaction branches |
|
| integer, | public | :: | nenergy | = | 1 | Number of beam energies |
|
| real(kind=Float64), | public | :: | logemin | = | 0.d0 | Log-10 minimum energy |
|
| real(kind=Float64), | public | :: | logemax | = | 0.d0 | Log-10 maximum energy |
|
| integer, | public | :: | ntemp | = | 1 | Number of target temperatures |
|
| real(kind=Float64), | public | :: | logtmin | = | 0.d0 | Log-10 minimum temperature |
|
| real(kind=Float64), | public | :: | logtmax | = | 0.d0 | Log-10 maximum temperature |
|
| real(kind=Float64), | public | :: | dlogE | = | 0.d0 | Log-10 energy spacing |
|
| real(kind=Float64), | public | :: | dlogT | = | 0.d0 | Log-10 temperature spacing |
|
| real(kind=Float64), | public | :: | minlog_rate | = | 0.d0 | Log-10 minimum reaction rate |
|
| real(kind=Float64), | public, | dimension(2) | :: | bt_amu | = | 0.d0 | Isotope mass of beam and thermal ions respectively [amu] |
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | log_rate | Log-10 reaction rates: log_rate(energy, temperature, branch) |
Atomic tables for various types of interactions
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(AtomicCrossSection), | public | :: | H_H_cx_cross | Hydrogen-Hydrogen charge exchange n/m-resolved cross sections |
|||
| type(AtomicRates), | public | :: | H_H_cx_rate | Hydrogen-Hydrogen charge exchange n/m-resolved beam-target rates |
|||
| type(AtomicTransitions), | public | :: | H_H | Hydrogen-Hydrogen atomic transitions |
|||
| type(AtomicTransitions), | public | :: | H_e | Hydrogen-Electron atomic transitions |
|||
| type(AtomicTransitions), | public | :: | H_Aq | Hydrogen-Impurity atomic transitions |
|||
| real(kind=Float64), | public, | dimension(nlevs,nlevs) | :: | einstein | Einstein coefficients for spontaneous emission |
||
| type(NuclearRates), | public | :: | D_D | Deuterium-Deuterium reaction rates |
Defines a line of sight
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | sigma_pi | = | 1.d0 | Ratio of sigma to pi line intensity |
|
| real(kind=Float64), | public | :: | spot_size | = | 0.d0 | Radius of spot size [cm] |
|
| real(kind=Float64), | public, | dimension(3) | :: | lens | = | 0.d0 | Lens location in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | axis | = | 0.d0 | Optical axis in beam grid coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | lens_uvw | = | 0.d0 | Lens location in machine coordinates |
| real(kind=Float64), | public, | dimension(3) | :: | axis_uvw | = | 0.d0 | Optical axis in machine coordinates |
Defines a element of a line of sight and cell intersection
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | id | Line of sight index |
|||
| real(kind=Float64), | public | :: | length | Length of crossing |
Defines the channels that intersect a cell
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nchan | = | 0 | Number of channels that intersect |
|
| type(LOSElement), | public, | dimension(:), allocatable | :: | los_elem | Array of crossing |
Defines an spectral diagnostic system
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nchan | = | 0 | Number of channels |
|
| integer, | public | :: | ncell | = | 0 | Number of beam_grid cells with intersections |
|
| integer, | public | :: | cyl_ncell | = | 0 | Number of pass_grid cells with intersections |
|
| type(LineOfSight), | public, | dimension(:), allocatable | :: | los | Line of sight array |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | radius | Radius of each line of sight |
||
| type(LOSInters), | public, | dimension(:,:,:), allocatable | :: | inter | Array of LOS intersections with beam_grid |
||
| type(LOSInters), | public, | dimension(:,:,:), allocatable | :: | cyl_inter | Array of LOS intersections with pass_grid |
||
| integer, | public, | dimension(:), allocatable | :: | cell | Linear indices of beam_grid that have intersections |
||
| integer, | public, | dimension(:), allocatable | :: | cyl_cell | Linear indices of pass_grid that have intersections |
Defines a plane with a circular or rectangular boundary
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | shape | = | 0 | Boundary shape 1="Rectangular", 2="circular" |
|
| real(kind=Float64), | public | :: | hh | = | 0.d0 | Half height of boundary [cm] |
|
| real(kind=Float64), | public | :: | hw | = | 0.d0 | Half width of boundary [cm] |
|
| real(kind=Float64), | public, | dimension(3) | :: | origin | = | 0.d0 | Origin of plane in machine coordinates |
| real(kind=Float64), | public, | dimension(3,3) | :: | basis | = | 0.d0 | Basis vectors basis(:,1) = u_1 is plane normal |
| real(kind=Float64), | public, | dimension(3,3) | :: | inv_basis | = | 0.d0 | Inverse basis |
Defines a NPA detector
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(BoundedPlane), | public | :: | detector | Detecting plane of NPA detector |
|||
| type(BoundedPlane), | public | :: | aperture | Aperture plane of NPA detector |
Type to contain the probability of hitting a NPA detector
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | p | = | 0.d0 | Hit probability |
|
| real(kind=Float64), | public | :: | pitch | = | -2.d0 | Pitch |
|
| real(kind=Float64), | public, | dimension(3) | :: | eff_rd | = | 0.d0 | Effective position of detector |
| real(kind=Float64), | public, | dimension(3) | :: | dir | = | 0.d0 | Trajectory direction |
Defines a NPA system
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nchan | = | 0 | Number of channels |
|
| type(NPADetector), | public, | dimension(:), allocatable | :: | det | NPA detector array |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | radius | Radius [cm] |
||
| logical, | public, | dimension(:,:,:), allocatable | :: | hit | Indicates whether a particle can hit any NPA detector from a grid cell: hit(x,y,z) |
||
| type(NPAProbability), | public, | dimension(:,:,:,:), allocatable | :: | phit | Probability of hitting a detector from a grid cell: phit(x,y,z,chan) |
Defines a NPA particle
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | detector | = | 0 | Detector NPA particle hit |
|
| integer(kind=Int32), | public | :: | class | = | 0 | Orbit class id |
|
| real(kind=Float64), | public | :: | A | Atomic Mass |
|||
| real(kind=Float64), | public | :: | xi | = | 0.d0 | Initial x position |
|
| real(kind=Float64), | public | :: | yi | = | 0.d0 | Initial y position |
|
| real(kind=Float64), | public | :: | zi | = | 0.d0 | Initial z position |
|
| real(kind=Float64), | public | :: | xf | = | 0.d0 | Final x position |
|
| real(kind=Float64), | public | :: | yf | = | 0.d0 | Final y position |
|
| real(kind=Float64), | public | :: | zf | = | 0.d0 | Final z position |
|
| real(kind=Float64), | public | :: | weight | = | 0.d0 | NPA particle weight |
|
| real(kind=Float64), | public | :: | energy | = | 0.d0 | Birth Energy [keV] |
|
| real(kind=Float64), | public | :: | pitch | = | 0.d0 | Birth Pitch |
MC NPA result structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | nchan | = | 0 | Number of NPA channels |
|
| integer(kind=Int32), | public | :: | npart | = | 0 | Number of particles that hit a detector |
|
| integer(kind=Int32), | public | :: | nmax | = | 1000000 | Maximum allowed number of particles grows if necessary |
|
| integer(kind=Int32), | public | :: | nenergy | = | 122 | Number of energy values |
|
| type(NPAParticle), | public, | dimension(:), allocatable | :: | part | Array of NPA particles |
||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | energy | Energy array [keV] |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | flux | Neutral particle flux: flux(energy,chan, orbit_type) [neutrals/(s*dE)] |
Defines a Birth particle
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | neut_type | = | 0 | Birth type (1=Full, 2=Half, 3=Third) |
|
| integer(kind=Int32), | public, | dimension(3) | :: | ind | = | 0 | Initial beam_grid indices |
| real(kind=Float64), | public, | dimension(3) | :: | ri | = | 0.d0 | Initial position in beam grid coordinates [cm] |
| real(kind=Float64), | public, | dimension(3) | :: | vi | = | 0.d0 | Initial velocity in beam grid coordinates [cm/s] |
| real(kind=Float64), | public, | dimension(3) | :: | ri_gc | = | 0.d0 | Initial guiding-center position in beam grid coordinates [cm] |
| real(kind=Float64), | public | :: | weight | = | 0.d0 | NPA particle weight [fast-ions/s] |
|
| real(kind=Float64), | public | :: | energy | = | 0.d0 | Birth Energy [keV] |
|
| real(kind=Float64), | public | :: | pitch | = | 0.d0 | Birth Pitch w.r.t. the magnetic field |
Birth profile structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | cnt | = | 1 | Particle counter |
|
| type(BirthParticle), | public, | dimension(:), allocatable | :: | part | Array of birth particles |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | dens | Birth density: dens(neutral_type,x,y,z) [fast-ions/(s*cm^3)] |
Spectra storage structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:,:), allocatable | :: | brems | Bremsstruhlung: brems(lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | full | Full energy beam emission stark components: full(n_stark,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | half | Half energy beam emission stark components: half(n_stark,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | third | Third energy beam emission stark components: thirdstokes(n_stark,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | fullstokes | Full energy beam emission stark components: fullstokes(n_stark,4,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | halfstokes | Half energy beam emission stark components: halfstokes(n_stark,4,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | thirdstokes | Third energy beam emission stark components: thirdstokes(n_stark,4,lambda,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | dcx | Direct CX emission stark components: dcx(n_stark,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | dcxstokes | Direct CX emission stark components: dcxstokes(n_stark,4,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | halo | Thermal halo emission stark components: halo(n_stark,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | halostokes | Thermal halo emission stark components: halo(n_stark,4,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | cold | Cold D-alpha emission stark components: cold(n_stark,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | coldstokes | Cold D-alpha emission stark components: coldstokes(n_stark,4,lambda,chan,species) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | fida | Active FIDA emission stark components: fida(n_stark,lambda,chan,orbit_type) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | fidastokes | Active FIDA emission stark components: fidastokes(n_stark,4,lambda,chan,orbit_type) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | pfida | Passive FIDA emission stark components: pfida(n_stark,lambda,chan,orbit_type) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | pfidastokes | Passive FIDA emission stark components: pfidastokes(n_stark,4,lambda,chan,orbit_type) |
Neutron storage structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:), allocatable | :: | rate | Neutron rate: rate(orbit_type) [neutrons/sec] |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | weight | Neutron rate weight: weight(E,p,R,Z,Phi) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | emis | Neutron emissivity: emis(R,Z,Phi) |
Charged Fusion Product (CFPD) storage structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | weight | CFPD rate weight: weight(Ep,Ch,E,p) |
||
| real(kind=Float64), | public, | dimension(:,:), allocatable | :: | flux | CFPD flux: flux(E3,chan) [kHz] |
||
| real(kind=Float64), | public, | dimension(:,:), allocatable | :: | prob | CFPD flux: probability_gyro(E3,chan) [unity] |
||
| real(kind=Float64), | public, | dimension(:,:), allocatable | :: | gam | CFPD flux: gyro(E3,chan) [rad] |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | w | = | 1.d0 | Neutral particle weight |
|
| real(kind=Float64), | public, | dimension(3) | :: | v | = | 0.d0 | Neutral particle position/velocity |
Neutral Particle Reservoir
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | n | = | 0 | Number of neutral particles seen by the reservoir |
|
| integer(kind=Int32), | public | :: | i | = | 0 | Number of the next particle that will be stored in the reservoir |
|
| integer(kind=Int32), | public | :: | k | = | 0 | Size of the reservoir |
|
| real(kind=Float64), | public | :: | W | = | 0.d0 | Sampling weight |
|
| type(NeutralParticle), | public, | dimension(reservoir_size) | :: | R | Neutral Particle Reservoir |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | dens | Neutral density: dens(lev,x,y,z) |
||
| type(NeutralParticleReservoir), | public, | dimension(:,:,:), allocatable | :: | res | Neutral particle reservoir |
Neutral density structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(NeutralPopulation), | public | :: | full | Full energy neutral population |
|||
| type(NeutralPopulation), | public | :: | half | Half energy neutral population |
|||
| type(NeutralPopulation), | public | :: | third | Third energy neutral population |
|||
| type(NeutralPopulation), | public | :: | dcx | DCX neutral population |
|||
| type(NeutralPopulation), | public | :: | halo | Halo neutral population |
Spatial Storage of photon neutral birth
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | public, | dimension(:), allocatable | :: | dcx | |||
| type(NeutralParticleReservoir), | public, | dimension(:), allocatable | :: | halo | |||
| type(NeutralParticleReservoir), | public, | dimension(:), allocatable | :: | fida | |||
| type(NeutralParticleReservoir), | public, | dimension(:), allocatable | :: | pfida |
FIDA weights structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | mean_f | Estimate of mean fast-ion distribution function "seen" by LOS: mean_f(E,p,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | weight | FIDA weight function: weight(lambda,E,p,chan) |
NPA weights structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | attenuation | Attenuation fraction: attenuation(E,x,y,z,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | cx | Charge Exchange reaction rates: cx(E,x,y,z,chan) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:), allocatable | :: | emissivity | Emissivity: emissivity(x,y,z,chan) [neutrals/(s*dV)] |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | weight | NPA weight function: weight(E,p,chan) [neutrals/(sfast-iondE*dP)] |
||
| real(kind=Float64), | public, | dimension(:,:), allocatable | :: | flux | Neutral particle flux: flux(E,chan) [neutrals/(s*dE)] |
Simulation settings structure
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=Int32), | public | :: | shot_number | Shot Number |
|||
| real(kind=Float64), | public | :: | time | Shot time [s] |
|||
| character, | public | :: | runid | = | '' | FIDASIM run ID |
|
| character, | public | :: | result_dir | = | '' | Result directory |
|
| character, | public | :: | tables_file | = | '' | Atomic tables file |
|
| character, | public | :: | geometry_file | = | '' | FIDASIM input file containing geometric quantities |
|
| character, | public | :: | equilibrium_file | = | '' | FIDASIM input file containing the plasma parameters and fields |
|
| character, | public | :: | distribution_file | = | '' | FIDASIM input file containing the fast-ion distribution |
|
| character, | public | :: | neutrals_file | = | '' | FIDASIM output/input file containing beam neutral density. Used when load_neutrals is set. |
|
| integer, | public | :: | seed | Random number generator seed |
|||
| integer(kind=Int64), | public | :: | n_fida | Number of Active FIDA mc markers |
|||
| integer(kind=Int64), | public | :: | n_pfida | Number of Passive FIDA mc markers |
|||
| integer(kind=Int64), | public | :: | n_npa | Number of Passiv NPA mc markers |
|||
| integer(kind=Int64), | public | :: | n_pnpa | Number of Passive NPA mc markers |
|||
| integer(kind=Int64), | public | :: | n_nbi | Number of neutral beam mc markers |
|||
| integer(kind=Int64), | public | :: | n_dcx | Number of direct charge exchange (DCX) mc markers |
|||
| integer(kind=Int64), | public | :: | n_halo | Number of halo mc markers |
|||
| integer(kind=Int64), | public | :: | n_birth | Number of birth particles per n_nbi |
|||
| integer(kind=Int32), | public | :: | calc_spec | Calculate spectra: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_beam | Calculate beam densities: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_nbi_dens | Calculate neutral beam density: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_dcx_dens | Calculate Direct Charge Exchange (DCX) density: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_halo_dens | Calculate Thermal Halo density: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_brems | Calculate bremmstruhlung: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_bes | Calculate NBI: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_dcx | Calculate DCX: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_halo | Calculate Halo: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_cold | Calculate Cold D-alpha: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_fida | Calculate Active FIDA: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_pfida | Calculate Passive FIDA: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | tot_spectra | Total number of spectral switches on |
|||
| integer(kind=Int32), | public | :: | load_neutrals | Load neutrals from file: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | output_neutral_reservoir | Output neutral reservoir: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_npa | Calculate Active NPA: 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | calc_pnpa | Calculate Passive NPA: 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | calc_fida_wght | Calculate FIDA weight: 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | calc_npa_wght | Calculate NPA weights: 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | calc_birth | Calculate birth profile: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_neutron | Calculate neutron flux: 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | calc_cfpd | Calculate Charged Fusion Product flux: 0 = off, 1=on |
|||
| integer(kind=Int32), | public | :: | calc_res | Calculate spatial resolution of LOS |
|||
| integer(kind=Int32), | public | :: | flr | FLR correction: 0=off, 1=1st order(vxb/omega), 2=2nd order correction |
|||
| integer(kind=Int32), | public | :: | split | Split signals by fast ion class: 0=off, 1=on |
|||
| integer(kind=Int32), | public | :: | verbose | Verbosity: <0 = off++, 0 = off, 1=on, 2=on++ |
|||
| integer(kind=Int32), | public | :: | stark_components | Output spectral stark components : 0=off, 1=on |
|||
| integer(kind=Int32), | public | :: | dist_type | Type of fast-ion distribution |
|||
| integer(kind=Int32), | public | :: | nlambda | Number of wavelength to calculate |
|||
| real(kind=Float64), | public | :: | dlambda | Wavelength spacing [nm] |
|||
| real(kind=Float64), | public | :: | lambdamin | Minimum wavelength [nm] |
|||
| real(kind=Float64), | public | :: | lambdamax | Maximum wavelength [nm] |
|||
| integer(kind=Int32), | public | :: | ne_wght | Number of energies in weight functions |
|||
| integer(kind=Int32), | public | :: | np_wght | Number of pitches in weight functions |
|||
| integer(kind=Int32), | public | :: | nphi_wght | Number of gyro-angles to average over in weight functions |
|||
| integer(kind=Int32), | public | :: | nlambda_wght | Number of wavelength to calculate in weight functions |
|||
| real(kind=Float64), | public | :: | emax_wght | Maximum energy in weight functions [keV] |
|||
| real(kind=Float64), | public | :: | lambdamin_wght | Minimum wavelength in weight functions [nm] |
|||
| real(kind=Float64), | public | :: | lambdamax_wght | Maximum wavelength in weight functions [nm] |
|||
| integer(kind=Int32), | public | :: | adaptive | Simulation switch for adaptive time step, 0:split off, 1:dene, 2:avg(denn(1,:)), 3:denf, 4:avg(deni), 5:denimp, 6:te, 7:ti |
|||
| integer(kind=Int32), | public | :: | max_cell_splits | Maximum number of times a cell can be split |
|||
| real(kind=Float64), | public | :: | split_tol | Tolerance level for splitting cells |
Stores properties seen when traveling through a 3D grid
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | time | = | 0.d0 | Time/distance/... in cell |
|
| real(kind=Float64), | public | :: | flux | = | 0.d0 | Flux/density/... in cell |
|
| integer(kind=Int32), | public, | dimension(3) | :: | ind | = | 0 | Indices of cell |
| real(kind=Float64), | public, | dimension(3) | :: | pos | = | 0.d0 | Midpoint of track in cell [cm] |
Surface containing the fast-ion velocity vectors for all values of the gyro-angle. It takes the form of a hyperboloid where is the gyro-angle, is the ion gyro-frequency and
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=Float64), | public | :: | v | = | 0.d0 | Particle speed |
|
| real(kind=Float64), | public | :: | omega | = | 0.d0 | Ion gyro-frequency |
|
| real(kind=Float64), | public, | dimension(3) | :: | axes | = | 0.d0 | Semi-axes of the hyperboloid, i.e. a, b, c coefficients |
| real(kind=Float64), | public, | dimension(3) | :: | center | = | 0.d0 | Center of the gyrosurface |
| real(kind=Float64), | public, | dimension(3,3) | :: | A | = | 0.d0 | Coefficients of quartic surface i.e. |
| real(kind=Float64), | public, | dimension(3,3) | :: | basis | = | 0.d0 | Basis of coordinate system of gyrosurface |
Defines Charged Fusion Product orbit trajectories
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nenergy | = | 0 | Number of cfpd energies |
|
| integer, | public | :: | nrays | = | 0 | Number of "rays" |
|
| integer, | public | :: | nsteps | = | 0 | Number of total steps |
|
| integer, | public | :: | nchan | = | 0 | Number of channels |
|
| real(kind=Float64), | public | :: | dl | Step length [cm] |
|||
| real(kind=Float64), | public | :: | dE | CFPD energy bin width [keV] |
|||
| real(kind=Float64), | public, | dimension(:), allocatable | :: | earray | Energies of cfpd orbits [keV]: earray(E3) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | nactual | Number of spatial steps: nactual(E3,ray,channel) |
||
| real(kind=Float64), | public, | dimension(:,:,:), allocatable | :: | daomega | Differntial area times solid angle [cm^2]: daomega(E3,ray,channel) |
||
| real(kind=Float64), | public, | dimension(:,:,:,:,:), allocatable | :: | sightline | Velocity [cm/s] and position [cm] in cylindrical (R,Phi,Z) coordinates: sightline(E3,:,step,ray,channel) |
Defines how to add two LocalProfiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to subtract two LocalProfiles types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to multiply LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(LocalProfiles), | intent(in) | :: | p1 |
Defines how to divide LocalProfiles types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to add two LocalEMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Defines how to subtract two LocalEMFields types
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Defines how to multiply LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Defines how to multiply LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | real_scalar | |||
| type(LocalEMFields), | intent(in) | :: | p1 |
Defines how to divide LocalEMFields types by a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | p1 | |||
| real(kind=Float64), | intent(in) | :: | real_scalar |
Inexact equality comparison: x ~= y true if abs(x-y) <= tol else false
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | x | First value in comparison |
||
| real(kind=Float64), | intent(in) | :: | y | Second value in comparison |
||
| real(kind=Float64), | intent(in) | :: | tol | Equality tolerance |
Inexact greater than or equal to comparison: x >~= y
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | x | First value in comparison |
||
| real(kind=Float64), | intent(in) | :: | y | Second value in comparison |
||
| real(kind=Float64), | intent(in) | :: | tol | Equality tolerance |
Inexact less then or equal to comparison: x <~= y
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | x | First value in comparison |
||
| real(kind=Float64), | intent(in) | :: | y | Second value in comparison |
||
| real(kind=Float64), | intent(in) | :: | tol | Equality tolerance |
Calculates the cross product of two vectors: uxv
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | u | ||
| real(kind=Float64), | intent(in), | dimension(3) | :: | v |
Indicator function for determining if a point on a plane is within the plane boundary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(BoundedPlane), | intent(in) | :: | bplane | Plane with boundary |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | p | Point on plane |
Indicator function for determining if a point is inside the gyro_surface
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(GyroSurface), | intent(in) | :: | gs | Gyro-surface |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | p | Point |
Determines if a position pos is in the beam_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | xyz | Position in beam grid coordinates [cm] |
Indicates whether the position is in the beam grid
Determines if a position pos is in the pass_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | uvw | Position in machine coordinates [cm] |
Indicates whether the position is in the passive neutral grid
Calculates mean gyro-radius
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | fields | Electromagnetic fields at guiding center |
||
| real(kind=Float64), | intent(in) | :: | energy | Energy of particle |
||
| real(kind=Float64), | intent(in) | :: | pitch | Particle pitch w.r.t the magnetic field |
||
| real(kind=Float64), | intent(in) | :: | Ai | Atomic Mass of ion |
Mean gyro-radius
Prints FIDASIM banner
Defines how to assign NPAParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NPAParticle), | intent(out) | :: | p1 | |||
| type(NPAParticle), | intent(in) | :: | p2 |
Defines how to assign BirthParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(BirthParticle), | intent(out) | :: | p1 | |||
| type(BirthParticle), | intent(in) | :: | p2 |
Defines how to assign NeutralParticle types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticle), | intent(out) | :: | p1 | |||
| type(NeutralParticle), | intent(in) | :: | p2 |
Defines how to assign NeutralParticleReservoir to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | r1 | |||
| type(NeutralParticleReservoir), | intent(in) | :: | r2 |
Defines how to assign NeutralPopulation to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | n1 | |||
| type(NeutralPopulation), | intent(in) | :: | n2 |
Defines how to assign a Profiles type to a LocalProfiles type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(inout) | :: | p1 | |||
| type(Profiles), | intent(in) | :: | p2 |
Defines how to assign a LocalProfiles type to a Profiles type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Profiles), | intent(inout) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to assign LocalProfiles types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(inout) | :: | p1 | |||
| type(LocalProfiles), | intent(in) | :: | p2 |
Defines how to assign a EMFields type to a LocalEMFields type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(inout) | :: | p1 | |||
| type(EMFields), | intent(in) | :: | p2 |
Defines how to assign a LocalEMFields type to a EMFields type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(EMFields), | intent(inout) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
Defines how to assign LocalEMFields types to eachother
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(inout) | :: | p1 | |||
| type(LocalEMFields), | intent(in) | :: | p2 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | n_stark | |||
| integer, | intent(out), | dimension(:), allocatable | :: | stark_pi | ||
| integer, | intent(out), | dimension(:), allocatable | :: | stark_sigma | ||
| real(kind=FLoat64), | intent(out), | dimension(:), allocatable | :: | stark_intens | ||
| real(kind=FLoat64), | intent(out), | dimension(:), allocatable | :: | stark_wavel | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | line_lambda0 |
Makes [[libfida:beam_grid] from user defined inputs
Makes [[libfida:pass_grid] from user defined inputs
Makes [[libfida:pass_grid] from user defined inputs, and stores the quantities in spec_chords and npa_chords
Reads neutral beam geometry and stores the quantities in nbi
Reads the spectral geometry and stores the quantities in spec_chords
Reads the NPA geometry and stores the quantities in npa_chords
Reads the CFPD geometry and stores the quantities in ctable
Reads in Plasma composition e.g. the thermal, fast-ion, and impurity species
Reads in the interpolation grid, plasma parameters, and fields and stores the quantities in inter_grid and equil
Reads in the fast-ion distribution function and stores the quantities in fbm
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(inout) | :: | fid | HDF5 file ID |
||
| integer, | intent(out) | :: | error | Error code |
Reads in a MC particle fast-ion distribution and puts them in particles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(inout) | :: | fid | HDF5 file ID |
||
| integer, | intent(out) | :: | error | Error code |
Reads in the fast-ion distribution
Checks whether quasi-neutrality is satisfied to some tol
Reads in a cross section table from file and puts it into a AtomicCrossSection type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(in) | :: | fid | HDF5 file ID |
||
| character(len=*), | intent(in) | :: | grp | HDF5 group to read from |
||
| type(AtomicCrossSection), | intent(inout) | :: | cross | Atomic cross section |
Reads in a atomic rate table from file and puts it into a AtomicRates type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(in) | :: | fid | HDF5 file ID |
||
| character(len=*), | intent(in) | :: | grp | HDF5 group to read from |
||
| type(AtomicRates), | intent(inout) | :: | rates | Atomic reaction rates |
Reads in a atomic transitions table from file and puts it into a AtomicTransitions type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(in) | :: | fid | HDF5 file ID |
||
| character(len=*), | intent(in) | :: | grp | HDF5 group to read from |
||
| type(AtomicTransitions), | intent(inout) | :: | rates | Atomic transitions |
Reads in a nuclear reaction rates table from file and puts it into a NuclearRates type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(in) | :: | fid | HDF5 file ID |
||
| character(len=*), | intent(in) | :: | grp | HDF5 group to read from |
||
| type(NuclearRates), | intent(inout) | :: | rates | Atomic reaction rates |
Reads in atomic tables from file and stores them in tables
Write beam_grid to an HDF5 file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(inout) | :: | id | HDF5 file ID |
||
| integer, | intent(out) | :: | error | Error code |
Writes birth to a HDF5 file
Writes Neutral Population to HDF5 group
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(inout) | :: | id | HDF5 group ID |
||
| type(NeutralPopulation), | intent(in) | :: | pop | Neutral Population to write |
||
| integer, | intent(out) | :: | error | Error code |
Writes neut to a HDF5 file
Writes Spectra to a HDF5 file
Writes neutron to a HDF5 file
Writes cfpd to a HDF5 file
Writes fweight to a HDF5 file
Writes nweight to a HDF5 file
Reads neutral population from file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=HID_T), | intent(in) | :: | id | HDF5 id |
||
| type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population to populate |
||
| integer, | intent(out) | :: | error | Error code |
Reads neutral populations from file and puts it in neut
Creates active rotation matrix for z-y'-x" rotation given Tait-Bryan angles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | alpha | Angle of rotation about z |
||
| real(kind=Float64), | intent(in) | :: | beta | Angle of rotation about y' |
||
| real(kind=Float64), | intent(in) | :: | gamma | Angle of rotation about x" |
||
| real(kind=Float64), | intent(out), | dimension(3,3) | :: | basis | Rotation matrix/basis for transforming from rotated to non-rotated coordinates |
|
| real(kind=Float64), | intent(out), | optional | dimension(3,3) | :: | inv_basis | Inverse basis for reverse transformation |
Calculates basis from a line with +x in the direction of line
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | r0 | Starting point of line [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v0 | Direction of line |
|
| real(kind=Float64), | intent(out), | dimension(3,3) | :: | basis | Basis for transforming from line coordinates to cartesian |
|
| real(kind=Float64), | intent(out), | optional | dimension(3,3) | :: | inv_basis | Inverse basis for the reverse transformation cartesian to line |
Calculates basis from 3 points on a plane with +z being the plane normal
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | center | Plane origin |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | redge | Right edge of plane |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | tedge | Top edge of plane |
|
| real(kind=Float64), | intent(out), | dimension(3,3) | :: | basis | Basis for transforming from plane to cartesian coordinates |
|
| real(kind=Float64), | intent(out), | optional | dimension(3,3) | :: | inv_basis | Inverse basis for the reverse transformation cartesian to plane |
Calculates the intersection of a line and a plane
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | l0 | Point on line |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | l | Ray of line |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | p0 | Point on plane |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | n | Normal vector of plane |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | p | Line-plane intersect point |
|
| real(kind=Float64), | intent(out) | :: | t | "time" to intersect |
Calculates the intersection of a line and a cylinder
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | l0 | Point on line |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | l | Ray of line |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | p0 | Point on cylinder |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | p | Line-cylinder intersect point |
|
| real(kind=Float64), | intent(out) | :: | t | "time" to intersect |
Returns 3 x nb array containing points along the BoundedPlane's boundary edge
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(BoundedPlane), | intent(in) | :: | bplane | Bounded plane |
||
| real(kind=Float64), | intent(out), | dimension(:,:) | :: | bedge | Boundary edge points of bounded plane |
|
| integer, | intent(out) | :: | nb | Number of points in boundary edge |
Calculates the surface of all possible trajectories
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | fields | Electromagnetic fields at guiding center |
||
| real(kind=Float64), | intent(in) | :: | energy | Energy of particle |
||
| real(kind=Float64), | intent(in) | :: | pitch | Particle pitch w.r.t the magnetic field |
||
| real(kind=Float64), | intent(in) | :: | Ai | Ion atomic mass |
||
| type(GyroSurface), | intent(out) | :: | gs | Gyro-surface |
Calculates the times of intersection of a line and a gyro-surface
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | r0 | Point on line |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v0 | Direction of line |
|
| type(GyroSurface), | intent(in) | :: | gs | Gyro-surface |
||
| real(kind=Float64), | intent(out), | dimension(2) | :: | t | "time" to intersect |
Calculates the parametric coordinates, u, of point p on the gyro_surface
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(GyroSurface), | intent(in) | :: | gs | Gyro_surface |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | p | Point on gyro_surface |
|
| real(kind=Float64), | intent(out), | dimension(2) | :: | u | Parametric coordinates (gyro-angle, t) |
Calculate particle trajectory for a given gyro-angle and gyro-surface
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(GyroSurface), | intent(in) | :: | gs | Gyro-Surface |
||
| real(kind=Float64), | intent(in) | :: | theta | Gyro-angle |
||
| real(kind=Float64), | dimension(3) | :: | ri | Particle position |
||
| real(kind=Float64), | dimension(3) | :: | vi | Particle Velocity |
Calculates the range(s) of gyro-angles that would land within a bounded plane
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(BoundedPlane), | intent(in) | :: | b | Bounded Plane |
||
| type(GyroSurface), | intent(in) | :: | gs | Gyro-surface |
||
| real(kind=Float64), | intent(out), | dimension(2,4) | :: | gyrange | (theta, dtheta) values |
|
| integer, | intent(out) | :: | nrange | Number of ranges. |
Calculates range of gyro-angles that would hit the NPA detector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ichan | Index of NPA detector |
||
| type(GyroSurface), | intent(in) | :: | gs | |||
| real(kind=Float64), | intent(out), | dimension(2,4) | :: | gyrange | ||
| integer, | intent(out) | :: | nrange |
Routine to check if a particle will hit a NPA detector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | r0 | Starting point of particle |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v0 | Particle velocity |
|
| integer, | intent(out) | :: | d_index | Index of NPA detector. Zero if particle doesn't hit |
||
| real(kind=Float64), | intent(out), | optional | dimension(3) | :: | rd | Point where particle hit detector |
| integer, | intent(in), | optional | :: | det | Index of NPA detector to check |
Convert beam coordinate xyz to machine coordinate uvw
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | xyz | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | uvw |
Convert beam coordinate xyz to cylindrical coordinate cyl
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | xyz | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | cyl |
Convert machine coordinate uvw to beam coordinate xyz
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | uvw | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | xyz |
Convert cylindrical coordinate cyl to machine coordinate uvw
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | cyl | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | uvw |
Convert cylindrical coordinate cyl to beam coordinate xyz
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | cyl | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | xyz |
Convert machine coordinate uvw to cylindrical coordinate cyl
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | uvw | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | cyl |
Convert sightline position and velocity from cylindrical coordinate rpz to beam coordinate xyz
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ie3 | CFPD energy index |
||
| integer, | intent(in) | :: | ist | Step index |
||
| integer, | intent(in) | :: | iray | "Ray" index |
||
| integer, | intent(in) | :: | ich | Detector channel |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | xyz | Sightline position in beam coordinates |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | v3_xyz | Sightline velocity in beam coordinates |
Calculates a particles intersection length with the beam_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | r0 | Initial position of particle [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v0 | Velocity of particle [cm/s] |
|
| real(kind=Float64), | intent(out) | :: | length | Intersection length [cm] |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | r_enter | Point where particle enters |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | r_exit | Point where particle exits |
|
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | center_in | Alternative grid center |
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | lwh_in | Alternative grid [length,width,height] |
| logical, | intent(in), | optional | :: | passive | Calculates a particles intersection length with the pass_grid |
Calculates the intersection arclength of a circle with the beam_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | r0 | Position of center enter of the circle in beam grid coordinates [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | e1 | Unit vector pointing towards (R, 0) (r,phi) position of the circle in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | e2 | Unit vector pointing towards (R, pi/2) (r,phi) position of the circle in beam grid coordinates |
|
| real(kind=Float64), | intent(in) | :: | radius | Radius of circle [cm] |
||
| real(kind=Float64), | intent(out) | :: | beam_grid_phi_enter | Phi value where the circle entered the beam_grid [rad] |
||
| real(kind=Float64), | intent(out) | :: | beam_grid_phi_exit | Phi value where the circle exits the beam_grid [rad] |
Find closests beam_grid indices ind to position pos
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position [cm] |
|
| integer(kind=Int32), | intent(out), | dimension(3) | :: | ind | Closest indices to position |
Find closest pass_grid indices ind to position pos
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position [cm] |
|
| integer(kind=Int32), | intent(out), | dimension(3) | :: | ind | Closest indices to position |
|
| integer, | intent(in), | optional | :: | input_coords | Indicates coordinate system of |
Find closest inter_grid indices ind to position pos
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position [cm] |
|
| integer(kind=Int32), | intent(out), | dimension(3) | :: | ind | Closest indices to position |
|
| integer, | intent(in), | optional | :: | input_coords | Indicates coordinate system of |
Returns extrema points where line(s) parametrized by r0 and v0 intersect the plasma boudnary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(:,:) | :: | r0 | Arrays the define line(s) in machine coordinates |
|
| real(kind=Float64), | intent(in), | dimension(:,:) | :: | v0 | Arrays the define line(s) in machine coordinates |
|
| real(kind=Float64), | intent(out), | dimension(2,3) | :: | extrema | Minimum and maximumm R, Z, and Phi points |
|
| real(kind=Float64), | intent(in), | optional | dimension(:) | :: | x0 | Additional x and y points to consider |
| real(kind=Float64), | intent(in), | optional | dimension(:) | :: | y0 | Additional x and y points to consider |
Get position pos given indices ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=Int32), | intent(in), | dimension(3) | :: | ind | Indices |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | pos | Position in beam_grid coordinates [cm] |
|
| integer, | intent(in), | optional | :: | input_coords | Indicates coordinate system of |
Computes the path of a neutral through the beam_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | rin | Initial position of particle |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vin | Initial velocity of particle |
|
| type(ParticleTrack), | intent(inout), | dimension(:) | :: | tracks | Array of ParticleTrack type |
|
| integer(kind=Int32), | intent(out) | :: | ntrack | Number of cells that a particle crosses |
||
| logical, | intent(out), | optional | :: | los_intersect | Indicator whether particle intersects a LOS in spec_chords |
Computes the path of a neutral through the pass_grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | rin | Initial position of particle |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vin | Initial velocity of particle |
|
| type(ParticleTrack), | intent(inout), | dimension(:) | :: | tracks | Array of ParticleTrack type |
|
| integer(kind=Int32), | intent(out) | :: | ntrack | Number of cells that a particle crosses |
||
| logical, | intent(out), | optional | :: | los_intersect | Indicator whether particle intersects a LOS in spec_chords |
Indicator subroutine to determine if a position is in a region where the plasma parameter and fields are valid/known
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | xyz | Position in beam coordinates |
|
| logical, | intent(out) | :: | inp | Indicates whether plasma parameters and fields are valid/known |
||
| integer, | intent(in), | optional | :: | input_coords | Indicates coordinate system of xyz. Beam grid (0), machine (1) and cylindrical (2) |
|
| type(InterpolCoeffs3D), | intent(out), | optional | :: | coeffs | Interpolation coefficients used in calculation |
|
| real(kind=Float64), | intent(out), | optional | dimension(3) | :: | uvw_out | Position in machine coordinates |
Gets plasma parameters at position pos or beam_grid indices ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(out) | :: | plasma | Plasma parameters at |
||
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | pos | Position in beam grid coordinates |
| integer(kind=Int32), | intent(in), | optional | dimension(3) | :: | ind | beam_grid indices |
| integer(kind=Int32), | intent(in), | optional | :: | input_coords | Indicates coordinate system of inputs. Beam grid (0), machine (1) and cylindrical (2) |
|
| integer(kind=Int32), | intent(in), | optional | :: | output_coords | Indicates coordinate system of outputs. Beam grid (0), machine (1) and cylindrical (2) |
Calculates normalized vectors that are perpendicular to b
such that a x c = b_norm
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | b | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | a | ||
| real(kind=Float64), | intent(out), | dimension(3) | :: | c |
Gets electro-magnetic fields at position pos or beam_grid indices ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(out) | :: | fields | Electro-magnetic fields at |
||
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | pos | Position in beam grid coordinates |
| integer(kind=Int32), | intent(in), | optional | dimension(3) | :: | ind | beam_grid indices |
| integer(kind=Int32), | intent(in), | optional | :: | input_coords | Indicates coordinate system of inputs. Beam grid (0), machine (1) and cylindrical (2) |
|
| integer(kind=Int32), | intent(in), | optional | :: | output_coords | Indicates coordinate system of outputs. Beam grid (0), machine (1) and cylindrical (2) |
Gets Guiding Center distribution at position pos or beam_grid indices ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(out), | dimension(:,:) | :: | fbeam | Guiding Center Fast-ion distribution at |
|
| real(kind=Float64), | intent(out) | :: | denf | Guiding Center Fast-ion density at |
||
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | pos | Position in beam grid coordinates |
| integer(kind=Int32), | intent(in), | optional | dimension(3) | :: | ind | beam_grid indices |
| type(InterpolCoeffs3D), | intent(in), | optional | :: | coeffs | Precomputed interpolation coefficients |
Get guiding center fast-ion density at given energy and pitch
at position pos or beam_grid indices ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | energy | Energy [keV] |
||
| real(kind=Float64), | intent(in) | :: | pitch | Pitch |
||
| real(kind=Float64), | intent(out) | :: | denf | Fast-ion density [fast-ions/(cm^3dEdp)] |
||
| real(kind=Float64), | intent(in), | optional | dimension(3) | :: | pos | Position in beam grid coordinates |
| integer(kind=Int32), | intent(in), | optional | dimension(3) | :: | ind | beam_grid indices |
| type(InterpolCoeffs3D), | intent(in), | optional | :: | coeffs | Precomputed interpolation coefficients |
Initialize reservoir
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | res | Neutral Particle Reservoir Size of reservoir |
Store neutrals in reservoir
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | res | beam_grid indices |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | vn | Neutral particle velocity [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | wght | Neutral weight |
Merge reservoir 2 into reservoir 1
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | res1 | Reservoir 1 |
||
| type(NeutralParticleReservoir), | intent(inout) | :: | res2 | Reservoir 2 |
Initialize NeutralPopulation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population to initialize |
Initialize NeutralPopulation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population to initialize |
Update [NeutralPopulation]] pop at ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population |
||
| integer(kind=Int32), | intent(in), | dimension(3) | :: | ind | beam_grid indices |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vn | Neutral particle velocity [cm/s] |
|
| real(kind=Float64), | intent(in), | dimension(:) | :: | dens | Neutral density [neutrals/cm^3] |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=Int32), | intent(in), | dimension(3) | :: | ind | beam_grid indices |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Neutral particle position [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vn | Neutral particle velocity [cm/s] |
|
| integer, | intent(in) | :: | neut_type | Neutral type |
||
| real(kind=Float64), | intent(in), | dimension(nlevs) | :: | dens | Neutral density [neutrals/cm^3] |
Merge NeutralPopulations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | pop1 | Neutral Population target |
||
| type(NeutralPopulation), | intent(inout) | :: | pop2 | Neutral Population to merge into target |
Merge neutral particle reservoirs across MPI processes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralParticleReservoir), | intent(inout) | :: | res | Neutral Particle Reservoir |
Update neutral population
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(NeutralPopulation), | intent(inout) | :: | pop | Neutral Population |
Store NPA particles in npa
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | det | Detector/Channel Number |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | ri | Birth position in beam coordinates [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | rf | Detector position in beam coordinates [cm] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vn | Particle velocity [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | flux | Neutral flux [neutrals/s] |
||
| integer, | intent(in), | optional | :: | orbit_class | Orbit class ID |
|
| logical, | intent(in), | optional | :: | passive | Indicates whether npa particle is passive |
Get beam-beam neutralization/cx rates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(nlevs) | :: | denn | Neutral density [cm^-3] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vn | Neutral velocity [cm/s] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Ion velocity [cm/s] |
|
| real(kind=Float64), | intent(out), | dimension(nlevs) | :: | rates | Reaction rates [1/s] |
Get beam-target neutralization/cx rates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma parameters (for neutral temperature and vrot) |
||
| real(kind=Float64), | intent(in), | dimension(nlevs) | :: | denn | Neutral density [cm^-3] |
|
| real(kind=Float64), | intent(in) | :: | an | Neutral mass [amu] |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Ion velocity [cm/s] |
|
| real(kind=Float64), | intent(out), | dimension(nlevs) | :: | rates | Reaction rates [1/s] |
Gets d(d,p)T rate for a beam with energy eb interacting with a target plasma
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma Paramters |
||
| real(kind=Float64), | intent(in) | :: | eb | Beam energy [keV] |
||
| real(kind=Float64), | intent(out) | :: | rate | Neutron reaction rate [1/s] |
||
| integer, | intent(in), | optional | :: | branch | Indicates 1 for cfpd rate and 2 for neutron rate |
Gets d(d,p)T anisotropy defecit/enhancement factor for a beam interacting with a target plasma
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma Paramters |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | v1 | Beam velocity [cm/s] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v3 | Charged Fusion Product velocity [cm/s] |
|
| real(kind=Float64), | intent(out) | :: | kappa | Anisotropy factor Reference: Eq. (1) and (3) of NIM A236 (1985) 380 |
Returns fraction of gyroangles that can produce a reaction with given inputs
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | fields | Electromagneticfields in beam coordinates |
||
| real(kind=Float64), | intent(in) | :: | E3 | E3 charged fusion product energy [keV] |
||
| real(kind=Float64), | intent(in) | :: | E1 | E1 fast-ion energy [keV] |
||
| real(kind=Float64), | intent(in) | :: | pitch | pitch fast ion pitch relative to the field |
||
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma Paramters in beam coordinates |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | v3_xyz | Charged fusion product velocity in beam coorindates |
|
| real(kind=Float64), | intent(out) | :: | pgyro | pgyro DeltaE_3*\partial\gam/\partial E_3/pi |
||
| real(kind=Float64), | intent(out) | :: | gam0 | Gyro angle of fast ion [rad] |
Get probability of a thermal ion charge exchanging with neutral population within cell
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(nlevs) | :: | denn | Neutral density |
|
| type(NeutralParticleReservoir), | intent(in) | :: | res | Neutral Particle Reservoir |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | v_ion | Ion velocity [cm/s] |
|
| real(kind=Float64), | intent(out), | dimension(nlevs) | :: | rates | Total charge exchange rate [1/s] |
Get probability of a thermal ion charge exchanging with types neutrals
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=Int32), | intent(in), | dimension(3) | :: | ind | beam_grid indices |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Interaction position in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | v_ion | Ion velocity [cm/s] |
|
| integer(kind=Int32), | intent(in), | dimension(:) | :: | types | Neutral types |
|
| real(kind=Float64), | intent(out), | dimension(nlevs) | :: | rate_tot | Total charge exchange rate [1/s] |
Gets rate matrix for use in colrad
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma parameters |
||
| real(kind=Float64), | intent(in) | :: | ab | "Beam" ion mass [amu] |
||
| real(kind=Float64), | intent(in) | :: | eb | "Beam" ion energy [keV] |
||
| real(kind=Float64), | intent(out), | dimension(nlevs,nlevs) | :: | rmat | Rate matrix |
Evolve density of states in time dt via collisional radiative model
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma parameters |
||
| real(kind=Float64), | intent(in) | :: | ab | Ion/Neutral mass [amu] |
||
| real(kind=Float64), | intent(in), | dimension(:) | :: | vn | Neutral velocitiy [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | dt | Time interval [s] |
||
| real(kind=Float64), | intent(inout), | dimension(:) | :: | states | Density of states |
|
| real(kind=Float64), | intent(out), | dimension(nlevs) | :: | dens | Density of neutrals |
|
| real(kind=Float64), | intent(out) | :: | photons | Emitted photons |
Attenuate states along a trajectory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | ri | Initial position in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | rf | Final position in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Initial velocity of neutral |
|
| real(kind=Float64), | intent(inout), | dimension(nlevs) | :: | states | Density of states |
|
| real(kind=Float64), | intent(in), | optional | :: | dstep_in | Step length [cm] |
Calculates doppler shift and stark split wavelengths
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vecp | Vector directing towards optical head |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Particle velocity |
|
| type(LocalEMFields), | intent(in) | :: | fields | Electro-magnetic fields |
||
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
| real(kind=Float64), | intent(out), | dimension(n_stark) | :: | lambda | Wavelengths [nm] |
Calculates doppler shift, stark splitting, and intensities
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vecp | Vector directing towards optical head |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Particle velocity |
|
| type(LocalEMFields), | intent(in) | :: | fields | Electro-magnetic fields |
||
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
| real(kind=Float64), | intent(in) | :: | sigma_pi | Sigma-pi ratio |
||
| real(kind=Float64), | intent(in) | :: | photons | Photon density from colrad |
||
| real(kind=Float64), | intent(in) | :: | dlength | LOS intersection length with beam_grid cell particle is in |
||
| real(kind=Float64), | intent(out), | dimension(n_stark) | :: | lambda | Wavelengths [nm] |
|
| real(kind=Float64), | intent(out), | dimension(n_stark) | :: | intensity | ||
| real(kind=Float64), | intent(out), | dimension(n_stark,4) | :: | stokes | Spectra intensities [Ph/(s cm^2 starkline)] |
Store photons in spectra
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position of neutral in beam coordinates [machine coordinates for passive case] |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocitiy of neutral in beam coordinates [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
| real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
||
| real(kind=Float64), | intent(inout), | dimension(:,:,:) | :: | spectra | Stark split |
|
| real(kind=Float64), | intent(inout), | dimension(:,:,:,:) | :: | stokevec | Stark split |
|
| logical, | intent(in), | optional | :: | passive | Indicates whether photon is passive FIDA |
Store BES photons in Spectra
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position of neutral in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocitiy of neutral [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
| real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
||
| integer, | intent(in) | :: | neut_type | Neutral type (full,half,third,halo) |
Store fida photons in Spectra
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position of neutral in beam grid coordinates |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocitiy of neutral [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference wavelength [nm] |
||
| real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
||
| integer, | intent(in), | optional | :: | orbit_class | Orbit class ID |
|
| logical, | intent(in), | optional | :: | passive | Indicates whether photon is passive FIDA |
Store neutral birth location of the photon source
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Birth location of the photon source neutral |
|
| real(kind=Float64), | intent(in) | :: | photons | Number of photons |
||
| type(NeutralParticleReservoir), | intent(inout), | dimension(:) | :: | res | reservoir of neutral particles |
|
| logical, | intent(in), | optional | :: | passive |
Store neutron rate in neutron
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | rate | Neutron rate [neutrons/sec] |
||
| integer, | intent(in), | optional | :: | orbit_class | Orbit class ID |
Store FIDA weight photons in fweight for a specific channel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ichan | Channel index |
||
| integer, | intent(in) | :: | eind | Energy index |
||
| integer, | intent(in) | :: | pind | Pitch index |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | vp | Vector pointing toward optical head |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocity of neutral [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference Wavelength [nm] |
||
| type(LocalEMFields), | intent(in) | :: | fields | Electro-magnetic fields |
||
| real(kind=Float64), | intent(in) | :: | dlength | LOS intersection length with beam_grid cell particle is in |
||
| real(kind=Float64), | intent(in) | :: | sigma_pi | Sigma-pi ratio for channel |
||
| real(kind=Float64), | intent(in) | :: | denf | Fast-ion density [cm^-3] |
||
| real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
Store FIDA weight photons in fweight
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | eind | Energy index |
||
| integer, | intent(in) | :: | pind | Pitch index |
||
| real(kind=Float64), | intent(in), | dimension(3) | :: | pos | Position of neutral |
|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Velocity of neutral [cm/s] |
|
| real(kind=Float64), | intent(in) | :: | lambda0 | Reference Wavelength [nm] |
||
| real(kind=Float64), | intent(in) | :: | denf | Fast-ion density [cm^-3] |
||
| real(kind=Float64), | intent(in) | :: | photons | Photons from colrad [Ph/(s*cm^3)] |
Sets the number of MC markers launched from each beam_grid cell
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=Int64), | intent(in) | :: | nr_markers | Approximate total number of markers to launch |
||
| real(kind=Float64), | intent(in), | dimension(:,:,:), target | :: | papprox | beam_grid cell weights |
|
| integer(kind=Int32), | intent(out), | dimension(:,:,:) | :: | nlaunch | Number of mc markers to launch for each cell: nlaunch(x,y,z) |
Sets the number of MC markers launched from each pass_grid cell
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=Int64), | intent(in) | :: | nr_markers | Approximate total number of markers to launch |
||
| real(kind=Float64), | intent(in), | dimension(:,:,:) | :: | papprox | pass_grid cell weights |
|
| integer(kind=Int32), | intent(out), | dimension(:,:,:) | :: | nlaunch | Number of mc markers to launch for each cell: nlaunch(r,z,phi) |
Calculates velocity vector from pitch, gyroangle and fields
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in) | :: | pitch | Pitch |
||
| real(kind=Float64), | intent(in) | :: | gyroangle | Gyroangle [radians] |
||
| type(LocalEMFields), | intent(in) | :: | fields | Electromagnetic fields |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | vi_norm | Normalized velocity vector |
Calculates gyro-step
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(3) | :: | vi | Ion velocity |
|
| type(LocalEMFields), | intent(in) | :: | fields | Electro-magnetic fields |
||
| real(kind=Float64), | intent(in) | :: | Ai | Atomic mass of ion |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | r_gyro | Gyro-step Gyro-radius vector from particle position to guiding center |
Calculates gyro correction for Guiding Center MC distribution calculation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalEMFields), | intent(in) | :: | fields | Electromagnetic fields at guiding center |
||
| real(kind=Float64), | intent(in) | :: | energy | Energy of particle |
||
| real(kind=Float64), | intent(in) | :: | pitch | Particle pitch w.r.t the magnetic field |
||
| real(kind=Float64), | intent(in) | :: | Ai | Atomic mass of Ion |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | rp | Particle position |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | vp | Particle velocity |
|
| real(kind=Float64), | intent(in), | optional | :: | theta_in | Gyro-angle |
Sample uniformally in beam grid cell
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | dimension(3) | :: | ind | Cell index |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | ri | Position in cell |
Sample uniformally in passive grid cell
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | dimension(3) | :: | ind | Cell index |
|
| real(kind=Float64), | intent(out), | dimension(3) | :: | ri | Position in cell |
Samples a Guiding Center Fast-ion distribution function at a given beam_grid index
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | dimension(3) | :: | ind | beam_grid index |
|
| type(LocalEMFields), | intent(out) | :: | fields | Electromagnetic fields at the guiding center |
||
| real(kind=Float64), | intent(out) | :: | eb | Energy of the fast ion |
||
| real(kind=Float64), | intent(out) | :: | ptch | Pitch of the fast ion |
||
| real(kind=Float64), | intent(out) | :: | denf | Fast-ion density at guiding center |
Samples a Guiding Center Fast-ion distribution function at a given pass_grid index
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | dimension(3) | :: | ind | pass_grid index |
|
| type(LocalEMFields), | intent(out) | :: | fields | Electromagnetic fields at the guiding center |
||
| real(kind=Float64), | intent(out) | :: | eb | Energy of the fast ion |
||
| real(kind=Float64), | intent(out) | :: | ptch | Pitch of the fast ion |
||
| real(kind=Float64), | intent(out) | :: | denf | Fast-ion density at guiding center |
||
| integer, | intent(in), | optional | :: | output_coords | Indicates coordinate system of |
Generate velocity vector from a thermal Maxwellian distribution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LocalProfiles), | intent(in) | :: | plasma | Plasma Parameters |
||
| real(kind=Float64), | intent(in) | :: | ai | Ion mass [amu] |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | vhalo | Velocity [cm/s] |
Generates a neutral beam particle trajectory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(out), | dimension(3) | :: | vnbi | Velocity [cm/s] |
|
| integer, | intent(in) | :: | efrac | Beam neutral type (1,2,3) |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | rnbi | Starting position on beam_grid |
|
| logical, | intent(out) | :: | err | Error Code |
Generates a neutral beam velocity vector
that passes through cell at ind with weight weight
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | dimension(3) | :: | ind | Cell index |
|
| integer, | intent(in) | :: | neut_type | Neutral Type (1=Full,2=Half,3=Third) |
||
| real(kind=Float64), | intent(out), | dimension(3) | :: | vnbi | Normalized Velocity |
|
| real(kind=Float64), | intent(out) | :: | weight | Weigth/probability of trajectory |
Calculates neutral beam deposition and spectra
Calculates Direct Charge Exchange (DCX) neutral density and spectra
Calculates halo neutral density and spectra
Calculates approximate neutral beam emission (full, half, third) from user supplied neutrals file
Calculates DCX emission from user supplied neutrals file
Calculates halo emission from user supplied neutrals file
Calculates cold D-alpha emission
Calculates bremsstrahlung
Calculate Active FIDA emission using a Fast-ion distribution function F(E,p,r,z)
Calculate Passive FIDA emission using a Fast-ion distribution function F(E,p,r,z)
Calculate Active FIDA emission using a Monte Carlo Fast-ion distribution
Calculate Passive FIDA emission using a Monte Carlo Fast-ion distribution
Calculate Active NPA flux using a fast-ion distribution function F(E,p,r,z)
Calculate Passive NPA flux using a fast-ion distribution function F(E,p,r,z)
Calculate Active NPA flux using a Monte Carlo fast-ion distribution
Calculate Passive NPA flux using a Monte Carlo fast-ion distribution
Calculate neutron emission rate using a fast-ion distribution function F(E,p,r,z)
Calculate charged fusion product count rate and weight function using a fast-ion distribution function F(E,p,r,z)
Calculate neutron flux using a Monte Carlo Fast-ion distribution
Calculates FIDA weights
Calculates LOS averaged FIDA weights
Calculates NPA weights