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

module radiative cooling – add optically thin radiative cooling for HD and MHD More...

Functions/Subroutines

subroutine rc_params_read (files)
 Read this module"s parameters from a file. More...
 
subroutine radiative_cooling_init (phys_gamma, He_abund)
 Radiative cooling initialization. More...
 
subroutine cooling_get_dt (w, ixIL, ixOL, dtnew, dxD, x)
 
subroutine getvar_cooling (ixIL, ixOL, w, x, coolrate)
 
subroutine getvar_cooling_exact (qdt, ixIL, ixOL, wCT, w, x, coolrate)
 
subroutine radiative_cooling_add_source (qdt, ixIL, ixOL, wCT, w, x, qsourcesplit, active)
 
subroutine floortemperature (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine cool_explicit1 (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine cool_explicit2 (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine cool_semiimplicit (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine cool_implicit (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine cool_exact (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine findl (tpoint, Lpoint)
 
subroutine findy (tpoint, Ypoint)
 
subroutine findt (tpoint, Ypoint)
 
subroutine finddldt (tpoint, dLpoint)
 

Variables

logical rc_split =.false.
 Add cooling source in a split way (.true.) or un-split way (.false.) More...
 
double precision, dimension(:), allocatable tcool
 
double precision, dimension(:), allocatable lcool
 
double precision, dimension(:), allocatable dldtcool
 
double precision, dimension(:), allocatable yc
 
double precision, dimension(:), allocatable invyc
 
double precision tref
 
double precision lref
 
double precision tcoolmin
 
double precision tcoolmax
 
double precision lgtcoolmin
 
double precision lgtcoolmax
 
double precision lgstep
 
integer n_dm
 
integer n_mb
 
integer n_mlcosmol
 
integer n_mlwc
 
integer n_mlsolar1
 
integer n_spex
 
integer n_jccorona
 
integer n_cl_ism
 
integer n_cl_solar
 
integer n_dm_2
 
double precision, dimension(1:71) t_dm
 
double precision, dimension(1:51) t_mb
 
double precision, dimension(1:71) t_mlcosmol
 
double precision, dimension(1:71) t_mlwc
 
double precision, dimension(1:71) t_mlsolar1
 
double precision, dimension(1:110) t_spex
 
double precision, dimension(1:45) t_jccorona
 
double precision, dimension(1:151) t_cl_ism
 
double precision, dimension(1:151) t_cl_solar
 
double precision, dimension(1:76) t_dm_2
 
double precision, dimension(1:71) l_dm
 
double precision, dimension(1:51) l_mb
 
double precision, dimension(1:71) l_mlcosmol
 
double precision, dimension(1:71) l_mlwc
 
double precision, dimension(1:71) l_mlsolar1
 
double precision, dimension(1:110) l_spex
 
double precision, dimension(1:45) l_jccorona
 
double precision, dimension(1:151) l_cl_ism
 
double precision, dimension(1:151) l_cl_solar
 
double precision, dimension(1:76) l_dm_2
 
double precision, dimension(1:110) nenh_spex
 

Detailed Description

module radiative cooling – add optically thin radiative cooling for HD and MHD

Assumptions: full ionize plasma dominated by H and He, ionization equilibrium Formula: Q=-n_H*n_e*f(T), positive f(T) function is pre-computed and tabulated Developed by Allard Jan van Marle, Rony Keppens, and Chun Xia Cooling tables extend to 1O^9 K, (17.11.2009) AJvM Included table by Smith (18.11.2009) AJvM Included luminosity output option (18.11.2009) AJvM Included two cooling curves from Cloudy code supplied by Wang Ye (12.11.2011) AJvM Included a solar coronal cooling curve (JCcorona) supplied by J. Colgan (2008) ApJ Modulized and simplified by Chun Xia (2017)

Function/Subroutine Documentation

◆ cool_exact()

subroutine mod_radiative_cooling::cool_exact ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1392 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ cool_explicit1()

subroutine mod_radiative_cooling::cool_explicit1 ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1101 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ cool_explicit2()

subroutine mod_radiative_cooling::cool_explicit2 ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1152 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ cool_implicit()

subroutine mod_radiative_cooling::cool_implicit ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1318 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ cool_semiimplicit()

subroutine mod_radiative_cooling::cool_semiimplicit ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1251 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ cooling_get_dt()

subroutine mod_radiative_cooling::cooling_get_dt ( double precision, dimension(ixi^s,1:nw), intent(in)  w,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, intent(inout)  dtnew,
double precision, intent(in)  dx,
integer, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 882 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ finddldt()

subroutine mod_radiative_cooling::finddldt ( double precision, intent(in)  tpoint,
double precision, intent(out)  dLpoint 
)

Definition at line 1581 of file mod_radiative_cooling.t.

◆ findl()

subroutine mod_radiative_cooling::findl ( double precision, intent(in)  tpoint,
double precision, intent(out)  Lpoint 
)

Definition at line 1460 of file mod_radiative_cooling.t.

◆ findt()

subroutine mod_radiative_cooling::findt ( double precision, intent(out)  tpoint,
double precision, intent(in)  Ypoint 
)

Definition at line 1545 of file mod_radiative_cooling.t.

◆ findy()

subroutine mod_radiative_cooling::findy ( double precision, intent(in)  tpoint,
double precision, intent(out)  Ypoint 
)

Definition at line 1501 of file mod_radiative_cooling.t.

◆ floortemperature()

subroutine mod_radiative_cooling::floortemperature ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 1078 of file mod_radiative_cooling.t.

◆ getvar_cooling()

subroutine mod_radiative_cooling::getvar_cooling ( integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
double precision, dimension(ixi^s), intent(out)  coolrate 
)

Definition at line 927 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ getvar_cooling_exact()

subroutine mod_radiative_cooling::getvar_cooling_exact ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s, 1:nw), intent(in)  wCT,
double precision, dimension(ixi^s, 1:nw)  w,
double precision, dimension(ixi^s, 1:ndim), intent(in)  x,
double precision, dimension(ixi^s), intent(out)  coolrate 
)

Definition at line 971 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ radiative_cooling_add_source()

subroutine mod_radiative_cooling::radiative_cooling_add_source ( double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  wCT,
double precision, dimension(ixi^s,1:nw), intent(inout)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
logical, intent(in)  qsourcesplit,
logical, intent(inout)  active 
)

Definition at line 1040 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ radiative_cooling_init()

subroutine mod_radiative_cooling::radiative_cooling_init ( double precision, intent(in)  phys_gamma,
double precision, intent(in)  He_abund 
)

Radiative cooling initialization.

Definition at line 597 of file mod_radiative_cooling.t.

Here is the call graph for this function:

◆ rc_params_read()

subroutine mod_radiative_cooling::rc_params_read ( character(len=*), dimension(:), intent(in)  files)

Read this module"s parameters from a file.

Definition at line 581 of file mod_radiative_cooling.t.

Variable Documentation

◆ dldtcool

double precision, dimension(:), allocatable mod_radiative_cooling::dldtcool

Definition at line 64 of file mod_radiative_cooling.t.

◆ invyc

double precision, dimension(:), allocatable mod_radiative_cooling::invyc

Definition at line 65 of file mod_radiative_cooling.t.

◆ l_cl_ism

double precision, dimension(1:151) mod_radiative_cooling::l_cl_ism

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_cl_solar

double precision, dimension(1:151) mod_radiative_cooling::l_cl_solar

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_dm

double precision, dimension(1:71) mod_radiative_cooling::l_dm

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_dm_2

double precision, dimension(1:76) mod_radiative_cooling::l_dm_2

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_jccorona

double precision, dimension(1:45) mod_radiative_cooling::l_jccorona

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_mb

double precision, dimension(1:51) mod_radiative_cooling::l_mb

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_mlcosmol

double precision, dimension(1:71) mod_radiative_cooling::l_mlcosmol

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_mlsolar1

double precision, dimension(1:71) mod_radiative_cooling::l_mlsolar1

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_mlwc

double precision, dimension(1:71) mod_radiative_cooling::l_mlwc

Definition at line 79 of file mod_radiative_cooling.t.

◆ l_spex

double precision, dimension(1:110) mod_radiative_cooling::l_spex

Definition at line 79 of file mod_radiative_cooling.t.

◆ lcool

double precision, dimension(:), allocatable mod_radiative_cooling::lcool

Definition at line 64 of file mod_radiative_cooling.t.

◆ lgstep

double precision mod_radiative_cooling::lgstep

Definition at line 67 of file mod_radiative_cooling.t.

◆ lgtcoolmax

double precision mod_radiative_cooling::lgtcoolmax

Definition at line 67 of file mod_radiative_cooling.t.

◆ lgtcoolmin

double precision mod_radiative_cooling::lgtcoolmin

Definition at line 67 of file mod_radiative_cooling.t.

◆ lref

double precision mod_radiative_cooling::lref

Definition at line 66 of file mod_radiative_cooling.t.

◆ n_cl_ism

integer mod_radiative_cooling::n_cl_ism

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_cl_solar

integer mod_radiative_cooling::n_cl_solar

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_dm

integer mod_radiative_cooling::n_dm

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_dm_2

integer mod_radiative_cooling::n_dm_2

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_jccorona

integer mod_radiative_cooling::n_jccorona

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_mb

integer mod_radiative_cooling::n_mb

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_mlcosmol

integer mod_radiative_cooling::n_mlcosmol

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_mlsolar1

integer mod_radiative_cooling::n_mlsolar1

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_mlwc

integer mod_radiative_cooling::n_mlwc

Definition at line 69 of file mod_radiative_cooling.t.

◆ n_spex

integer mod_radiative_cooling::n_spex

Definition at line 69 of file mod_radiative_cooling.t.

◆ nenh_spex

double precision, dimension(1:110) mod_radiative_cooling::nenh_spex

Definition at line 84 of file mod_radiative_cooling.t.

◆ rc_split

logical mod_radiative_cooling::rc_split =.false.

Add cooling source in a split way (.true.) or un-split way (.false.)

Definition at line 50 of file mod_radiative_cooling.t.

◆ t_cl_ism

double precision, dimension(1:151) mod_radiative_cooling::t_cl_ism

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_cl_solar

double precision, dimension(1:151) mod_radiative_cooling::t_cl_solar

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_dm

double precision, dimension(1:71) mod_radiative_cooling::t_dm

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_dm_2

double precision, dimension(1:76) mod_radiative_cooling::t_dm_2

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_jccorona

double precision, dimension(1:45) mod_radiative_cooling::t_jccorona

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_mb

double precision, dimension(1:51) mod_radiative_cooling::t_mb

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_mlcosmol

double precision, dimension(1:71) mod_radiative_cooling::t_mlcosmol

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_mlsolar1

double precision, dimension(1:71) mod_radiative_cooling::t_mlsolar1

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_mlwc

double precision, dimension(1:71) mod_radiative_cooling::t_mlwc

Definition at line 74 of file mod_radiative_cooling.t.

◆ t_spex

double precision, dimension(1:110) mod_radiative_cooling::t_spex

Definition at line 74 of file mod_radiative_cooling.t.

◆ tcool

double precision, dimension(:), allocatable mod_radiative_cooling::tcool

Definition at line 64 of file mod_radiative_cooling.t.

◆ tcoolmax

double precision mod_radiative_cooling::tcoolmax

Definition at line 66 of file mod_radiative_cooling.t.

◆ tcoolmin

double precision mod_radiative_cooling::tcoolmin

Definition at line 66 of file mod_radiative_cooling.t.

◆ tref

double precision mod_radiative_cooling::tref

Definition at line 66 of file mod_radiative_cooling.t.

◆ yc

double precision, dimension(:), allocatable mod_radiative_cooling::yc

Definition at line 65 of file mod_radiative_cooling.t.