MPI-AMRVAC  3.0
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Functions/Subroutines | Variables
mod_cak_opacity Module Reference

Functions/Subroutines

subroutine, public init_cak (tablename)
 This routine is called when the fld radiation module is initialised. Here, the tables for different He Abndcs are read and interpolated. More...
 
subroutine, public set_cak_opacity (rho, temp, gradv, alpha_output, Qbar_output, Q0_output, kappa_e_output)
 This subroutine calculates the opacity for a given temperature-density structure. The opacities are read from a table that has the initialised metalicity. More...
 
subroutine read_table (D, T, K, filename)
 This routine reads out values and arguments from a table. More...
 
subroutine get_val_comb (K1_vals, K2_vals, K3_vals, K4_vals, Log_D_list, Log_T_list, D, T, K1, K2, K3, K4)
 This subroutine looks in the table for the four couples (T,R) More...
 
subroutine get_low_up_index (x, x_list, imin, imax, low_i, up_i)
 this subroutine finds the indexes in R and T arrays of the two values surrounding the input R and T More...
 
subroutine interpolate_krt (low_r, up_r, low_t, up_t, Log_D_list, Log_T_list, Kappa_vals, D, T, k_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 dmin = 2
 min and max indices for R,T-range in opacity table More...
 
integer, parameter dmax = 21
 
integer, parameter tmin = 2
 
integer, parameter tmax = 21
 
double precision, dimension(dmin:dmax, tmin:tmax), public alpha_vals
 The opacity tables are read once and stored globally in Kappa_vals. More...
 
double precision, dimension(dmin:dmax, tmin:tmax), public qbar_vals
 
double precision, dimension(dmin:dmax, tmin:tmax), public q0_vals
 
double precision, dimension(dmin:dmax, tmin:tmax), public kappa_e_vals
 
double precision, dimension(dmin:dmax), public log_d_list
 
double precision, dimension(tmin:tmax), public log_t_list
 
character(255), public amrvac_dir
 
character(255), public fileplace
 

Function/Subroutine Documentation

◆ get_low_up_index()

subroutine mod_cak_opacity::get_low_up_index ( double precision, intent(in)  x,
double precision, dimension(imin:imax), intent(in)  x_list,
integer, intent(in)  imin,
integer, intent(in)  imax,
integer, intent(out)  low_i,
integer, intent(out)  up_i 
)

this subroutine finds the indexes in R and T arrays of the two values surrounding the input R and T

Definition at line 164 of file mod_cak_opacity.t.

◆ get_val_comb()

subroutine mod_cak_opacity::get_val_comb ( double precision, dimension(dmin:dmax,tmin:tmax), intent(in)  K1_vals,
double precision, dimension(dmin:dmax,tmin:tmax), intent(in)  K2_vals,
double precision, dimension(dmin:dmax,tmin:tmax), intent(in)  K3_vals,
double precision, dimension(dmin:dmax,tmin:tmax), intent(in)  K4_vals,
double precision, dimension(dmin:dmax), intent(in)  Log_D_list,
double precision, dimension(tmin:tmax), intent(in)  Log_T_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,R)

Definition at line 104 of file mod_cak_opacity.t.

Here is the call graph for this function:

◆ init_cak()

subroutine, public mod_cak_opacity::init_cak ( character(6), intent(in)  tablename)

This routine is called when the fld radiation module is initialised. Here, the tables for different He Abndcs are read and interpolated.

Definition at line 29 of file mod_cak_opacity.t.

Here is the call graph for this function:

◆ interpolate1d()

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 253 of file mod_cak_opacity.t.

◆ interpolate_krt()

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(dmin:dmax), intent(in)  Log_D_list,
double precision, dimension(tmin:tmax), intent(in)  Log_T_list,
double precision, dimension(dmin:dmax,tmin:tmax), intent(in)  Kappa_vals,
double precision, intent(in)  D,
double precision, intent(in)  T,
double precision, intent(out)  k_interp 
)

This subroutine does a bilinear interpolation in the R,T-plane.

Definition at line 189 of file mod_cak_opacity.t.

Here is the call graph for this function:

◆ read_table()

subroutine mod_cak_opacity::read_table ( double precision, dimension(dmin:dmax), intent(out)  D,
double precision, dimension(tmin:tmax), intent(out)  T,
double precision, dimension(dmin:dmax,tmin:tmax), intent(out)  K,
character(*), intent(in)  filename 
)

This routine reads out values and arguments from a table.

Parameters
[out]kThis routine reads in the the values for log kappa, and the values for log T and log R on the x and y axis
[out]dThis routine reads in the the values for log kappa, and the values for log T and log R on the x and y axis
[out]tThis routine reads in the the values for log kappa, and the values for log T and log R on the x and y axis

Read logT

Read T and K

NOT READING ENTIRE TABLE

Definition at line 79 of file mod_cak_opacity.t.

◆ set_cak_opacity()

subroutine, public mod_cak_opacity::set_cak_opacity ( double precision, intent(in)  rho,
double precision, intent(in)  temp,
double precision, intent(in)  gradv,
double precision, intent(out)  alpha_output,
double precision, intent(out)  Qbar_output,
double precision, intent(out)  Q0_output,
double precision, intent(out)  kappa_e_output 
)

This subroutine calculates the opacity for a given temperature-density structure. The opacities are read from a table that has the initialised metalicity.

Definition at line 48 of file mod_cak_opacity.t.

Here is the call graph for this function:

Variable Documentation

◆ alpha_vals

double precision, dimension(dmin:dmax,tmin:tmax), public mod_cak_opacity::alpha_vals

The opacity tables are read once and stored globally in Kappa_vals.

Definition at line 11 of file mod_cak_opacity.t.

◆ amrvac_dir

character(255), public mod_cak_opacity::amrvac_dir

Definition at line 19 of file mod_cak_opacity.t.

◆ dmax

integer, parameter mod_cak_opacity::dmax = 21

Definition at line 6 of file mod_cak_opacity.t.

◆ dmin

integer, parameter mod_cak_opacity::dmin = 2

min and max indices for R,T-range in opacity table

Definition at line 5 of file mod_cak_opacity.t.

◆ fileplace

character(255), public mod_cak_opacity::fileplace

Definition at line 20 of file mod_cak_opacity.t.

◆ kappa_e_vals

double precision, dimension(dmin:dmax,tmin:tmax), public mod_cak_opacity::kappa_e_vals

Definition at line 14 of file mod_cak_opacity.t.

◆ log_d_list

double precision, dimension(dmin:dmax), public mod_cak_opacity::log_d_list

Definition at line 16 of file mod_cak_opacity.t.

◆ log_t_list

double precision, dimension(tmin:tmax), public mod_cak_opacity::log_t_list

Definition at line 17 of file mod_cak_opacity.t.

◆ q0_vals

double precision, dimension(dmin:dmax,tmin:tmax), public mod_cak_opacity::q0_vals

Definition at line 13 of file mod_cak_opacity.t.

◆ qbar_vals

double precision, dimension(dmin:dmax,tmin:tmax), public mod_cak_opacity::qbar_vals

Definition at line 12 of file mod_cak_opacity.t.

◆ tmax

integer, parameter mod_cak_opacity::tmax = 21

Definition at line 8 of file mod_cak_opacity.t.

◆ tmin

integer, parameter mod_cak_opacity::tmin = 2

Definition at line 7 of file mod_cak_opacity.t.