afivo-streamer 1.1
1D/2D/3D streamer simulations with AMR
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines | Variables
m_photoi_mc Module Reference

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.
 

Detailed Description

Module that provides routines for Monte Carlo photoionization.

Function/Subroutine Documentation

◆ phmc_absorption_func_air()

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.

Parameters
[in]distDistance
[in]p_o2Partial pressure of oxygen (bar)

Definition at line 228 of file m_photoi_mc.f90.

Here is the call graph for this function:

◆ phmc_do_absorption()

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).

Parameters
[in]n_photonsNumber of photons
[in]xyz_inInput (x,y,z) values
[out]xyz_outOutput (x,y,z) values
[in]n_dim2 or 3 dimensional Lookup table
[in,out]prngRandom number generator

Definition at line 287 of file m_photoi_mc.f90.

◆ phmc_get_table_air()

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.

Parameters
[in,out]phmc_tblPartial pressure of oxygen (bar)
[in]p_o2Maximum distance in lookup table

Definition at line 122 of file m_photoi_mc.f90.

Here is the call graph for this function:

◆ phmc_initialize()

subroutine, public m_photoi_mc::phmc_initialize ( type(cfg_t), intent(inout) cfg,
logical, intent(in) is_used )

Initialize photoionization parameters.

Parameters
[in,out]cfgThe configuration for the simulation
[in]is_usedWhether Monte Carlo photoionization is used

Definition at line 51 of file m_photoi_mc.f90.

Here is the call graph for this function:

◆ phmc_print_grid_spacing()

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.

◆ phmc_set_src()

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.

Parameters
[in,out]rngRandom number generator
[in]i_srcInput variable that contains photon production per cell
[in]i_photoInput variable that contains photoionization source rate
[in]use_cylUse cylindrical coordinates (only in 2D)
[in]dtTime step, if present use "physical" photons

Definition at line 379 of file m_photoi_mc.f90.

Here is the call graph for this function:

Variable Documentation

◆ phmc_physical_photons

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.

◆ phmc_tbl

type(phmc_tbl_t), public, protected m_photoi_mc::phmc_tbl

Table for photoionization.

Definition at line 37 of file m_photoi_mc.f90.