neutral

Input representing plasma neutral bakcground.

Neutral data is used in simulations with atomic reactions enabled.

a5py.ascot5io.neutral.N0_3D

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:
datadict

Input data that can be passed to write_hdf5 method of a corresponding type.

read()

Read data from HDF5 file.

Returns:
datadict

Data read from HDF5 stored in the same format as is passed to write_hdf5().

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, is linspace(phimin, phimax, nphi+1)[:-1] to avoid storing duplicate data.

Parameters:
fnstr

Full path to the HDF5 file.

rminfloat

Minimum value in R grid [m].

rmaxfloat

Maximum value in R grid [m].

nrint

Number of R grid points.

zminfloat

Minimum value in z grid [m].

zmaxfloat

Maximum value in z grid [m].

nzint

Number of z grid points.

phiminfloat

Beginning of the toroidal period [deg].

phimaxfloat

End of the toroidal period [deg].

nphiint

Number of phi grid points.

nspeciesint

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)

descstr, optional

Input description.

Returns:
namestr

Name, i.e. “<type>_<qid>”, of the new input that was written.

Raises:
ValueError

If inputs were not consistent.