efield
Electric field input.
Electric field is present in all simulations and it is automatically accounted for when orbit-following is enabled. To “disable” electric field, set the values to zero everywhere. The easiest and most computationally effective way to accomplish this is to use E_TC input.
Uniform electric field in Cartesian basis. |
|
One-dimensional electric field interpolated with cubic splines. |
- class a5py.ascot5io.efield.E_TC(root, path, **kwargs)
Bases:
DataGroupUniform electric field in Cartesian basis.
This input fixes the electric field vector, in Cartesian basis, so that the field has same value and direction everywhere. This input is meant for testing purposes or for disabling electric field in simulations. To disable electric field, use
write_hdf5_dummy().- 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.
This dummy input sets electric field to zero everywhere.
- Returns:
- data
dict Input data that can be passed to
write_hdf5method 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, exyz, desc=None)
Write input data to the HDF5 file.
- Parameters:
- fn
str Full path to the HDF5 file.
- exyzarray_like (3,1)
Electric field value in cartesian coordinates [V/m].
- desc
str,optional Input description.
- fn
- Returns:
- name
str Name, i.e. “<type>_<qid>”, of the new input that was written.
- name
- Raises:
ValueErrorIf inputs were not consistent.
- class a5py.ascot5io.efield.E_1DS(root, path, **kwargs)
Bases:
DataGroupOne-dimensional electric field interpolated with cubic splines.
This input tabulates the gradient of the electric field potential with respect to minor radius on 1D (radial) grid which is then interpolated with splines during the simulation.
- 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.
This dummy input sets electric field to zero everywhere.
- Returns:
- data
dict Input data that can be passed to
write_hdf5method 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, nrho, rhomin, rhomax, dvdrho, reff, desc=None)
Write input data to the HDF5 file.
- Parameters:
- fn
str Full path to the HDF5 file.
- nrho
int Number of rho slots in data.
- rhomin
float Minimum rho value.
- rhomax
float Maximum rho value.
- dvdrhoarray_like (nrho,1)
Derivative of electric potential with respect to minor radius [V/m].
If
reff = 1 m, this is essentially equal todv/dr.- reff
float Effective minor radius of the plasma used to convert
dv/drhoto SI units asdrho/dr=1/reff[m].- desc
str,optional Input description.
- fn
- Returns:
- name
str Name, i.e. “<type>_<qid>”, of the new input that was written.
- name
- Raises:
ValueErrorIf inputs were not consistent.