MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_rt_sc_opacity.t File Reference

Go to the source code of this file.

Data Types

interface  mod_rt_sc_opacity::rt_sc_chib_iface
 The opacity and source the solvers call. rt_sc_setup points it at one of the built-in routines, or at usr_rt_sc_chiB for 'usr'. More...

Modules

module  mod_rt_sc_opacity
 Opacity and Planck source of the short-characteristics (SC) radiative transfer.

Functions/Subroutines

subroutine, public mod_rt_sc_opacity::rt_sc_chib_rosseland (ixil, ixol, w, x, chi, bpl)
 Table Rosseland opacity, chi = kappa_R(rho, T) rho, and source B = a T^4, both multiplied by the transition switch.
subroutine, public mod_rt_sc_opacity::rt_sc_chib_kramers (ixil, ixol, w, x, chi, bpl)
 Analytic H-minus and Kramers opacity, with the source and the switch as in rt_sc_chiB_rosseland.
subroutine mod_rt_sc_opacity::chib_builtin (ixil, ixol, w, x, chi, bpl, tabulated)
 chi and B of the built-in opacities, the table when tabulated is set and the analytic fit otherwise. Temperature and gas pressure come from the EoS, so the opacity follows whichever EoS the run uses, and the switch scales chi and B together, so that the switched-off gas is both transparent and dark
pure double precision function, public mod_rt_sc_opacity::rt_sc_switch (t_k, p_code)
 Transition switch of the built-in opacities, from the temperature in K and the gas pressure in code units. The temperature gate is one in cool gas and falls to zero across dTcap above Tcap, while the pressure gate rises from zero to one across dp_TR dex around p_TR. A cell keeps its transfer when either holds, so the larger gate wins.
double precision function mod_rt_sc_opacity::kappa_code_cell (t_code, rho_code)
 Rosseland opacity of one cell from the table, with temperature, density and opacity all in code units.
double precision function mod_rt_sc_opacity::interp_logkappa (lt, lr)
 Bilinear interpolation of log10 kappa in (log10 T, log10 R).
integer function mod_rt_sc_opacity::op_locate (xx, n, xq)
 Index jl of the table interval [xx(jl), xx(jl+1)] that holds xq, found by bisection. A point beyond either end returns the first or the last interval.
subroutine, public mod_rt_sc_opacity::read_opacity_table ()
 Read the Rosseland table and shift it to code units. The file is in cgs, with T in K and R = rho/T6^3, where T6 is the temperature in 1e6 K.

Variables

character(len=10), public mod_rt_sc_opacity::rt_sc_opacity = 'Rosseland'
 The opacity model, either 'Rosseland' (the table), 'Kramers' (the analytic fit) or 'usr', which uses the usr_rt_sc_chiB callback.
character(len=std_len), public mod_rt_sc_opacity::rt_sc_kappa_table = 'rosseland_combined.tab'
 The Rosseland table file, read in rt_sc_setup when the table model is chosen.
double precision, public mod_rt_sc_opacity::rt_sc_tcap = 2.0d4
 The built-in opacities keep the SC transfer on where the gas is cool (T < Tcap) or dense (p > p_TR), and switch it off smoothly in the hot, tenuous corona. The transition bands Tcap and dTcap are in K, p_TR is in dyn/cm^2 and its width dp_TR in dex.
double precision, public mod_rt_sc_opacity::rt_sc_dtcap = 5.0d3
double precision, public mod_rt_sc_opacity::rt_sc_p_tr = 1.0d0
double precision, public mod_rt_sc_opacity::rt_sc_dp_tr = 0.5d0
double precision, public mod_rt_sc_opacity::rt_sc_lp_tr = 0.0d0
 log10 of p_TR in code units, set by rt_sc_setup
double precision, dimension(:), allocatable mod_rt_sc_opacity::op_logt
 The Rosseland table, shifted to code units when it is read. It holds log10 kappa on a grid of log10 T and log10 R, where R = rho/T^3, all three in code units.
double precision, dimension(:), allocatable mod_rt_sc_opacity::op_logr
double precision, dimension(:,:), allocatable mod_rt_sc_opacity::op_logk
integer mod_rt_sc_opacity::nt_op = 0
integer mod_rt_sc_opacity::nr_op = 0
procedure(rt_sc_chib_iface), pointer, public mod_rt_sc_opacity::rt_sc_chib => null()