3#include "../afivo/src/cpp_macros.h"
16 character(len=string_len),
public,
protected ::
output_name =
"output/my_sim"
19 character(len=af_nlen),
allocatable :: output_only(:)
22 real(dp),
public,
protected ::
output_dt = 1.0e-10_dp
25 logical,
protected :: output_regression_test = .false.
94 real(dp) :: density_threshold = 1e18_dp
97 integer :: n_extra_vars = 0
100 integer :: output_max_lvl = 100
103 character(len=af_nlen) :: output_extra_vars(100)
106 logical :: output_electron_energy = .false.
109 logical :: output_conductivity = .false.
112 logical :: output_electron_current = .false.
115 type(lt_t) :: ev_vs_fld
129 type(af_t),
intent(inout) :: tree
130 type(cfg_t),
intent(inout) :: cfg
131 character(len=name_len),
allocatable :: varname(:)
132 character(len=af_nlen) :: empty_names(0)
134 character(len=string_len) :: td_file
135 real(dp),
allocatable :: x_data(:), y_data(:)
138 call cfg_add_get(cfg,
"output%name",
output_name, &
139 "Name for the output files (e.g. output/my_sim)")
140 call cfg_add_get(cfg,
"output%dt",
output_dt, &
141 "The timestep for writing output (s)")
142 call cfg_add_get(cfg,
"silo_write",
silo_write, &
145 "Write silo output files every N outputs")
147 "Write binary output files (to resume later)")
149 "Write binary output files every N outputs")
150 call cfg_add_get(cfg,
"output%electron_energy", output_electron_energy, &
151 "Show the electron energy in eV from the local field approximation")
152 call cfg_add_get(cfg,
"output%conductivity", output_conductivity, &
153 "Output the conductivity of the plasma")
158 call cfg_add_get(cfg,
"output%electron_current", output_electron_current, &
159 "Output the electron conduction current (can also be computed in &
160 &Visit as -gradient(phi) * sigma)")
162 "Write output along a line")
165 call cfg_add(cfg,
"lineout%varname", [
"e"], &
166 "Names of variable to write in lineout", dynamic_size=.true.)
167 call cfg_get_size(cfg,
"lineout%varname", n)
169 call cfg_get(cfg,
"lineout%varname", varname)
173 lineout_ivar(i) = af_find_cc_variable(tree, trim(varname(i)))
178 "Use this many points for lineout data")
179 call cfg_add_get(cfg,
"lineout%rmin",
lineout_rmin(1:ndim), &
180 "Relative position of line minimum coordinate")
181 call cfg_add_get(cfg,
"lineout%rmax",
lineout_rmax(1:ndim), &
182 "Relative position of line maximum coordinate")
186 "Print status every this many seconds")
187 call cfg_add_get(cfg,
"output%max_lvl", output_max_lvl, &
188 "Maximum refinement level for output, to reduce file size")
189 call cfg_add_get(cfg,
"output%dt_factor_pulse_off", &
191 "Reduce output frequency with this factor when the voltage is off")
192 call cfg_add_get(cfg,
"output%regression_test", output_regression_test, &
193 "Write to a log file for regression testing")
194 call cfg_add_get(cfg,
"output%density_threshold", density_threshold, &
195 "Electron density threshold for detecting plasma regions &
196 &(1/m3, will be scaled by gas density)")
197 call cfg_add(cfg,
"output%only", empty_names, &
198 "If defined, only output these variables", .true.)
200 call cfg_get_size(cfg,
"output%only", n)
201 allocate(output_only(n))
202 call cfg_get(cfg,
"output%only", output_only)
204 if (
size(output_only) > 0)
then
205 tree%cc_write_output(:) = .false.
206 do n = 1,
size(output_only)
207 i = af_find_cc_variable(tree, trim(output_only(n)))
208 tree%cc_write_output(i) = .true.
212 call cfg_add_get(cfg,
"cross%write",
cross_write, &
213 "Write integral over cross-section data output")
214 call cfg_add_get(cfg,
"cross%rmax",
cross_rmax, &
215 "Integrate up to this r value")
217 "Use this many points for cross-section data")
219 call cfg_add_get(cfg,
"plane%write",
plane_write, &
220 "Write uniform output in a plane")
223 call cfg_add(cfg,
"plane%varname", [
"e"], &
224 "Names of variable to write in a plane", dynamic_size=.true.)
226 call cfg_get_size(cfg,
"plane%varname", n)
228 call cfg_get(cfg,
"plane%varname", varname)
232 plane_ivar(i) = af_find_cc_variable(tree, trim(varname(i)))
237 "Use this many pixels for plane data")
238 call cfg_add_get(cfg,
"plane%rmin",
plane_rmin(1:ndim), &
239 "Relative position of plane minimum coordinate")
240 call cfg_add_get(cfg,
"plane%rmax",
plane_rmax(1:ndim), &
241 "Relative position of plane maximum coordinate")
245 "Output electric field maxima and their locations")
247 "Threshold value (V/m) for electric field maxima")
249 "Minimal distance (m) between electric field maxima")
251 if (output_electron_energy)
then
252 n_extra_vars = n_extra_vars + 1
253 output_extra_vars(n_extra_vars) =
"eV"
258 call cfg_get(cfg,
"input_data%file", td_file)
265 if (output_conductivity)
then
266 n_extra_vars = n_extra_vars + 1
267 output_extra_vars(n_extra_vars) =
"sigma"
270 if (output_electron_current)
then
272 n_extra_vars = n_extra_vars + 1
273 write(output_extra_vars(n_extra_vars),
"(A,I0)")
"Je_", i
277 call cfg_add(cfg,
"output%write_source", empty_names, &
278 "Write chemistry source terms of these species to output", &
280 call cfg_get_size(cfg,
"output%write_source", n)
282 call cfg_get(cfg,
"output%write_source", varname)
285 n_extra_vars = n_extra_vars + 1
286 output_extra_vars(n_extra_vars) =
"src_" // trim(varname(i))
295 type(af_t),
intent(in) :: tree
296 character(len=string_len) :: fname
300 call output_stoichiometric_matrix(trim(
output_name)//
"_stoich_matrix.txt")
301 call output_chemical_species(trim(
output_name)//
"_species.txt")
302 call output_chemical_reactions(trim(
output_name)//
"_reactions.txt")
303 call output_chemical_rates(trim(
output_name)//
"_rates.txt", .true.)
304 call output_chemical_amounts(tree, trim(
output_name)//
"_amounts.txt", .true.)
313 type(af_t),
intent(inout) :: tree
314 integer,
intent(in) :: output_cnt
315 real(dp),
intent(in) :: wc_time
317 subroutine write_sim_data(my_unit)
318 integer,
intent(in) :: my_unit
319 end subroutine write_sim_data
321 character(len=string_len) :: fname
324 call af_loop_box(tree, set_power_density_box)
328 call af_loop_box(tree, set_gas_primitives_box)
339 call af_restrict_tree(tree, [
i_rhs])
340 call af_gc_tree(tree, [
i_rhs])
342 write(fname,
"(A,I6.6)") trim(
output_name) //
"_", output_cnt
343 if (n_extra_vars > 0)
then
344 call af_write_silo(tree, fname, output_cnt,
global_time, &
345 add_vars=add_variables, &
346 add_names=output_extra_vars(1:n_extra_vars), &
347 max_lvl=output_max_lvl)
349 call af_write_silo(tree, fname, output_cnt,
global_time, &
350 max_lvl=output_max_lvl)
356 call af_write_tree(tree, fname, write_sim_data)
359 write(fname,
"(A,I6.6)") trim(
output_name) //
"_log.txt"
363 call output_log(tree, fname, output_cnt, wc_time)
366 call output_chemical_rates(trim(
output_name)//
"_rates.txt", .false.)
367 call output_chemical_amounts(tree, trim(
output_name)//
"_amounts.txt", .false.)
369 if (output_regression_test)
then
370 write(fname,
"(A,I6.6)") trim(
output_name) //
"_rtest.log"
371 call output_regression_log(tree, fname, output_cnt, wc_time)
376 "_Emax_", output_cnt,
".txt"
377 call output_fld_maxima(tree, fname)
383 "_plane_", output_cnt
384 call af_write_plane(tree, fname,
plane_ivar, &
404 "_cross_", output_cnt
405 call output_cross(tree, fname)
412 subroutine add_variables(box, new_vars, n_var)
416 type(box_t),
intent(in) :: box
417 integer,
intent(in) :: n_var
418 real(dp) :: new_vars(dtimes(0:box%n_cell+1), n_var)
419 integer :: n, nc, n_cells, i_species, idim
420 character(len=name_len) :: species_name
421 real(dp) :: n_inv(dtimes(0:box%n_cell+1))
422 real(dp) :: td(dtimes(0:box%n_cell+1))
423 real(dp) :: sigma(dtimes(1:box%n_cell))
424 real(dp) :: e_vector(dtimes(1:box%n_cell), ndim)
425 real(dp) :: dens((box%n_cell+2)**ndim,
n_species)
426 real(dp) :: rates((box%n_cell+2)**ndim,
n_reactions)
427 real(dp) :: derivs((box%n_cell+2)**ndim,
n_species)
428 logical :: have_derivs
438 have_derivs = .false.
440 n_cells = (nc+2)**ndim
443 select case (output_extra_vars(n))
446 new_vars(dtimes(:), n) = lt_get_col(ev_vs_fld, 1, td)
456 e_vector = field_get_e_vector(box)
458 td(dtimes(1:nc))) * n_inv * box%cc(dtimes(1:nc),
i_electron) * &
461 new_vars(dtimes(1:nc), n+idim-1) = sigma * e_vector(dtimes(:), idim)
470 if (.not. have_derivs)
then
471 call get_rates(pack(td, .true.), rates, n_cells)
482 species_name = trim(output_extra_vars(n)(5:))
485 if (i_species == -1)
then
486 print *,
"No species corresponding to ", species_name
487 error stop
"Error adding time derivative to output"
489 new_vars(dtimes(:), n) = reshape(derivs(:, i_species), &
494 end subroutine add_variables
503 type(af_t),
intent(in) :: tree
504 character(len=*),
intent(in) :: filename
505 integer,
intent(in) :: out_cnt
506 real(dp),
intent(in) :: wc_time
507 character(len=50),
save :: fmt
508 integer :: my_unit, n
509 real(dp) :: velocity, dt
510 real(dp),
save :: prev_pos(ndim) = 0
511 real(dp) :: sum_elec, sum_pos_ion
512 real(dp) :: max_elec, max_field, max_er, min_er
513 real(dp) :: sum_elem_charge, tmp, ne_zminmax(2)
514 real(dp) :: elecdens_threshold, max_field_tip
515 real(dp) :: r0(ndim), r1(ndim), r_tip(ndim)
516 type(af_loc_t) :: loc_elec, loc_field, loc_er, loc_tip
517 integer :: i, n_reals, n_user_vars
520 logical,
save :: first_time = .true.
525 write(var_names,
"(A,I0)")
"uservar_", i
532 call af_tree_sum_cc(tree,
i_electron, sum_elec)
533 call af_tree_sum_cc(tree,
i_1pos_ion, sum_pos_ion)
534 call af_tree_max_cc(tree,
i_electron, max_elec, loc_elec)
536 call af_tree_max_fc(tree, 1,
electric_fld, max_er, loc_er)
540 elecdens_threshold = density_threshold * &
541 (gas_number_density/2.414e25_dp)**2
560 max_field_tip, loc_tip)
562 if (loc_tip%id > 0)
then
563 r_tip = af_r_loc(tree, loc_tip)
578 sum_elem_charge = sum_elem_charge + tmp
585 open(newunit=my_unit, file=trim(filename), action=
"write")
587 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
588 &sum(charge) sum(J.E) max(E) x max(n_e) x voltage current_J.E &
589 ¤t_displ ne_zmin ne_zmax &
590 &max(Etip) x wc_time n_cells min(dx) dt_cfl dt_diff dt_drt dt_chem &
593 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
594 &sum(charge) sum(J.E) max(E) x y max(n_e) x y max(E_r) x y min(E_r) &
595 &voltage current_J.E current_displ &
596 &ne_zmin ne_zmax max(Etip) x y wc_time n_cells min(dx) &
597 &dt_cfl dt_diff dt_drt dt_chem highest(lvl)"
599 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
600 &sum(charge) sum(J.E) max(E) x y z max(n_e) x y z voltage &
601 ¤t_J.E current_displ &
602 &ne_zmin ne_zmax max(Etip) x y z wc_time n_cells min(dx) &
603 &dt_cfl dt_diff dt_drt dt_chem highest(lvl)"
606 do i = 1, n_user_vars
607 write(my_unit,
"(A)", advance=
"no")
" "//trim(var_names(i))
614 prev_pos = af_r_loc(tree, loc_field)
626 write(fmt,
"(A,I0,A,I0,A)")
"(I6,", n_reals,
"E20.8e3,I12,5E20.8e3,I3,", &
627 n_user_vars,
"E20.8e3)"
629 write(fmt,
"(A,I0,A)")
"(I6,", n_reals,
"E20.8e3,I12,5E20.8e3,I3)"
632 velocity = norm2(af_r_loc(tree, loc_field) - prev_pos) /
output_dt
633 prev_pos = af_r_loc(tree, loc_field)
635 open(newunit=my_unit, file=trim(filename), action=
"write", &
638 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
640 max_field, af_r_loc(tree, loc_field), max_elec, &
643 max_field_tip, r_tip, &
644 wc_time, af_num_cells_used(tree), &
646 tree%highest_lvl, var_values(1:n_user_vars)
648 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
650 max_field, af_r_loc(tree, loc_field), max_elec, &
651 af_r_loc(tree, loc_elec), max_er, af_r_loc(tree, loc_er), min_er, &
654 wc_time, af_num_cells_used(tree), af_min_dr(tree), &
656 var_values(1:n_user_vars)
658 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
660 max_field, af_r_loc(tree, loc_field), max_elec, &
663 max_field_tip, r_tip, &
664 wc_time, af_num_cells_used(tree), &
666 tree%highest_lvl, var_values(1:n_user_vars)
673 subroutine output_stoichiometric_matrix(filename)
675 character(len=*),
intent(in) :: filename
676 integer :: my_unit, m, i, ix
677 integer,
allocatable :: stoich(:,:)
686 stoich(m, ix) = stoich(m, ix) - 1
692 stoich(m, ix) = stoich(m, ix) + &
697 open(newunit=my_unit, file=trim(filename), action=
"write")
699 write(my_unit, *) stoich(:, i)
703 end subroutine output_stoichiometric_matrix
706 subroutine output_chemical_species(filename)
708 character(len=*),
intent(in) :: filename
709 integer :: my_unit, i
711 open(newunit=my_unit, file=trim(filename), action=
"write")
715 write(my_unit,
"(A)")
""
717 end subroutine output_chemical_species
720 subroutine output_chemical_reactions(filename)
722 character(len=*),
intent(in) :: filename
723 integer :: my_unit, i
725 open(newunit=my_unit, file=trim(filename), action=
"write")
727 write(my_unit,
"(A)")
reactions(i)%description
729 write(my_unit,
"(A)")
""
731 end subroutine output_chemical_reactions
734 subroutine output_chemical_rates(filename, first_time)
736 character(len=*),
intent(in) :: filename
737 logical,
intent(in) :: first_time
738 integer :: my_unit, iostate
742 open(newunit=my_unit, file=trim(filename), iostat=iostate)
743 if (iostate == 0)
close(my_unit, status=
'delete')
745 open(newunit=my_unit, file=trim(filename), action=
"write", &
750 end subroutine output_chemical_rates
753 subroutine output_chemical_amounts(tree, filename, first_time)
755 type(af_t),
intent(in) :: tree
756 character(len=*),
intent(in) :: filename
757 logical,
intent(in) :: first_time
758 integer :: my_unit, n, iostate
763 open(newunit=my_unit, file=trim(filename), iostat=iostate)
764 if (iostate == 0)
close(my_unit, status=
'delete')
774 open(newunit=my_unit, file=trim(filename), action=
"write", &
780 end subroutine output_chemical_amounts
783 subroutine output_regression_log(tree, filename, out_cnt, wc_time)
785 type(af_t),
intent(in) :: tree
786 character(len=*),
intent(in) :: filename
787 integer,
intent(in) :: out_cnt
788 real(dp),
intent(in) :: wc_time
789 character(len=30) :: fmt
790 integer :: my_unit, n
796 vol = af_total_volume(tree)
800 call af_tree_sum_cc(tree,
species_itree(n), sum_dens_sq(n), power=2)
805 sum_dens_sq(n) = 0.0_dp
810 if (out_cnt == 0)
then
811 open(newunit=my_unit, file=trim(filename), action=
"write")
812 write(my_unit,
"(A)", advance=
"no")
"it time dt"
814 write(my_unit,
"(A)", advance=
"no") &
818 write(my_unit,
"(A)", advance=
"no") &
822 write(my_unit,
"(A)", advance=
"no") &
825 write(my_unit,
"(A)")
""
829 write(fmt,
"(A,I0,A)")
"(I0,", 3+3*
n_species,
"E20.8e3)"
831 open(newunit=my_unit, file=trim(filename), action=
"write", &
834 sum_dens/vol, sum_dens_sq/vol, max_dens
837 end subroutine output_regression_log
839 subroutine check_path_writable(pathname)
840 character(len=*),
intent(in) :: pathname
841 integer :: my_unit, iostate
842 open(newunit=my_unit, file=trim(pathname)//
"_DUMMY", iostat=iostate)
843 if (iostate /= 0)
then
844 print *,
"Output name: " // trim(pathname) //
'_...'
845 error stop
"Directory not writable (does it exist?)"
847 close(my_unit, status=
'delete')
849 end subroutine check_path_writable
854 type(af_t),
intent(in) :: tree
855 real(dp),
intent(in) :: time
856 real(dp),
intent(in) :: wc_time
857 integer,
intent(in) :: it
858 real(dp),
intent(in) :: dt
859 write(*,
"(F7.2,A,I0,A,E10.3,A,E10.3,A,E10.3,A,E10.3)") &
861 " t:", time,
" dt:", dt,
" wc:", wc_time, &
862 " ncell:", real(af_num_cells_used(tree), dp)
865 write(*,
"(A,4E10.3,A)")
" dt: ", &
869 subroutine output_fld_maxima(tree, filename)
871 type(af_t),
intent(in) :: tree
872 character(len=*),
intent(in) :: filename
873 integer :: my_unit, i, n, n_found
874 integer,
parameter :: n_max = 1000
875 real(dp) :: coord_val(ndim+1, n_max), d
879 n_max, coord_val, n_found)
881 if (n_found > n_max)
then
882 print *,
"output_fld_maxima warning: n_found > n_max"
883 print *,
"n_found = ", n_found,
"n_max = ", n_max
888 do n = n_found, 1, -1
890 d = norm2(coord_val(1:ndim, i) - coord_val(1:ndim, n))
894 if (coord_val(ndim+1, i) < coord_val(ndim+1, n))
then
895 coord_val(:, i) = coord_val(:, n)
897 coord_val(:, n) = coord_val(:, n_found)
898 n_found = n_found - 1
904 open(newunit=my_unit, file=trim(filename), action=
"write")
907 write(my_unit, *) coord_val(:, n)
912 end subroutine output_fld_maxima
915 subroutine output_cross(tree, filename)
919 type(af_t),
intent(in) :: tree
920 character(len=*),
intent(inout) :: filename
924 real(dp) :: z, elec_dens, charge_dens, current_dens
926 open(newunit=my_unit, file=trim(filename)//
".txt", action=
"write")
927 write(my_unit,
'(A)')
"z elec_dens charge_dens current_dens"
932 charge_dens, current_dens)
933 write(my_unit, *) z, elec_dens, charge_dens, current_dens
937 end subroutine output_cross
940 subroutine set_power_density_box(box)
941 type(box_t),
intent(inout) :: box
948 j_dot_e = 0.5_dp * sum(box%fc(ijk, :, flux_elec) * box%fc(ijk, :, electric_fld))
950 j_dot_e = j_dot_e + 0.5_dp * (&
951 box%fc(i+1, 1, flux_elec) * box%fc(i+1, 1, electric_fld))
953 j_dot_e = j_dot_e + 0.5_dp * (&
954 box%fc(i+1, j, 1, flux_elec) * box%fc(i+1, j, 1, electric_fld) + &
955 box%fc(i, j+1, 2, flux_elec) * box%fc(i, j+1, 2, electric_fld))
957 j_dot_e = j_dot_e + 0.5_dp * (&
958 box%fc(i+1, j, k, 1, flux_elec) * box%fc(i+1, j, k, 1, electric_fld) + &
959 box%fc(i, j+1, k, 2, flux_elec) * box%fc(i, j+1, k, 2, electric_fld) + &
960 box%fc(i, j, k+1, 3, flux_elec) * box%fc(i, j, k+1, 3, electric_fld))
965 end subroutine set_power_density_box
967 subroutine set_gas_primitives_box(box)
968 type(box_t),
intent(inout) :: box
969 integer :: ijk, nc, idim
975 box%cc(ijk, gas_prim_vars(i_mom(idim))) = &
976 box%cc(ijk, gas_vars(i_mom(idim))) / box%cc(ijk, gas_vars(i_rho))
980 box%cc(ijk, gas_prim_vars(i_e)) = (gas_euler_gamma-1.0_dp) * (box%cc(ijk,gas_vars( i_e)) - &
981 0.5_dp*box%cc(ijk,gas_vars( i_rho))* sum(box%cc(ijk, gas_vars(i_mom(:)))**2))
983 box%cc(ijk, gas_prim_vars(i_e+1)) = box%cc(ijk, gas_prim_vars(i_e))/ &
984 (box%cc(ijk, i_gas_dens)* uc_boltzmann_const)
987 end subroutine set_gas_primitives_box
Module with routines to help analyze simulations.
subroutine, public analysis_max_var_region(tree, iv, r0, r1, max_value, loc)
Find maximal value for boxes that are (at least partially) in the rectangle from r0 to r1.
subroutine, public analysis_get_cross(tree, rmax, z, elec_dens, charge_dens, current_dens)
Get integrated quantities of an axisymmetric streamer at a z-coordinate.
subroutine, public analysis_zmin_zmax_threshold(tree, iv, threshold, limits, z_minmax)
Find minimum and maximum z coordinate where a variable exceeds a threshold.
subroutine, public analysis_get_maxima(tree, iv, threshold, n_max, coord_val, n_found)
Find at most n_max maxima of a variable. Maxima are determined by looking at the direct neighbors.
Module for handling chemical reactions.
subroutine, public chemistry_write_summary(fname)
Write a summary of the reactions (TODO) and the ionization and attachment coefficients (if working at...
integer, dimension(max_num_species), public, protected species_charge
Charge of the species.
subroutine, public get_rates(fields, rates, n_cells, energy_ev)
Compute reaction rates.
subroutine, public get_derivatives(dens, rates, derivs, n_cells)
Compute derivatives due to chemical reactions. Note that the 'rates' argument is modified.
integer, dimension(max_num_species), public, protected species_itree
species_itree(n) holds the index of species n in the tree (cell-centered variables)
character(len=comp_len), dimension(max_num_species), public, protected species_list
List of the species.
integer, public, protected n_species
Number of species present.
integer, public, protected n_plasma_species
Number of plasma species present.
elemental integer function, public species_index(name)
Find index of a species, return -1 if not found.
type(reaction_t), dimension(max_num_reactions), public, protected reactions
List of reactions.
integer, public, protected n_gas_species
Number of gas species present.
integer, public, protected n_reactions
Number of reactions present.
Module with settings and routines to handle dielectrics.
integer, parameter, public i_surf_dens
type(surfaces_t), public diel
To store dielectric surface.
Module to set the time step.
real(dp), dimension(dt_num_cond), public dt_limits
Module to compute electric fields.
subroutine, public field_set_rhs(tree, s_in)
real(dp), public, protected current_voltage
The current applied voltage.
Module that stores parameters related to the gas.
logical, public, protected gas_dynamics
Whether the gas dynamics are simulated.
integer, public, protected i_gas_dens
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 with methods and parameters related to writing output.
real(dp), public, protected field_maxima_distance
real(dp), dimension(3), public, protected lineout_rmin
integer, public, protected cross_npoints
integer, public, protected output_dt_factor_pulse_off
real(dp), public, protected cross_rmax
logical, public, protected plane_write
logical, public, protected datfile_write
subroutine, public output_status(tree, time, wc_time, it, dt)
Print short status message.
logical, public, protected field_maxima_write
real(dp), public, protected output_dt
integer, public, protected datfile_per_outputs
integer, public, protected silo_per_outputs
subroutine, public output_initial_summary(tree)
Write a summary of the model and parameters used.
character(len=string_len), public, protected output_name
real(dp), dimension(ndim), public, protected plane_rmax
integer, public, protected lineout_npoints
integer, dimension(:), allocatable, public, protected plane_ivar
real(dp), public, protected output_status_delay
logical, public, protected silo_write
logical, public, protected cross_write
subroutine, public output_log(tree, filename, out_cnt, wc_time)
logical, public, protected lineout_write
integer, dimension(:), allocatable, public, protected lineout_ivar
real(dp), dimension(3), public, protected lineout_rmax
integer, dimension(2), public, protected plane_npixels
real(dp), dimension(ndim), public, protected plane_rmin
subroutine, public output_initialize(tree, cfg)
subroutine, public output_write(tree, output_cnt, wc_time, write_sim_data)
real(dp), public, protected field_maxima_threshold
Top-module for photoionization, which can make use of different methods.
This module contains several pre-defined variables like:
logical, public, protected st_cylindrical
Whether cylindrical coordinates are used.
real(dp), dimension(:), allocatable, public st_global_rates
Global sum of reaction rates.
real(dp), public st_global_jdote_current
Electric current through electrodes due to J.E.
real(dp), public global_dt
Global time step.
real(dp), public global_time
Global time.
logical, public, protected st_use_dielectric
Whether a dielectric is used.
integer, public, protected i_electron
Index of electron density.
integer, public, protected electric_fld
Index of electric field vector.
integer, public, protected i_rhs
Index of source term Poisson.
integer, public, protected i_1pos_ion
Index of first positive ion species.
real(dp), public st_global_jdote
Global sum of J.E.
integer, public, protected i_electric_fld
Index of electric field norm.
real(dp), dimension(ndim), public, protected st_domain_len
Domain length per dimension.
real(dp), public, protected st_end_time
End time of the simulation.
real(dp), dimension(ndim), public, protected st_domain_origin
Origin of domain.
integer, dimension(:), allocatable, public, protected all_densities
Index of all densities that evolve in time.
logical, public, protected compute_power_density
Include deposited power density in output.
real(dp), public st_global_displ_current
Electric current through electrodes due to displacement current.
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.
type(lt_t), public, protected td_tbl
integer, parameter, public td_mobility
Electron mobility.
Module that contains physical and numerical constants.
real(dp), parameter uc_elem_charge
real(dp), parameter uc_elec_charge
This module contains all the methods that users can customize.
integer, parameter user_max_log_vars
procedure(log_subr), pointer user_write_log
To write a custom log file.
procedure(log_vars), pointer user_log_variables
To add entries to the log file.