15 integer,
parameter,
public ::
td_eta = 4
21 type(lt_t),
public,
protected ::
td_tbl
46 integer :: n_mobile_ions
47 real(dp),
allocatable :: mobilities(:)
48 character(len=af_nlen),
allocatable :: names(:)
49 end type ion_transport_t
67 type(cfg_t),
intent(inout) :: cfg
69 real(dp),
allocatable :: xx(:), yy(:)
70 real(dp),
allocatable :: energy_ev(:), field_td(:)
71 real(dp) :: dummy_real(0), max_td, max_ev, rel_err
72 character(len=10) :: dummy_string(0)
75 call cfg_add_get(cfg,
"input_data%file", td_file, &
76 "Input file with transport (and reaction) data")
77 if (td_file ==
undefined_str) error stop
"input_data%file undefined"
79 call cfg_add_get(cfg,
"input_data%old_style",
td_old_style, &
80 "Use old style transport data (alpha, eta, mu, D vs V/m)")
82 print *,
'Approximate relative lookup table interpolation errors:'
87 error stop
"Old style transport used with varying gas density"
89 error stop
"Old style transport used with energy equation"
106 write(*,
'(A30,F12.4)')
'Mobility:', rel_err
112 write(*,
'(A30,F12.4)')
'Diffusion coefficient:', rel_err
119 write(*,
'(A30,F12.4)')
'Ionization coefficient:', rel_err
126 write(*,
'(A30,F12.4)')
'Attachment coefficient:', rel_err
132 max_td = xx(
size(xx))
141 write(*,
'(A30,F12.4)')
'Mobility:', rel_err
146 write(*,
'(A30,F12.4)')
'Diffusion coefficient:', rel_err
151 write(*,
'(A30,F12.4)')
'Ionization coefficient:', rel_err
156 write(*,
'(A30,F12.4)')
'Attachment coefficient:', rel_err
167 max_ev = energy_ev(
size(energy_ev))
171 if (.not. same_data(xx, field_td)) &
172 error stop
"Same reduced field table required in all input data"
181 [0.0_dp, energy_ev], [0.0_dp, yy])
183 call table_from_file(td_file,
"Diffusion coefficient *N (1/m/s)", xx, yy)
184 if (.not. same_data(xx, field_td)) &
185 error stop
"Same reduced field table required in all input data"
189 [0.0_dp, energy_ev], [0.0_dp, yy])
192 [0.0_dp, energy_ev], [0.0_dp, xx])
195 call cfg_add(cfg,
"input_data%mobile_ions", dummy_string, &
196 "List of ions that are considered mobile", .true.)
197 call cfg_add(cfg,
"input_data%ion_mobilities", dummy_real, &
198 "List of ion mobilities (m^2/Vs) at 1 bar, 300 K", .true.)
200 call cfg_get_size(cfg,
"input_data%mobile_ions", n)
207 call cfg_get(cfg,
"input_data%ion_mobilities", &
211 error stop
"Ion mobilities should be given as positive numbers"
217 call cfg_add_get(cfg,
"input_data%ion_se_yield",
ion_se_yield, &
218 "Secondary electron emission yield for positive ions")
223 pure logical function same_data(x1, x2)
224 real(dp),
intent(in) :: x1(:), x2(:)
226 if (
size(x1) ==
size(x2))
then
227 same_data = minval(abs(x1-x2)) <
tiny_real
231 end function same_data
Module that stores parameters related to the gas.
real(dp), parameter, public townsend_to_si
real(dp), parameter, public si_to_townsend
logical, public, protected gas_constant_density
Whether the gas has a constant density.
real(dp), public, protected gas_number_density
Module to set the type of model.
logical, public, protected model_has_energy_equation
Whether the model has an energy equation.
Module for cubic spline interpolation.
Module with settings and routines for tabulated data.
subroutine, public table_set_column(tbl, i_col, x, y, max_err)
Interpolate data and store in lookup table.
real(dp), public, protected table_max_townsend
Maximum field (Td) for lookup tables.
integer, public, protected table_xspacing
X-spacing for lookup table.
integer, public, protected table_size
How large lookup tables should be.
subroutine, public table_from_file(file_name, data_name, x_data, y_data)
Routine to read in tabulated data from a file.
real(dp), public, protected table_min_townsend
Minimum field (Td) for lookup tables.
Module that provides routines for reading in arbritrary transport data.
real(dp), public, protected td_max_ev
Maximal energy (eV) in input data (automatically updated)
subroutine, public transport_data_initialize(cfg)
Initialize the transport coefficients.
real(dp), public, protected ion_se_yield
Secondary electron emission yield for positive ions.
type(lt_t), public, protected td_tbl
integer, parameter, public td_diffusion
Electron diffusion constant.
integer, parameter, public td_eta
Attachment coefficient.
integer, public, protected td_ee_field
Field as a function of energy.
integer, public, protected td_ee_diffusion
Electron diffusion coefficient as a function of energy.
integer, public, protected td_energy_ev
Electron energy in eV (used with chemistry)
integer, public, protected td_ee_mobility
Electron mobility as a function of energy.
integer, parameter, public td_alpha
Ionization coefficient.
logical, public, protected td_old_style
Whether old style transport data is used (alpha, eta, mu, D vs V/m)
integer, parameter, public td_mobility
Electron mobility.
type(lt_t), public, protected td_ee_tbl
integer, public, protected td_ee_loss
Electron energy loss.
type(ion_transport_t), public transport_data_ions
character(len= *), parameter undefined_str
Undefined string.
real(dp), parameter tiny_real
Small number.
Module that contains physical and numerical constants.
real(dp), parameter uc_boltzmann_const