|
MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Public Attributes | |
| double precision | rad_damp_height |
| double precision | rad_damp_scale |
| double precision, dimension(:), allocatable | tcool |
| double precision, dimension(:), allocatable | lcool |
| double precision, dimension(:), allocatable | dldtcool |
| double precision, dimension(:), allocatable | yc |
| double precision | tref |
| double precision | lref |
| double precision | tcoolmin |
| double precision | tcoolmax |
| double precision | lgtcoolmin |
| double precision | lgtcoolmax |
| double precision | lgstep |
| double precision, dimension(:), allocatable | y_ppl |
| double precision, dimension(:), allocatable | t_ppl |
| double precision, dimension(:), allocatable | l_ppl |
| double precision, dimension(:), allocatable | a_ppl |
| double precision | tlow |
| Lower limit of temperature. | |
| integer | e_ |
| Index of the energy density. | |
| integer | tcoff_ |
| Index of cut off temperature for TRAC. | |
| integer | ncool |
| Resolution of temperature in interpolated tables. | |
| integer | n_ppl |
| logical | tfix |
| Fixed temperature not lower than tlow. | |
| logical | rc_split |
| Add cooling source in a split way (.true.) or un-split way (.false.) | |
| logical | isppl = .false. |
| double precision | rad_suppress_temp = 0.0d0 |
| Suppress cooling for T below this threshold (Kelvin) within rad_cut_hgt of footpoints. When > 0, cells inside the spatial taper region with T < rad_suppress_temp get factor=0; coronal cooling above that T proceeds unmodified. Default 0 = disabled. | |
| double precision | suppress_temp_code = 0.0d0 |
| Internal: suppress threshold in code units (set from rad_suppress_temp during init). Not a namelist parameter. | |
| logical | rad_modify |
| Master switch for radiative loss modification (spatial + density taper) | |
| logical | rad_modify_sym |
| Apply spatial taper at both boundaries (default: lower only) | |
| double precision | rad_cut_hgt = 0.0d0 |
| Spatial taper height (HEAD addition): suppress cooling within rad_cut_hgt of boundary. | |
| double precision | rad_cut_dey = 0.15d0 |
| Spatial taper width (HEAD addition): Gaussian dey for the spatial taper. | |
| double precision | cfrac = 0.1d0 |
| Cooling-curve dt-fraction (HEAD addition; used by legacy explicit-mode dt scaling) | |
| logical | rad_damp |
| cutoff radiative cooling below rad_damp_height | |
| logical | has_equi = .false. |
| whether background equilibrium contribution is split off | |
| logical | subtract_equi = .false. |
| whether background equilibrium is compensated in thermal balance | |
| double precision, dimension(:), allocatable | frac_lowfip |
| integer | fip_ = -1 |
| Index of primitive FIP abundance variable, -1 if disabled. | |
| logical | rad_newton = .false. |
| Enable local Newton cooling/heating approximation for optically thick losses. | |
| double precision | rad_newton_pthick = 25.d0 |
| double precision | rad_newton_trad = 0.006d0 |
| double precision | rad_newton_rhosurf = 1.d4 |
| double precision | rad_taper_rho |
| Density threshold for Gaussian taper (code units) | |
| double precision | rad_taper_dey |
| Gaussian decay width for density taper. | |
| logical | rad_escape_prob = .false. |
| Enable escape probability cooling modification. | |
| double precision | rad_kappa_eff = 0.0d0 |
| Effective opacity for escape probability (code units: 1/(density*length)) | |
| double precision | rad_kappa_tcutoff = 0.0d0 |
| Temperature above which kappa→0 (stored in code units, input in Kelvin); 0 = constant kappa. | |
| double precision | rad_kappa_alpha = 4.0d0 |
| Sigmoid sharpness exponent for kappa(T) cutoff. | |
| character(len=10) | rad_escape_type = 'slab' |
| Escape probability type: 'slab' = (1-exp(-tau))/tau, 'voigt' = Voigt CRD. | |
| double precision | rad_escape_tau_cutoff = 0.0d0 |
| Exponential cutoff scale: E *= exp(-tau/tau_cutoff); 0 = disabled. | |
| double precision | rad_escape_height = 0.0d0 |
| Max height from footpoint for column mass integration (code units); 0 = no limit. | |
| integer | iw_colmass_ = -1 |
| Index into wextra for column mass (set during init) | |
| character(len=std_len) | coolcurve |
| Name of cooling curve. | |
| logical | ione = .false. |
| EoS snapshots + scalar inverse accessors (set in bind_eos_to_source); let cooling reach thermodynamics only through this object, never mod_eos. | |
| character(len=20) | method = 'tables' |
| double precision | inv_gamma_minus_1 |
| double precision | nh2rhofactor |
| double precision | eion_per_nh |
| double precision, dimension(:,:), allocatable | y_mod |
| Variable-c_V Townsend extension (Y_mod). Built only when flionE. | |
| double precision, dimension(:), allocatable | y_mod_max_per_row |
| integer | y_mod_n_nh = 0 |
| double precision | y_mod_lg_nh_min = 0.0d0 |
| double precision | y_mod_lg_nh_max = 0.0d0 |
| double precision | y_mod_lg_nh_step_inv = 0.0d0 |
| logical | y_mod_built = .false. |
| Build flag — set to .true. only after the table has been populated by build_Y_mod_table (called from bind_eos_to_source after eos_finalise). | |
| character(len=8) | y_mod_quadrature = 'boole' |
| Quadrature method: 'simpson' (3-point, O(h^4)) or 'boole' (5-point, O(h^6)) | |
| integer | y_mod_n_sub = 16 |
| Number of sub-intervals per [u_i, u_{i+1}] segment for the quadrature. | |
| logical | lambda_needs_nenh_table = .false. |
| SPEX-style two-table cooling support. | |
| double precision, dimension(:), allocatable | nenh_eq_table |
Static Public Attributes | |
| procedure(get_subr1), pointer, nopass | get_rho => null() |
| procedure(get_subr1), pointer, nopass | get_te => null() |
| procedure(get_subr1), pointer, nopass | get_rho_equi => null() |
| procedure(get_subr1), pointer, nopass | get_pthermal => null() |
| procedure(get_subr1), pointer, nopass | get_pthermal_equi => null() |
| procedure(get_subr1), pointer, nopass | get_var_rfactor => null() |
| procedure(get_2var_subr), pointer, nopass | get_ne_nh => null() |
| procedure(get_subr1), pointer, nopass | get_temperature_equi => null() |
| procedure(eos_scalar2_func), pointer, nopass | eint_from_t => null() |
| procedure(eos_scalar2_func), pointer, nopass | p2eint => null() |
| procedure(eos_scalar2_func), pointer, nopass | t_from_eint => null() |
| procedure(eos_scalar2_func), pointer, nopass | y_from_eint => null() |
Definition at line 78 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::a_ppl |
Definition at line 91 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::cfrac = 0.1d0 |
Cooling-curve dt-fraction (HEAD addition; used by legacy explicit-mode dt scaling)
Definition at line 132 of file mod_radiative_cooling.t.
| character(len=std_len) mod_radiative_cooling::rc_fluid::coolcurve |
Name of cooling curve.
Definition at line 173 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::dldtcool |
Definition at line 84 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::e_ |
Index of the energy density.
Definition at line 97 of file mod_radiative_cooling.t.
|
static |
Definition at line 190 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::eion_per_nh |
Definition at line 189 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::fip_ = -1 |
Index of primitive FIP abundance variable, -1 if disabled.
Definition at line 143 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::frac_lowfip |
Definition at line 141 of file mod_radiative_cooling.t.
|
static |
Definition at line 181 of file mod_radiative_cooling.t.
|
static |
Definition at line 178 of file mod_radiative_cooling.t.
|
static |
Definition at line 179 of file mod_radiative_cooling.t.
|
static |
Definition at line 175 of file mod_radiative_cooling.t.
|
static |
Definition at line 177 of file mod_radiative_cooling.t.
|
static |
Definition at line 176 of file mod_radiative_cooling.t.
|
static |
Definition at line 182 of file mod_radiative_cooling.t.
|
static |
Definition at line 180 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::has_equi = .false. |
whether background equilibrium contribution is split off
Definition at line 137 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::inv_gamma_minus_1 |
Definition at line 187 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::ione = .false. |
EoS snapshots + scalar inverse accessors (set in bind_eos_to_source); let cooling reach thermodynamics only through this object, never mod_eos.
Definition at line 185 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::isppl = .false. |
Definition at line 113 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::iw_colmass_ = -1 |
Index into wextra for column mass (set during init)
Definition at line 170 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::l_ppl |
Definition at line 91 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::lambda_needs_nenh_table = .false. |
SPEX-style two-table cooling support.
The SPEX/SPEX_DM cooling tables follow Schure et al. (2009) which publishes the cooling function in two parts: Lambda_SPEX(T) – the cooling rate per n_H^2 (NOT per n_e n_H) nenh_SPEX(T) – the CIE equilibrium n_e/n_H ratio at temperature T Reconstructing the volumetric cooling rate is then: Q = n_H^2 * nenh_eq(T) * Lambda_SPEX(T)
All other cooling tables in AMRVAC follow the standard Dere/CHIANTI convention where Q = n_e * n_H * Lambda(T) and the equilibrium ionisation balance is baked into Lambda(T) itself.
Historically, AMRVAC handled the SPEX two-table convention by absorbing log10(nenh_SPEX) into Lambda_table at construction time, so that the standard formula Q = n_e n_H * Lambda_table happened to give the right answer when n_e ~ n_H (the FI assumption with neOnH ~ 1.2). This trick silently breaks in LTE+ionE mode where the simulation n_e is the actual Saha value: n_e/n_H << 1 at low T, so the formula double-counts the equilibrium factor and badly under-counts cooling.
The fix below: do NOT absorb nenh into Lambda_table. Instead, store the equilibrium array nenh_eq_table on the same tcool grid, and at runtime use Q = n_H^2 * nenh_eq(T) * Lambda_table whenever lambda_needs_nenh_table is .true. This honours the published SPEX convention regardless of the EoS choice.
Definition at line 254 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::lcool |
Definition at line 84 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgstep |
Definition at line 87 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgtcoolmax |
Definition at line 87 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgtcoolmin |
Definition at line 87 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lref |
Definition at line 86 of file mod_radiative_cooling.t.
| character(len=20) mod_radiative_cooling::rc_fluid::method = 'tables' |
Definition at line 186 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::n_ppl |
Definition at line 105 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::ncool |
Resolution of temperature in interpolated tables.
Definition at line 103 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::nenh_eq_table |
Definition at line 255 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::nh2rhofactor |
Definition at line 188 of file mod_radiative_cooling.t.
|
static |
Definition at line 191 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_cut_dey = 0.15d0 |
Spatial taper width (HEAD addition): Gaussian dey for the spatial taper.
Definition at line 130 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_cut_hgt = 0.0d0 |
Spatial taper height (HEAD addition): suppress cooling within rad_cut_hgt of boundary.
Definition at line 128 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_damp |
cutoff radiative cooling below rad_damp_height
Definition at line 134 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_damp_height |
Definition at line 80 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_damp_scale |
Definition at line 81 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_escape_height = 0.0d0 |
Max height from footpoint for column mass integration (code units); 0 = no limit.
Definition at line 168 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_escape_prob = .false. |
Enable escape probability cooling modification.
Definition at line 156 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_escape_tau_cutoff = 0.0d0 |
Exponential cutoff scale: E *= exp(-tau/tau_cutoff); 0 = disabled.
Definition at line 166 of file mod_radiative_cooling.t.
| character(len=10) mod_radiative_cooling::rc_fluid::rad_escape_type = 'slab' |
Escape probability type: 'slab' = (1-exp(-tau))/tau, 'voigt' = Voigt CRD.
Definition at line 164 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_kappa_alpha = 4.0d0 |
Sigmoid sharpness exponent for kappa(T) cutoff.
Definition at line 162 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_kappa_eff = 0.0d0 |
Effective opacity for escape probability (code units: 1/(density*length))
Definition at line 158 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_kappa_tcutoff = 0.0d0 |
Temperature above which kappa→0 (stored in code units, input in Kelvin); 0 = constant kappa.
Definition at line 160 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_modify |
Master switch for radiative loss modification (spatial + density taper)
Definition at line 124 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_modify_sym |
Apply spatial taper at both boundaries (default: lower only)
Definition at line 126 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_newton = .false. |
Enable local Newton cooling/heating approximation for optically thick losses.
Definition at line 145 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_pthick = 25.d0 |
Definition at line 146 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_rhosurf = 1.d4 |
Definition at line 148 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_trad = 0.006d0 |
Definition at line 147 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_suppress_temp = 0.0d0 |
Suppress cooling for T below this threshold (Kelvin) within rad_cut_hgt of footpoints. When > 0, cells inside the spatial taper region with T < rad_suppress_temp get factor=0; coronal cooling above that T proceeds unmodified. Default 0 = disabled.
Definition at line 119 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_taper_dey |
Gaussian decay width for density taper.
Definition at line 153 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_taper_rho |
Density threshold for Gaussian taper (code units)
Definition at line 151 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rc_split |
Add cooling source in a split way (.true.) or un-split way (.false.)
Definition at line 111 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::subtract_equi = .false. |
whether background equilibrium is compensated in thermal balance
Definition at line 139 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::suppress_temp_code = 0.0d0 |
Internal: suppress threshold in code units (set from rad_suppress_temp during init). Not a namelist parameter.
Definition at line 122 of file mod_radiative_cooling.t.
|
static |
Definition at line 192 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::t_ppl |
Definition at line 91 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::tcoff_ |
Index of cut off temperature for TRAC.
Definition at line 99 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::tcool |
Definition at line 84 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tcoolmax |
Definition at line 86 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tcoolmin |
Definition at line 86 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::tfix |
Fixed temperature not lower than tlow.
Definition at line 108 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tlow |
Lower limit of temperature.
Definition at line 94 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tref |
Definition at line 86 of file mod_radiative_cooling.t.
|
static |
Definition at line 193 of file mod_radiative_cooling.t.
| double precision, dimension(:,:), allocatable mod_radiative_cooling::rc_fluid::y_mod |
Variable-c_V Townsend extension (Y_mod). Built only when flionE.
Y_mod(j, i) is the modified TEF (units of code time) at the (log10 nH index j, T index i) grid point. Indexing follows the existing AMRVAC convention: Y(ncool) = 0 at the top T = tcoolmax, and Y monotonically increases as T decreases. The j axis matches the eoseint_from_T table's nH grid (var1_min..var1_max, dim1).
Construction: change-of-variables u = e_int/n_H. The integrand 1/(n_e Lambda) is sampled at composite Simpson or Boole nodes between [u(T_i), u(T_{i+1})]. See build_Y_mod_table.
Lookups: findY_mod(T, nH, fl) returns Y by bilinear interpolation in (log_nH, log_T). findT_mod(Y, nH, fl) returns T by bisection on the row at the interpolated nH. (A precomputed inverse table variant was prototyped during development but proved unusable: at extreme nH the per-row Y_max varies so widely that bilinear blending between rows mixes physically saturated and unsaturated entries. The bisect path is O(log ncool) ≈ 12 iterations anyway.)
Definition at line 214 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::y_mod_built = .false. |
Build flag — set to .true. only after the table has been populated by build_Y_mod_table (called from bind_eos_to_source after eos_finalise).
Definition at line 222 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_max = 0.0d0 |
Definition at line 218 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_min = 0.0d0 |
Definition at line 217 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_step_inv = 0.0d0 |
Definition at line 219 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::y_mod_max_per_row |
Definition at line 215 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::y_mod_n_nh = 0 |
Definition at line 216 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::y_mod_n_sub = 16 |
Number of sub-intervals per [u_i, u_{i+1}] segment for the quadrature.
Definition at line 226 of file mod_radiative_cooling.t.
| character(len=8) mod_radiative_cooling::rc_fluid::y_mod_quadrature = 'boole' |
Quadrature method: 'simpson' (3-point, O(h^4)) or 'boole' (5-point, O(h^6))
Definition at line 224 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::y_ppl |
Definition at line 91 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::yc |
Definition at line 85 of file mod_radiative_cooling.t.