MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
This module reads in Rosseland-mean opacities from OPAL tables. Table opacity values are given in base 10 logarithm and are a function of mass density (R) and temperature (T), which are also both given in base 10 logarithm. More...
Functions/Subroutines | |
subroutine, public | init_opal_table (tablename) |
This subroutine is called when the FLD radiation module is initialised. The OPAL tables for different helium abundances are read and interpolated. More... | |
subroutine, public | set_opal_opacity (rho, temp, kappa) |
This subroutine calculates the opacity for a given temperature-density structure. Opacities are read from a table with given metalicity. More... | |
subroutine | read_table (R, T, K, filename) |
This routine reads in 1-D (rho,T) values from an opacity table and gives back as output the 1-D (rho,T) values and 2-D opacity. More... | |
subroutine | get_kappa (Kappa_vals, logR_list, logT_list, R, T, K) |
This subroutine looks in the table for the four couples (T,rho) surrounding a given input T and rho. More... | |
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. More... | |
subroutine | interpolate_krt (low_r, up_r, low_t, up_t, logR_list, logT_list, Kappa_vals, R, T, kappa_interp) |
This subroutine does a bilinear interpolation in the R,T-plane. More... | |
subroutine | interpolate1d (x1, x2, x, y1, y2, y) |
Interpolation in one dimension. More... | |
Variables | |
integer, parameter | irmin = 2 |
min and max indices for R,T-range in opacity table More... | |
integer, parameter | irmax = 20 |
integer, parameter | itmin = 7 |
integer, parameter | itmax = 76 |
double precision, dimension(itmin:itmax, irmin:irmax), public | kappa_vals |
The opacity tables are read once and stored globally in Kappa_vals. More... | |
double precision, dimension(irmin:irmax), public | logr_list |
double precision, dimension(itmin:itmax), public | logt_list |
This module reads in Rosseland-mean opacities from OPAL tables. Table opacity values are given in base 10 logarithm and are a function of mass density (R) and temperature (T), which are also both given in base 10 logarithm.
subroutine mod_opal_opacity::get_kappa | ( | double precision, dimension(itmin:itmax,irmin:irmax), intent(in) | Kappa_vals, |
double precision, dimension(irmin:irmax), intent(in) | logR_list, | ||
double precision, dimension(itmin:itmax), intent(in) | logT_list, | ||
double precision, intent(in) | R, | ||
double precision, intent(in) | T, | ||
double precision, intent(out) | K | ||
) |
This subroutine looks in the table for the four couples (T,rho) surrounding a given input T and rho.
Definition at line 107 of file mod_opal_opacity.t.
subroutine mod_opal_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_opal_opacity.t.
subroutine, public mod_opal_opacity::init_opal_table | ( | character(len=*), intent(in) | tablename | ) |
This subroutine is called when the FLD radiation module is initialised. The OPAL tables for different helium abundances are read and interpolated.
Definition at line 24 of file mod_opal_opacity.t.
subroutine mod_opal_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_opal_opacity.t.
subroutine mod_opal_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(irmin:irmax), intent(in) | logR_list, | ||
double precision, dimension(itmin:itmax), intent(in) | logT_list, | ||
double precision, dimension(itmin:itmax,irmin:irmax), intent(in) | Kappa_vals, | ||
double precision, intent(in) | R, | ||
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_opal_opacity.t.
subroutine mod_opal_opacity::read_table | ( | double precision, dimension(irmin:irmax), intent(out) | R, |
double precision, dimension(itmin:itmax), intent(out) | T, | ||
double precision, dimension(itmin:itmax,irmin:irmax), intent(out) | K, | ||
character(*), intent(in) | filename | ||
) |
This routine reads in 1-D (rho,T) values from an opacity table and gives back as output the 1-D (rho,T) values and 2-D opacity.
Definition at line 76 of file mod_opal_opacity.t.
subroutine, public mod_opal_opacity::set_opal_opacity | ( | double precision, intent(in) | rho, |
double precision, intent(in) | temp, | ||
double precision, intent(out) | kappa | ||
) |
This subroutine calculates the opacity for a given temperature-density structure. Opacities are read from a table with given metalicity.
Definition at line 43 of file mod_opal_opacity.t.
integer, parameter mod_opal_opacity::irmax = 20 |
Definition at line 10 of file mod_opal_opacity.t.
integer, parameter mod_opal_opacity::irmin = 2 |
min and max indices for R,T-range in opacity table
Definition at line 10 of file mod_opal_opacity.t.
integer, parameter mod_opal_opacity::itmax = 76 |
Definition at line 11 of file mod_opal_opacity.t.
integer, parameter mod_opal_opacity::itmin = 7 |
Definition at line 11 of file mod_opal_opacity.t.
double precision, dimension(itmin:itmax,irmin:irmax), public mod_opal_opacity::kappa_vals |
The opacity tables are read once and stored globally in Kappa_vals.
Definition at line 14 of file mod_opal_opacity.t.
double precision, dimension(irmin:irmax), public mod_opal_opacity::logr_list |
Definition at line 15 of file mod_opal_opacity.t.
double precision, dimension(itmin:itmax), public mod_opal_opacity::logt_list |
Definition at line 15 of file mod_opal_opacity.t.