afivo-streamer 1.1
1D/2D/3D streamer simulations with AMR
|
Module that provides routines for Monte Carlo photoionization. More...
Data Types | |
type | phmc_tbl_t |
Type to quickly look up absorption lengths from a table. More... | |
Functions/Subroutines | |
subroutine, public | phmc_initialize (cfg, is_used) |
Initialize photoionization parameters. | |
subroutine, public | phmc_print_grid_spacing (dr_base) |
Print the grid spacing used for the absorption of photons. | |
subroutine, public | phmc_get_table_air (phmc_tbl, p_o2, max_dist) |
Compute the photonization table for air. If the absorption function is f(r), this table contains r as a function of F (the cumulative absorption function, between 0 and 1). Later on a distance can be sampled by drawing a uniform 0,1 random number and finding the corresponding distance. The table constructed up to max_dist; we can ignore photons that fly very far. | |
real(dp) function, public | phmc_absorption_func_air (dist, p_o2) |
The absorption function for photons in air according to Zheleznyak's model. | |
subroutine, public | phmc_do_absorption (xyz_in, xyz_out, n_dim, n_photons, tbl, prng) |
Given a list of photon production positions (xyz_in), compute where they end up (xyz_out). | |
subroutine, public | phmc_set_src (tree, rng, i_src, i_photo, use_cyl, dt) |
Set the source term due to photoionization. At most phmc_num_photons discrete photons are produced. | |
Variables | |
logical, public, protected | phmc_physical_photons = .true. |
Whether physical photons are used. | |
type(phmc_tbl_t), public, protected | phmc_tbl |
Table for photoionization. | |
Module that provides routines for Monte Carlo photoionization.
real(dp) function, public m_photoi_mc::phmc_absorption_func_air | ( | real(dp), intent(in) | dist, |
real(dp), intent(in) | p_o2 ) |
The absorption function for photons in air according to Zheleznyak's model.
[in] | dist | Distance |
[in] | p_o2 | Partial pressure of oxygen (bar) |
Definition at line 228 of file m_photoi_mc.f90.
subroutine, public m_photoi_mc::phmc_do_absorption | ( | real(dp), dimension(3, n_photons), intent(in) | xyz_in, |
real(dp), dimension(3, n_photons), intent(out) | xyz_out, | ||
integer, intent(in) | n_dim, | ||
integer, intent(in) | n_photons, | ||
type(lt_t), intent(in) | tbl, | ||
type(prng_t), intent(inout) | prng ) |
Given a list of photon production positions (xyz_in), compute where they end up (xyz_out).
[in] | n_photons | Number of photons |
[in] | xyz_in | Input (x,y,z) values |
[out] | xyz_out | Output (x,y,z) values |
[in] | n_dim | 2 or 3 dimensional Lookup table |
[in,out] | prng | Random number generator |
Definition at line 287 of file m_photoi_mc.f90.
subroutine, public m_photoi_mc::phmc_get_table_air | ( | type(phmc_tbl_t), intent(inout) | phmc_tbl, |
real(dp), intent(in) | p_o2, | ||
real(dp), intent(in) | max_dist ) |
Compute the photonization table for air. If the absorption function is f(r), this table contains r as a function of F (the cumulative absorption function, between 0 and 1). Later on a distance can be sampled by drawing a uniform 0,1 random number and finding the corresponding distance. The table constructed up to max_dist; we can ignore photons that fly very far.
[in,out] | phmc_tbl | Partial pressure of oxygen (bar) |
[in] | p_o2 | Maximum distance in lookup table |
Definition at line 122 of file m_photoi_mc.f90.
subroutine, public m_photoi_mc::phmc_initialize | ( | type(cfg_t), intent(inout) | cfg, |
logical, intent(in) | is_used ) |
Initialize photoionization parameters.
[in,out] | cfg | The configuration for the simulation |
[in] | is_used | Whether Monte Carlo photoionization is used |
Definition at line 51 of file m_photoi_mc.f90.
subroutine, public m_photoi_mc::phmc_print_grid_spacing | ( | real(dp), intent(in) | dr_base | ) |
Print the grid spacing used for the absorption of photons.
Definition at line 97 of file m_photoi_mc.f90.
subroutine, public m_photoi_mc::phmc_set_src | ( | type(af_t), intent(inout) | tree, |
type(rng_t), intent(inout) | rng, | ||
integer, intent(in) | i_src, | ||
integer, intent(in) | i_photo, | ||
logical, intent(in) | use_cyl, | ||
real(dp), intent(in), optional | dt ) |
Set the source term due to photoionization. At most phmc_num_photons discrete photons are produced.
[in,out] | rng | Random number generator |
[in] | i_src | Input variable that contains photon production per cell |
[in] | i_photo | Input variable that contains photoionization source rate |
[in] | use_cyl | Use cylindrical coordinates (only in 2D) |
[in] | dt | Time step, if present use "physical" photons |
Definition at line 379 of file m_photoi_mc.f90.
logical, public, protected m_photoi_mc::phmc_physical_photons = .true. |
Whether physical photons are used.
Definition at line 19 of file m_photoi_mc.f90.
type(phmc_tbl_t), public, protected m_photoi_mc::phmc_tbl |
Table for photoionization.
Definition at line 37 of file m_photoi_mc.f90.