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
28 logical,
protected :: output_regression_test = .false.
97 real(dp) :: density_threshold = 1e18_dp
100 integer :: n_extra_vars = 0
103 integer :: output_max_lvl = 100
106 character(len=af_nlen) :: output_extra_vars(100)
109 logical :: output_electron_energy = .false.
112 logical :: output_conductivity = .false.
115 logical :: output_electron_current = .false.
118 type(lt_t) :: ev_vs_fld
132 type(af_t),
intent(inout) :: tree
133 type(cfg_t),
intent(inout) :: cfg
134 character(len=name_len),
allocatable :: varname(:)
135 character(len=af_nlen) :: empty_names(0)
137 character(len=string_len) :: td_file
138 real(dp),
allocatable :: x_data(:), y_data(:)
141 call cfg_add_get(cfg,
"output%name",
output_name, &
142 "Name for the output files (e.g. output/my_sim)")
143 call cfg_add_get(cfg,
"output%dt",
output_dt, &
144 "The timestep for writing output (s)")
145 call cfg_add_get(cfg,
"output%dit",
output_dit, &
146 "Iterations between writing output")
147 call cfg_add_get(cfg,
"silo_write",
silo_write, &
150 "Write silo output files every N outputs")
152 "Write binary output files (to resume later)")
154 "Write binary output files every N outputs")
155 call cfg_add_get(cfg,
"output%electron_energy", output_electron_energy, &
156 "Show the electron energy in eV from the local field approximation")
157 call cfg_add_get(cfg,
"output%conductivity", output_conductivity, &
158 "Output the conductivity of the plasma")
163 call cfg_add_get(cfg,
"output%electron_current", output_electron_current, &
164 "Output the electron conduction current (can also be computed in &
165 &Visit as -gradient(phi) * sigma)")
167 "Write output along a line")
170 call cfg_add(cfg,
"lineout%varname", [
"e"], &
171 "Names of variable to write in lineout", dynamic_size=.true.)
172 call cfg_get_size(cfg,
"lineout%varname", n)
174 call cfg_get(cfg,
"lineout%varname", varname)
178 lineout_ivar(i) = af_find_cc_variable(tree, trim(varname(i)))
183 "Use this many points for lineout data")
184 call cfg_add_get(cfg,
"lineout%rmin",
lineout_rmin(1:ndim), &
185 "Relative position of line minimum coordinate")
186 call cfg_add_get(cfg,
"lineout%rmax",
lineout_rmax(1:ndim), &
187 "Relative position of line maximum coordinate")
191 "Print status every this many seconds")
192 call cfg_add_get(cfg,
"output%max_lvl", output_max_lvl, &
193 "Maximum refinement level for output, to reduce file size")
194 call cfg_add_get(cfg,
"output%dt_factor_pulse_off", &
196 "Reduce output frequency with this factor when the voltage is off")
197 call cfg_add_get(cfg,
"output%regression_test", output_regression_test, &
198 "Write to a log file for regression testing")
199 call cfg_add_get(cfg,
"output%density_threshold", density_threshold, &
200 "Electron density threshold for detecting plasma regions &
201 &(1/m3, will be scaled by gas density)")
202 call cfg_add(cfg,
"output%only", empty_names, &
203 "If defined, only output these variables", .true.)
205 call cfg_get_size(cfg,
"output%only", n)
206 allocate(output_only(n))
207 call cfg_get(cfg,
"output%only", output_only)
209 if (
size(output_only) > 0)
then
210 tree%cc_write_output(:) = .false.
211 do n = 1,
size(output_only)
212 i = af_find_cc_variable(tree, trim(output_only(n)))
213 tree%cc_write_output(i) = .true.
217 call cfg_add_get(cfg,
"cross%write",
cross_write, &
218 "Write integral over cross-section data output")
219 call cfg_add_get(cfg,
"cross%rmax",
cross_rmax, &
220 "Integrate up to this r value")
222 "Use this many points for cross-section data")
224 call cfg_add_get(cfg,
"plane%write",
plane_write, &
225 "Write uniform output in a plane")
228 call cfg_add(cfg,
"plane%varname", [
"e"], &
229 "Names of variable to write in a plane", dynamic_size=.true.)
231 call cfg_get_size(cfg,
"plane%varname", n)
233 call cfg_get(cfg,
"plane%varname", varname)
237 plane_ivar(i) = af_find_cc_variable(tree, trim(varname(i)))
242 "Use this many pixels for plane data")
243 call cfg_add_get(cfg,
"plane%rmin",
plane_rmin(1:ndim), &
244 "Relative position of plane minimum coordinate")
245 call cfg_add_get(cfg,
"plane%rmax",
plane_rmax(1:ndim), &
246 "Relative position of plane maximum coordinate")
250 "Output electric field maxima and their locations")
252 "Threshold value (V/m) for electric field maxima")
254 "Minimal distance (m) between electric field maxima")
256 if (output_electron_energy)
then
257 n_extra_vars = n_extra_vars + 1
258 output_extra_vars(n_extra_vars) =
"eV"
263 call cfg_get(cfg,
"input_data%file", td_file)
270 if (output_conductivity)
then
271 n_extra_vars = n_extra_vars + 1
272 output_extra_vars(n_extra_vars) =
"sigma"
275 if (output_electron_current)
then
277 n_extra_vars = n_extra_vars + 1
278 write(output_extra_vars(n_extra_vars),
"(A,I0)")
"Je_", i
282 call cfg_add(cfg,
"output%write_source", empty_names, &
283 "Write chemistry source terms of these species to output", &
285 call cfg_get_size(cfg,
"output%write_source", n)
287 call cfg_get(cfg,
"output%write_source", varname)
290 n_extra_vars = n_extra_vars + 1
291 output_extra_vars(n_extra_vars) =
"src_" // trim(varname(i))
300 type(af_t),
intent(in) :: tree
301 character(len=string_len) :: fname
305 call output_stoichiometric_matrix(trim(
output_name)//
"_stoich_matrix.txt")
306 call output_chemical_species(trim(
output_name)//
"_species.txt")
307 call output_chemical_reactions(trim(
output_name)//
"_reactions.txt")
308 call output_chemical_rates(trim(
output_name)//
"_rates.txt", .true.)
309 call output_chemical_amounts(tree, trim(
output_name)//
"_amounts.txt", .true.)
318 type(af_t),
intent(inout) :: tree
319 integer,
intent(in) :: output_cnt
320 real(dp),
intent(in) :: wc_time
322 subroutine write_sim_data(my_unit)
323 integer,
intent(in) :: my_unit
324 end subroutine write_sim_data
326 character(len=string_len) :: fname
329 call af_loop_box(tree, set_power_density_box)
333 call af_loop_box(tree, set_gas_primitives_box)
344 call af_restrict_tree(tree, [
i_rhs])
345 call af_gc_tree(tree, [
i_rhs])
347 write(fname,
"(A,I6.6)") trim(
output_name) //
"_", output_cnt
348 if (n_extra_vars > 0)
then
349 call af_write_silo(tree, fname, output_cnt,
global_time, &
350 add_vars=add_variables, &
351 add_names=output_extra_vars(1:n_extra_vars), &
352 max_lvl=output_max_lvl)
354 call af_write_silo(tree, fname, output_cnt,
global_time, &
355 max_lvl=output_max_lvl)
361 call af_write_tree(tree, fname, write_sim_data)
364 write(fname,
"(A,I6.6)") trim(
output_name) //
"_log.txt"
368 call output_log(tree, fname, output_cnt, wc_time)
371 call output_chemical_rates(trim(
output_name)//
"_rates.txt", .false.)
372 call output_chemical_amounts(tree, trim(
output_name)//
"_amounts.txt", .false.)
374 if (output_regression_test)
then
375 write(fname,
"(A,I6.6)") trim(
output_name) //
"_rtest.log"
376 call output_regression_log(tree, fname, output_cnt, wc_time)
381 "_Emax_", output_cnt,
".txt"
382 call output_fld_maxima(tree, fname)
388 "_plane_", output_cnt
389 call af_write_plane(tree, fname,
plane_ivar, &
409 "_cross_", output_cnt
410 call output_cross(tree, fname)
417 subroutine add_variables(box, new_vars, n_var)
421 type(box_t),
intent(in) :: box
422 integer,
intent(in) :: n_var
423 real(dp) :: new_vars(dtimes(0:box%n_cell+1), n_var)
424 integer :: n, nc, n_cells, i_species, idim
425 character(len=name_len) :: species_name
426 real(dp) :: n_inv(dtimes(0:box%n_cell+1))
427 real(dp) :: td(dtimes(0:box%n_cell+1))
428 real(dp) :: sigma(dtimes(1:box%n_cell))
429 real(dp) :: e_vector(dtimes(1:box%n_cell), ndim)
430 real(dp) :: dens((box%n_cell+2)**ndim,
n_species)
431 real(dp) :: rates((box%n_cell+2)**ndim,
n_reactions)
432 real(dp) :: derivs((box%n_cell+2)**ndim,
n_species)
433 logical :: have_derivs
443 have_derivs = .false.
445 n_cells = (nc+2)**ndim
448 select case (output_extra_vars(n))
451 new_vars(dtimes(:), n) = lt_get_col(ev_vs_fld, 1, td)
461 e_vector = field_get_e_vector(box)
463 td(dtimes(1:nc))) * n_inv * box%cc(dtimes(1:nc),
i_electron) * &
466 new_vars(dtimes(1:nc), n+idim-1) = sigma * e_vector(dtimes(:), idim)
475 if (.not. have_derivs)
then
476 call get_rates(pack(td, .true.), rates, n_cells)
487 species_name = trim(output_extra_vars(n)(5:))
490 if (i_species == -1)
then
491 print *,
"No species corresponding to ", species_name
492 error stop
"Error adding time derivative to output"
494 new_vars(dtimes(:), n) = reshape(derivs(:, i_species), &
499 end subroutine add_variables
508 type(af_t),
intent(in) :: tree
509 character(len=*),
intent(in) :: filename
510 integer,
intent(in) :: out_cnt
511 real(dp),
intent(in) :: wc_time
512 character(len=50),
save :: fmt
513 integer :: my_unit, n
514 real(dp) :: velocity, dt
515 real(dp),
save :: prev_pos(ndim) = 0
516 real(dp) :: sum_elec, sum_pos_ion
517 real(dp) :: max_elec, max_field, max_er, min_er
518 real(dp) :: sum_elem_charge, tmp, ne_zminmax(2)
519 real(dp) :: elecdens_threshold, max_field_tip
520 real(dp) :: r0(ndim), r1(ndim), r_tip(ndim)
521 type(af_loc_t) :: loc_elec, loc_field, loc_er, loc_tip
522 integer :: i, n_reals, n_user_vars
525 logical,
save :: first_time = .true.
530 write(var_names,
"(A,I0)")
"uservar_", i
537 call af_tree_sum_cc(tree,
i_electron, sum_elec)
538 call af_tree_sum_cc(tree,
i_1pos_ion, sum_pos_ion)
539 call af_tree_max_cc(tree,
i_electron, max_elec, loc_elec)
541 call af_tree_max_fc(tree, 1,
electric_fld, max_er, loc_er)
545 elecdens_threshold = density_threshold * &
546 (gas_number_density/2.414e25_dp)**2
565 max_field_tip, loc_tip)
567 if (loc_tip%id > 0)
then
568 r_tip = af_r_loc(tree, loc_tip)
583 sum_elem_charge = sum_elem_charge + tmp
590 open(newunit=my_unit, file=trim(filename), action=
"write")
592 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
593 &sum(charge) sum(J.E) max(E) x max(n_e) x voltage current_J.E &
594 ¤t_displ ne_zmin ne_zmax &
595 &max(Etip) x wc_time n_cells min(dx) dt_cfl dt_drt dt_chem dt_other &
598 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
599 &sum(charge) sum(J.E) max(E) x y max(n_e) x y max(E_r) x y min(E_r) &
600 &voltage current_J.E current_displ &
601 &ne_zmin ne_zmax max(Etip) x y wc_time n_cells min(dx) &
602 &dt_cfl dt_drt dt_chem dt_other highest(lvl)"
604 write(my_unit,
"(A)", advance=
"no")
"it time dt v sum(n_e) sum(n_i) &
605 &sum(charge) sum(J.E) max(E) x y z max(n_e) x y z voltage &
606 ¤t_J.E current_displ &
607 &ne_zmin ne_zmax max(Etip) x y z wc_time n_cells min(dx) &
608 &dt_cfl dt_drt dt_chem dt_other highest(lvl)"
611 do i = 1, n_user_vars
612 write(my_unit,
"(A)", advance=
"no")
" "//trim(var_names(i))
619 prev_pos = af_r_loc(tree, loc_field)
631 write(fmt,
"(A,I0,A,I0,A)")
"(I6,", n_reals,
"E20.8e3,I12,5E20.8e3,I3,", &
632 n_user_vars,
"E20.8e3)"
634 write(fmt,
"(A,I0,A)")
"(I6,", n_reals,
"E20.8e3,I12,5E20.8e3,I3)"
637 velocity = norm2(af_r_loc(tree, loc_field) - prev_pos) /
output_dt
638 prev_pos = af_r_loc(tree, loc_field)
640 open(newunit=my_unit, file=trim(filename), action=
"write", &
643 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
645 max_field, af_r_loc(tree, loc_field), max_elec, &
648 max_field_tip, r_tip, &
649 wc_time, af_num_cells_used(tree), &
651 tree%highest_lvl, var_values(1:n_user_vars)
653 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
655 max_field, af_r_loc(tree, loc_field), max_elec, &
656 af_r_loc(tree, loc_elec), max_er, af_r_loc(tree, loc_er), min_er, &
659 wc_time, af_num_cells_used(tree), af_min_dr(tree), &
661 var_values(1:n_user_vars)
663 write(my_unit, fmt) out_cnt,
global_time, dt, velocity, sum_elec, &
665 max_field, af_r_loc(tree, loc_field), max_elec, &
668 max_field_tip, r_tip, &
669 wc_time, af_num_cells_used(tree), &
671 tree%highest_lvl, var_values(1:n_user_vars)
678 subroutine output_stoichiometric_matrix(filename)
680 character(len=*),
intent(in) :: filename
681 integer :: my_unit, m, i, ix
682 integer,
allocatable :: stoich(:,:)
691 stoich(m, ix) = stoich(m, ix) - 1
697 stoich(m, ix) = stoich(m, ix) + &
702 open(newunit=my_unit, file=trim(filename), action=
"write")
704 write(my_unit, *) stoich(:, i)
708 end subroutine output_stoichiometric_matrix
711 subroutine output_chemical_species(filename)
713 character(len=*),
intent(in) :: filename
714 integer :: my_unit, i
716 open(newunit=my_unit, file=trim(filename), action=
"write")
720 write(my_unit,
"(A)")
""
722 end subroutine output_chemical_species
725 subroutine output_chemical_reactions(filename)
727 character(len=*),
intent(in) :: filename
728 integer :: my_unit, i
730 open(newunit=my_unit, file=trim(filename), action=
"write")
732 write(my_unit,
"(A)")
reactions(i)%description
734 write(my_unit,
"(A)")
""
736 end subroutine output_chemical_reactions
739 subroutine output_chemical_rates(filename, first_time)
741 character(len=*),
intent(in) :: filename
742 logical,
intent(in) :: first_time
743 integer :: my_unit, iostate
747 open(newunit=my_unit, file=trim(filename), iostat=iostate)
748 if (iostate == 0)
close(my_unit, status=
'delete')
750 open(newunit=my_unit, file=trim(filename), action=
"write", &
755 end subroutine output_chemical_rates
758 subroutine output_chemical_amounts(tree, filename, first_time)
760 type(af_t),
intent(in) :: tree
761 character(len=*),
intent(in) :: filename
762 logical,
intent(in) :: first_time
763 integer :: my_unit, n, iostate
768 open(newunit=my_unit, file=trim(filename), iostat=iostate)
769 if (iostate == 0)
close(my_unit, status=
'delete')
779 open(newunit=my_unit, file=trim(filename), action=
"write", &
785 end subroutine output_chemical_amounts
788 subroutine output_regression_log(tree, filename, out_cnt, wc_time)
790 type(af_t),
intent(in) :: tree
791 character(len=*),
intent(in) :: filename
792 integer,
intent(in) :: out_cnt
793 real(dp),
intent(in) :: wc_time
794 character(len=30) :: fmt
795 integer :: my_unit, n
801 vol = af_total_volume(tree)
805 call af_tree_sum_cc(tree,
species_itree(n), sum_dens_sq(n), power=2)
810 sum_dens_sq(n) = 0.0_dp
815 if (out_cnt == 0)
then
816 open(newunit=my_unit, file=trim(filename), action=
"write")
817 write(my_unit,
"(A)", advance=
"no")
"it time dt"
819 write(my_unit,
"(A)", advance=
"no") &
823 write(my_unit,
"(A)", advance=
"no") &
827 write(my_unit,
"(A)", advance=
"no") &
830 write(my_unit,
"(A)")
""
834 write(fmt,
"(A,I0,A)")
"(I0,", 3+3*
n_species,
"E20.8e3)"
836 open(newunit=my_unit, file=trim(filename), action=
"write", &
839 sum_dens/vol, sum_dens_sq/vol, max_dens
842 end subroutine output_regression_log
844 subroutine check_path_writable(pathname)
845 character(len=*),
intent(in) :: pathname
846 integer :: my_unit, iostate
847 open(newunit=my_unit, file=trim(pathname)//
"_DUMMY", iostat=iostate)
848 if (iostate /= 0)
then
849 print *,
"Output name: " // trim(pathname) //
'_...'
850 error stop
"Directory not writable (does it exist?)"
852 close(my_unit, status=
'delete')
854 end subroutine check_path_writable
859 type(af_t),
intent(in) :: tree
860 real(dp),
intent(in) :: time
861 real(dp),
intent(in) :: wc_time
862 integer,
intent(in) :: it
863 real(dp),
intent(in) :: dt
864 write(*,
"(F7.2,A,I0,A,E10.3,A,E10.3,A,E10.3,A,E10.3)") &
866 " t:", time,
" dt:", dt,
" wc:", wc_time, &
867 " ncell:", real(af_num_cells_used(tree), dp)
870 write(*,
"(A,4E10.3,A)")
" dt: ", &
874 subroutine output_fld_maxima(tree, filename)
876 type(af_t),
intent(in) :: tree
877 character(len=*),
intent(in) :: filename
878 integer :: my_unit, i, n, n_found
879 integer,
parameter :: n_max = 1000
880 real(dp) :: coord_val(ndim+1, n_max), d
884 n_max, coord_val, n_found)
886 if (n_found > n_max)
then
887 print *,
"output_fld_maxima warning: n_found > n_max"
888 print *,
"n_found = ", n_found,
"n_max = ", n_max
893 do n = n_found, 1, -1
895 d = norm2(coord_val(1:ndim, i) - coord_val(1:ndim, n))
899 if (coord_val(ndim+1, i) < coord_val(ndim+1, n))
then
900 coord_val(:, i) = coord_val(:, n)
902 coord_val(:, n) = coord_val(:, n_found)
903 n_found = n_found - 1
909 open(newunit=my_unit, file=trim(filename), action=
"write")
912 write(my_unit, *) coord_val(:, n)
917 end subroutine output_fld_maxima
920 subroutine output_cross(tree, filename)
924 type(af_t),
intent(in) :: tree
925 character(len=*),
intent(inout) :: filename
929 real(dp) :: z, elec_dens, charge_dens, current_dens
931 open(newunit=my_unit, file=trim(filename)//
".txt", action=
"write")
932 write(my_unit,
'(A)')
"z elec_dens charge_dens current_dens"
937 charge_dens, current_dens)
938 write(my_unit, *) z, elec_dens, charge_dens, current_dens
942 end subroutine output_cross
945 subroutine set_power_density_box(box)
946 type(box_t),
intent(inout) :: box
953 j_dot_e = 0.5_dp * sum(box%fc(ijk, :, flux_elec) * box%fc(ijk, :, electric_fld))
955 j_dot_e = j_dot_e + 0.5_dp * (&
956 box%fc(i+1, 1, flux_elec) * box%fc(i+1, 1, electric_fld))
958 j_dot_e = j_dot_e + 0.5_dp * (&
959 box%fc(i+1, j, 1, flux_elec) * box%fc(i+1, j, 1, electric_fld) + &
960 box%fc(i, j+1, 2, flux_elec) * box%fc(i, j+1, 2, electric_fld))
962 j_dot_e = j_dot_e + 0.5_dp * (&
963 box%fc(i+1, j, k, 1, flux_elec) * box%fc(i+1, j, k, 1, electric_fld) + &
964 box%fc(i, j+1, k, 2, flux_elec) * box%fc(i, j+1, k, 2, electric_fld) + &
965 box%fc(i, j, k+1, 3, flux_elec) * box%fc(i, j, k+1, 3, electric_fld))
970 end subroutine set_power_density_box
972 subroutine set_gas_primitives_box(box)
973 type(box_t),
intent(inout) :: box
974 integer :: ijk, nc, idim
980 box%cc(ijk, gas_prim_vars(i_mom(idim))) = &
981 box%cc(ijk, gas_vars(i_mom(idim))) / box%cc(ijk, gas_vars(i_rho))
985 box%cc(ijk, gas_prim_vars(i_e)) = (gas_euler_gamma-1.0_dp) * (box%cc(ijk,gas_vars( i_e)) - &
986 0.5_dp*box%cc(ijk,gas_vars( i_rho))* sum(box%cc(ijk, gas_vars(i_mom(:)))**2))
988 box%cc(ijk, gas_prim_vars(i_e+1)) = box%cc(ijk, gas_prim_vars(i_e))/ &
989 (box%cc(ijk, i_gas_dens)* uc_boltzmann_const)
992 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, public, protected output_dit
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.