neutral
Input representing plasma neutral bakcground.
Neutral data is used in simulations with atomic reactions enabled.
Non-axisymmetric neutral data. |
- class a5py.ascot5io.neutral.N0_3D(root, path, **kwargs)
Bases:
DataGroup
Non-axisymmetric neutral data.
This input represents neutral density and temperature that can have 3D profile. The data is interpolated on an uniform cylindrical grid using linear interpolation. The neutral temperature can either be Maxwellian or mono-energetic.
- static create_dummy()
Create dummy data that has correct format and is valid, but can be non-sensical.
This method is intended for testing purposes or to provide data whose presence is needed but which is not actually used in simulation.
- Returns:
- data
dict
Input data that can be passed to
write_hdf5
method of a corresponding type.
- data
- read()
Read data from HDF5 file.
- Returns:
- data
dict
Data read from HDF5 stored in the same format as is passed to
write_hdf5()
.
- data
- static write_hdf5(fn, rmin, rmax, nr, zmin, zmax, nz, phimin, phimax, nphi, nspecies, anum, znum, density, temperature, maxwellian=1, desc=None)
Write input data to the HDF5 file.
The toroidal angle phi is treated as a periodic coordinate, meaning
A(phi=phimin) == A(phi=phimax)
. However, the phi grid, where input arrays are tabulated, islinspace(phimin, phimax, nphi+1)[:-1]
to avoid storing duplicate data.- Parameters:
- fn
str
Full path to the HDF5 file.
- rmin
float
Minimum value in R grid [m].
- rmax
float
Maximum value in R grid [m].
- nr
int
Number of R grid points.
- zmin
float
Minimum value in z grid [m].
- zmax
float
Maximum value in z grid [m].
- nz
int
Number of z grid points.
- phimin
float
Beginning of the toroidal period [deg].
- phimax
float
End of the toroidal period [deg].
- nphi
int
Number of phi grid points.
- nspecies
int
Number of neutral species.
- anumarray_like (nspecies,1)
Neutral species’ atomic mass number.
- znumarray_like (nspecies,1)
Neutral species’ charge number.
- densityarray_like (nr,nphi,nz,nspecies)
Neutral species-wise density [m^-3].
- temperaturearray_like (nr,nphi,nz,nspecies)
Neutral species-wise temperature [eV].
- maxwellianarray_like (nspecies,1)
Whether species distribution is Maxwellian (1) of monoenergetic (0)
- desc
str
,optional
Input description.
- fn
- Returns:
- name
str
Name, i.e. “<type>_<qid>”, of the new input that was written.
- name
- Raises:
ValueError
If inputs were not consistent.