MPI-AMRVAC 3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
This module reads in CAK line opacities in the Gayley (1995) notation (alpha, Qbar, Q0, kappae) from corresponding tables. Tabulated values assume LTE conditions and are a function of mass density (D) and temperature (T), which are both given in base 10 logarithm. The construction of the tables is outlined in Poniatowski+ (2021), A&A, 667. More...
Functions/Subroutines | |
subroutine, public | init_cak_table (tabledir) |
This routine is called when the FLD radiation module is initialised. | |
subroutine, public | set_cak_opacity (rho, temp, alpha_output, qbar_output, q0_output, kappae_output) |
This subroutine calculates the opacity for a given temperature-density structure. Opacities are read from a table with given metalicity. | |
subroutine | read_table (d, t, k, filename) |
This routine reads in 1-D (T,rho) values from a line opacity table and gives back as output the 1-D (T,rho) values and 2-D line opacity value. | |
subroutine | get_val_comb (k1_vals, k2_vals, k3_vals, k4_vals, logd_list, logt_list, d, t, k1, k2, k3, k4) |
This subroutine looks in the table for the four couples (T,rho) surrounding a given input T and rho. | |
subroutine | get_low_up_index (var_in, var_list, imin, imax, low_i, up_i) |
This subroutine finds the indices in rho and T arrays of the two values surrounding the input rho and T. | |
subroutine | interpolate_krt (low_r, up_r, low_t, up_t, logd_list, logt_list, kappa_vals, d, t, kappa_interp) |
This subroutine does a bilinear interpolation in the R,T-plane. | |
subroutine | interpolate1d (x1, x2, x, y1, y2, y) |
Interpolation in one dimension. | |
Variables | |
integer, parameter | idmin = 2 |
min and max indices for R,T-range in opacity table | |
integer, parameter | idmax = 16 |
integer, parameter | itmin = 2 |
integer, parameter | itmax = 51 |
double precision, dimension(idmin:idmax, itmin:itmax), public | alpha_vals |
The opacity tables are read once and stored globally. | |
double precision, dimension(idmin:idmax, itmin:itmax), public | qbar_vals |
double precision, dimension(idmin:idmax, itmin:itmax), public | q0_vals |
double precision, dimension(idmin:idmax, itmin:itmax), public | kappae_vals |
double precision, dimension(idmin:idmax), public | logd_list |
double precision, dimension(itmin:itmax), public | logt_list |
This module reads in CAK line opacities in the Gayley (1995) notation (alpha, Qbar, Q0, kappae) from corresponding tables. Tabulated values assume LTE conditions and are a function of mass density (D) and temperature (T), which are both given in base 10 logarithm. The construction of the tables is outlined in Poniatowski+ (2021), A&A, 667.
subroutine mod_cak_opacity::get_low_up_index | ( | double precision, intent(in) | var_in, |
double precision, dimension(imin:imax), intent(in) | var_list, | ||
integer, intent(in) | imin, | ||
integer, intent(in) | imax, | ||
integer, intent(out) | low_i, | ||
integer, intent(out) | up_i | ||
) |
This subroutine finds the indices in rho and T arrays of the two values surrounding the input rho and T.
Definition at line 148 of file mod_cak_opacity.t.
subroutine mod_cak_opacity::get_val_comb | ( | double precision, dimension(idmin:idmax,itmin:itmax), intent(in) | k1_vals, |
double precision, dimension(idmin:idmax,itmin:itmax), intent(in) | k2_vals, | ||
double precision, dimension(idmin:idmax,itmin:itmax), intent(in) | k3_vals, | ||
double precision, dimension(idmin:idmax,itmin:itmax), intent(in) | k4_vals, | ||
double precision, dimension(idmin:idmax), intent(in) | logd_list, | ||
double precision, dimension(itmin:itmax), intent(in) | logt_list, | ||
double precision, intent(in) | d, | ||
double precision, intent(in) | t, | ||
double precision, intent(out) | k1, | ||
double precision, intent(out) | k2, | ||
double precision, intent(out) | k3, | ||
double precision, intent(out) | k4 | ||
) |
This subroutine looks in the table for the four couples (T,rho) surrounding a given input T and rho.
Definition at line 93 of file mod_cak_opacity.t.
subroutine, public mod_cak_opacity::init_cak_table | ( | character(len=*), intent(in) | tabledir | ) |
This routine is called when the FLD radiation module is initialised.
Definition at line 28 of file mod_cak_opacity.t.
subroutine mod_cak_opacity::interpolate1d | ( | double precision, intent(in) | x1, |
double precision, intent(in) | x2, | ||
double precision, intent(in) | x, | ||
double precision, intent(in) | y1, | ||
double precision, intent(in) | y2, | ||
double precision, intent(out) | y | ||
) |
Interpolation in one dimension.
Definition at line 217 of file mod_cak_opacity.t.
subroutine mod_cak_opacity::interpolate_krt | ( | integer, intent(in) | low_r, |
integer, intent(in) | up_r, | ||
integer, intent(in) | low_t, | ||
integer, intent(in) | up_t, | ||
double precision, dimension(idmin:idmax), intent(in) | logd_list, | ||
double precision, dimension(itmin:itmax), intent(in) | logt_list, | ||
double precision, dimension(idmin:idmax,itmin:itmax), intent(in) | kappa_vals, | ||
double precision, intent(in) | d, | ||
double precision, intent(in) | t, | ||
double precision, intent(out) | kappa_interp | ||
) |
This subroutine does a bilinear interpolation in the R,T-plane.
Definition at line 172 of file mod_cak_opacity.t.
subroutine mod_cak_opacity::read_table | ( | double precision, dimension(idmin:idmax), intent(out) | d, |
double precision, dimension(itmin:itmax), intent(out) | t, | ||
double precision, dimension(idmin:idmax,itmin:itmax), intent(out) | k, | ||
character(*), intent(in) | filename | ||
) |
This routine reads in 1-D (T,rho) values from a line opacity table and gives back as output the 1-D (T,rho) values and 2-D line opacity value.
Definition at line 68 of file mod_cak_opacity.t.
subroutine, public mod_cak_opacity::set_cak_opacity | ( | double precision, intent(in) | rho, |
double precision, intent(in) | temp, | ||
double precision, intent(out) | alpha_output, | ||
double precision, intent(out) | qbar_output, | ||
double precision, intent(out) | q0_output, | ||
double precision, intent(out) | kappae_output | ||
) |
This subroutine calculates the opacity for a given temperature-density structure. Opacities are read from a table with given metalicity.
Definition at line 47 of file mod_cak_opacity.t.
double precision, dimension(idmin:idmax,itmin:itmax), public mod_cak_opacity::alpha_vals |
The opacity tables are read once and stored globally.
Definition at line 16 of file mod_cak_opacity.t.
integer, parameter mod_cak_opacity::idmax = 16 |
Definition at line 12 of file mod_cak_opacity.t.
integer, parameter mod_cak_opacity::idmin = 2 |
min and max indices for R,T-range in opacity table
Definition at line 12 of file mod_cak_opacity.t.
integer, parameter mod_cak_opacity::itmax = 51 |
Definition at line 13 of file mod_cak_opacity.t.
integer, parameter mod_cak_opacity::itmin = 2 |
Definition at line 13 of file mod_cak_opacity.t.
double precision, dimension(idmin:idmax,itmin:itmax), public mod_cak_opacity::kappae_vals |
Definition at line 19 of file mod_cak_opacity.t.
double precision, dimension(idmin:idmax), public mod_cak_opacity::logd_list |
Definition at line 20 of file mod_cak_opacity.t.
double precision, dimension(itmin:itmax), public mod_cak_opacity::logt_list |
Definition at line 20 of file mod_cak_opacity.t.
double precision, dimension(idmin:idmax,itmin:itmax), public mod_cak_opacity::q0_vals |
Definition at line 18 of file mod_cak_opacity.t.
double precision, dimension(idmin:idmax,itmin:itmax), public mod_cak_opacity::qbar_vals |
Definition at line 17 of file mod_cak_opacity.t.