MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
Data Types | Modules | Functions/Subroutines | Variables
mod_radiative_cooling.t File Reference

Go to the source code of this file.

Data Types

interface  mod_radiative_cooling::get_subr1
 
interface  mod_radiative_cooling::get_2var_subr
 
interface  mod_radiative_cooling::eos_scalar2_func
 Scalar EoS inverse, e.g. fleint_from_T(log_nH, log_T) More...
 
type  mod_radiative_cooling::rc_fluid
 

Modules

module  mod_radiative_cooling
 module radiative cooling – add optically thin radiative cooling
 

Functions/Subroutines

subroutine mod_radiative_cooling::radiative_cooling_init_params (phys_gamma, he_abund)
 Radiative cooling initialization.
 
subroutine mod_radiative_cooling::voigt_escape_init_table ()
 Build the Voigt escape probability lookup table. Called once (guarded by voigt_table_ready flag). Uses 64-point Gauss-Legendre quadrature on [0, x_max] to evaluate E(tau_0) = (2 phi(0)/tau_0) * integral_0^{x_max} [1-exp(-tau_0 g(x))] dx where g(x) = phi(x)/phi(0) for the Voigt profile H(a,x) truncated at x_max.
 
double precision function mod_radiative_cooling::voigt_profile_ratio (a, x)
 Voigt profile ratio phi(x)/phi(0) using Humlicek (1982) Region I/II approx. For the small-a regime (a < 0.01), this simplifies to: H(a,x)/H(a,0) ≈ exp(-x^2) + a*sqrt(pi)/x^2 for |x| > ~2 We use the exact Gaussian core + Lorentzian wing decomposition.
 
double precision function mod_radiative_cooling::voigt_escape_lookup (tau)
 Look up the Voigt escape probability for a given tau. Uses linear interpolation in log10(tau) space.
 
subroutine mod_radiative_cooling::voigt_gauss_legendre (a, b, n, x, w)
 Gauss-Legendre quadrature nodes and weights on [a,b]. Uses the Golub-Welsch algorithm for n points.
 
subroutine mod_radiative_cooling::radiative_cooling_init (fl, read_params)
 
subroutine mod_radiative_cooling::create_y_ppl (fl)
 
subroutine mod_radiative_cooling::getvar_cooling (ixil, ixol, w, x, coolrate, fl)
 
subroutine mod_radiative_cooling::getvar_cooling_exact (qdt, ixil, ixol, wct, w, x, coolrate, fl)
 
subroutine mod_radiative_cooling::radiative_cooling_add_source (qdt, ixil, ixol, wct, wctprim, w, x, qsourcesplit, active, fl)
 
subroutine mod_radiative_cooling::floortemperature (qdt, ixil, ixol, wct, w, x, fl)
 
subroutine mod_radiative_cooling::radiative_cooling_taper (ixd, x_ndim, rho_val, te_val, fl, factor)
 
subroutine mod_radiative_cooling::get_cool_equi (qdt, ixil, ixol, wct, w, x, fl, res)
 
subroutine mod_radiative_cooling::cool_exact (qdt, ixil, ixol, wct, wctprim, w, x, fl)
 
subroutine mod_radiative_cooling::calc_l_extended (tpoint, lpoint, fl)
 
double precision function mod_radiative_cooling::lowfip_fraction (tpoint, fl)
 
subroutine mod_radiative_cooling::findl (tpoint, lpoint, fl)
 
subroutine mod_radiative_cooling::findy (tpoint, ypoint, fl)
 
subroutine mod_radiative_cooling::findt (tpoint, ypoint, fl)
 
subroutine mod_radiative_cooling::finddldt (tpoint, dlpoint, fl)
 
subroutine mod_radiative_cooling::build_y_mod_table (fl)
 ===================================================================
 
double precision function mod_radiative_cooling::simpson_composite (f, n, h)
 Composite Simpson's rule on (N+1) equally spaced samples (N even). N must be a positive even integer; h is the step size.
 
double precision function mod_radiative_cooling::boole_composite (f, n, h)
 Composite Boole's rule on (N+1) equally spaced samples (N a multiple of 4). Each 4-step block contributes (2h/45)*(7 f0 + 32 f1 + 12 f2 + 32 f3 + 7 f4).
 
double precision function mod_radiative_cooling::invert_row_bisect (y_row, t_grid, ncool, y_target)
 Bisection on a single Y_mod row to find log10(T) such that Y_mod_row(i) = y_target. The row is monotonically increasing in decreasing i (since Y(ncool)=0 grows toward Y(1)=Y_max). Returns log10 T (code units).
 
double precision function mod_radiative_cooling::findy_mod (te_loc, nh_loc, fl)
 Forward Y_mod lookup: bilinear interpolation in (log10 nH, log10 T) on the precomputed Y_mod table. Both axes are uniform in log space.
 
double precision function mod_radiative_cooling::findt_mod (y_target, nh_loc, fl)
 Inverse Y_mod lookup: given Y_target and nH, return T such that Y_mod(log10 nH, log10 T) = Y_target. Bisection on the cooling-table i index using values interpolated linearly between the two adjacent nH rows (same convention as the classical findT). Saturates at the table extremes when Y_target falls outside [Y(tcoolmax), Y(tcoolmin)].
 

Variables

double precision, public mod_radiative_cooling::lb_cool_accum = 0.0d0
 Per-rank cooling-only compute accumulator for lb_diagnose. Sums the wall time spent inside radiative_cooling_add_source across all blocks and substages within one full advance() call. Reset by mod_advance::advance at the start of each step. Note: this is a subset of lb_compute_accum (which already encloses the whole advect1 block loop); it isolates the cooling Newton/exact-solver kernel cost from the surrounding finite-volume work.