Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document can be found on the ACH-PSNC Confluence page (DYON IMASification - Scientific Worfklows - PCSS Confluence (psnc.pl), https://docs.psnc.pl/display/WFMS/DYON+IMASification).

 DYON output

The storage of the DYON output in IMAS is supported by two MATLAB functions, put_to_IMAS and get_from_IMAS. Depending on the situation, they can be integrated to the code or used separately as wrappers providing the connection between DYON and IMAS. The scripts test_put_to_IMAS and test_get_from_IMAS are provided, which illustrate how the functions can be called as wrappers.

...

Now the output data are placed into 7 IMAS IDS's (Interface Data Structures - sections of the IMAS DD describing tokamak subsystems or tokamak physics chapters): 'core_profiles', 'core_sources', 'equilibrium', 'gas_injection', 'magnetics', 'radiation', and 'wall' (this list is to be extended). The allocation of the data in the IDS's and the functions supporting it are described below.

 Files provided

File name Content
put_to_IMAS.mFunction saving IMAS output data to IMAS
get_from_IMAS.mFunction reading IMAS output data from IMAS
test_put_to_IMAS.mSample script invoking the function put_to_IMAS
test_get_from_IMAS.mSample script that invokes the function get_from_IMAS and compares the recovered data with the initial ones
put_core_profiles.mFunction saving data to the 'core_profiles' IDS
put_core_sources.mFunction saving data to the 'core_sources' IDS
put_equilibrium.mFunction saving data to the 'equilibrium' IDS
put_gas_injection.mFunction saving data to the 'gas_injection' IDS
put_magnetics.mFunction saving data to the 'magnetics' IDS
put_radiation.mFunction saving data to the 'radiation' IDS
put_wall.mFunction saving data to the 'wall' IDS
get_core_profiles.mFunction recovering the saved data from the 'core_profiles' IDS
get_core_sources.mFunction recovering the saved data from the 'core_sources' IDS
get_equilibrium.mFunction recovering the saved data from the 'equilibrium' IDS
get_gas_injection.mFunction recovering the saved data from the 'gas_injection' IDS
get_magnetics.mFunction recovering the saved data from the 'magnetics' IDS
get_radiation.mFunction recovering the saved data from the 'radiation' IDS
get_wall.mFunction recovering the saved data from the 'wall' IDS
arrange_ion_densities.mFunction putting the densities of all charge states and the properties of an ion to 'core_profiles'
arrange_neutral_density.mFunction putting the density and the properties of a neutral atom to 'core_profiles'
arrange_radiation.mFunction arranging the radiation power density (together with all atom attributes) for given radiation type and neutral/ion kind
extract_ion_densities.mFunction extracting the densities of all charge states from the 'core_profiles' IDS
find_source.mFunction finding the location of the source with a given data dictionary index in an AoS
find_species.mFunction finding the location of the species with a given label in AoS
compare_core_profiles.mFunction comparing the data restored from the 'core_profiles' IDS with the initial content
compare_core_sources.mFunction comparing the data restored from the 'core_sources' IDS with the initial content
compare_equilibrium.mFunction comparing the data restored from the 'equilibrium' IDS with the initial content
compare_magnetics.mFunction comparing the data restored from the 'magnetics' IDS with the initial content
compare_radiation.mFunction comparing the data restored from the 'radiation' IDS with the initial content
compare_wall.mFunction comparing the data restored from the 'wall' IDS with the initial content
STEP_10003_N_O_impurities_Cwall_2022_11_12_17_53_27.matExample of MAT-file with DYON results (received from Kim Hyun-Tae)
STEP_10003_v4_600kW_EBWCD_2022_6_20_21_24_29.matExample of MAT-file with DYON results (received from Kim Hyun-Tae)
README.txtBrief user guide
DYON-IMAS_wrappers_user_guide.pdfThis documentation in PDF-format

...

Arrange the structure holding the data about emissivity and other characteristics of a neutral species.

NameTypeDescription
neutral_sortstructstructure containing the emissivity and properties of the neutral species
labelsymbol arraylabel of the chemical element
massfloation mass number
Zfloatcharge number of the nucleus
power_densityfloatneutral density


function [density, ion_found] = extract_ion_densities (profiles, Z)

Extract densities of all charge states of an ion species from the core_profiles IDS.

NameTypeDescription
density1D float arraythe array elements with the numbers 1, ..., Z hold the densities of the corresponding charge states; the element Z+1 hold the neutral density
ion_foundbooleanequals to false if the ion with the given Z is missing
profilesstructtime slice of the AoS core_profiles.profiles_1d
Zfloatcharge number of the nucleus


function [AOS_index] = find_source (sources, dictionary_index)

Find location of the element with a given data dictionary index in an AOS (in particular, the source in core_sources.source and the process in radiation.process).

NameTypeDescription
AOS_indexintindex of the required element in the array
sourcesstructAoS where the search is performed
dictionary_indexintDD index of the required element


function index = find_species (species_list, label)

Find location of the element with a given label in AoS. The function is used to find the required spruttering coefficient in the 'wall' IDS. The label is the chemical element label; it is hold in the 'label' leaf of each AoS element.

NameTypeDescription
indexintindex of the required element in the array
species_liststructAoS where the search is performed
labelsymbol arraylabel of the required element


 DYON input

Description of the scripts processing the DYON input (to be done).

...