|
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). | |
| integer | iw_mask_ = -1 |
| wextra index of a user mask multiplying the thin losses (0 off, 1 on); -1 = no mask | |
| integer | iw_tracmask_ = -1 |
| wextra index of a user mask for TRAC scaling of the losses (0 unscaled, 1 scaled); -1 none | |
| 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. | |
| logical | method_analytic = .false. |
| analytic Saha EoS method, set at bind | |
| double precision | inv_gamma_minus_1 |
| double precision | nh2rhofactor |
| double precision | eion_per_nh |
| double precision | log_t_floor = -30.0d0 |
| lower log10(T) bound of the (rho,T) inverse table, to clamp tlow lookups | |
| 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 |
| double precision | y_mod_lg_nh_step = 0.0d0 |
| step of the nH axis in log10, zero for a single row | |
| 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). | |
| double precision | t_ymod_max = huge(1.0d0) |
| rc_T_Ymod_max_K in code units, set at bind: above it c_V is constant and Townsend is exact | |
| 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_2var_subr), pointer, nopass | get_ne_nh_equi => null() |
| procedure(local_rho2_factor_subr), pointer, nopass | get_rho2_factor => 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 90 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::a_ppl |
Definition at line 103 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 144 of file mod_radiative_cooling.t.
| character(len=std_len) mod_radiative_cooling::rc_fluid::coolcurve |
Name of cooling curve.
Definition at line 189 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::dldtcool |
Definition at line 96 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::e_ |
Index of the energy density.
Definition at line 109 of file mod_radiative_cooling.t.
|
static |
Definition at line 209 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::eion_per_nh |
Definition at line 208 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 155 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::frac_lowfip |
Definition at line 153 of file mod_radiative_cooling.t.
|
static |
Definition at line 197 of file mod_radiative_cooling.t.
|
static |
Definition at line 198 of file mod_radiative_cooling.t.
|
static |
Definition at line 194 of file mod_radiative_cooling.t.
|
static |
Definition at line 195 of file mod_radiative_cooling.t.
|
static |
Definition at line 191 of file mod_radiative_cooling.t.
|
static |
Definition at line 199 of file mod_radiative_cooling.t.
|
static |
Definition at line 193 of file mod_radiative_cooling.t.
|
static |
Definition at line 192 of file mod_radiative_cooling.t.
|
static |
Definition at line 200 of file mod_radiative_cooling.t.
|
static |
Definition at line 196 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 149 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::inv_gamma_minus_1 |
Definition at line 206 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 203 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::isppl = .false. |
Definition at line 125 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 182 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::iw_mask_ = -1 |
wextra index of a user mask multiplying the thin losses (0 off, 1 on); -1 = no mask
Definition at line 184 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::iw_tracmask_ = -1 |
wextra index of a user mask for TRAC scaling of the losses (0 unscaled, 1 scaled); -1 none
Definition at line 186 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::l_ppl |
Definition at line 103 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_e n_H (their Lambda_N, Table 2) 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 279 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::lcool |
Definition at line 96 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgstep |
Definition at line 99 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgtcoolmax |
Definition at line 99 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lgtcoolmin |
Definition at line 99 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::log_t_floor = -30.0d0 |
lower log10(T) bound of the (rho,T) inverse table, to clamp tlow lookups
Definition at line 211 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::lref |
Definition at line 98 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::method_analytic = .false. |
analytic Saha EoS method, set at bind
Definition at line 205 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::n_ppl |
Definition at line 117 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::ncool |
Resolution of temperature in interpolated tables.
Definition at line 115 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::nenh_eq_table |
Definition at line 280 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::nh2rhofactor |
Definition at line 207 of file mod_radiative_cooling.t.
|
static |
Definition at line 212 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 142 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 140 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_damp |
cutoff radiative cooling below rad_damp_height
Definition at line 146 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_damp_height |
Definition at line 92 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_damp_scale |
Definition at line 93 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 180 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::rad_escape_prob = .false. |
Enable escape probability cooling modification.
Definition at line 168 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 178 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 176 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 174 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 170 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 172 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 136 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 138 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 157 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_pthick = 25.d0 |
Definition at line 158 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_rhosurf = 1.d4 |
Definition at line 160 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::rad_newton_trad = 0.006d0 |
Definition at line 159 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 131 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 165 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 163 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 123 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 151 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 134 of file mod_radiative_cooling.t.
|
static |
Definition at line 213 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::t_ppl |
Definition at line 103 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::t_ymod_max = huge(1.0d0) |
rc_T_Ymod_max_K in code units, set at bind: above it c_V is constant and Townsend is exact
Definition at line 247 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::tcoff_ |
Index of cut off temperature for TRAC.
Definition at line 111 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::tcool |
Definition at line 96 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tcoolmax |
Definition at line 98 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tcoolmin |
Definition at line 98 of file mod_radiative_cooling.t.
| logical mod_radiative_cooling::rc_fluid::tfix |
Fixed temperature not lower than tlow.
Definition at line 120 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tlow |
Lower limit of temperature.
Definition at line 106 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::tref |
Definition at line 98 of file mod_radiative_cooling.t.
|
static |
Definition at line 214 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 in (log_nH, log_T), with nH*Y interpolated along nH. 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 235 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 245 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_max = 0.0d0 |
Definition at line 239 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_min = 0.0d0 |
Definition at line 238 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_step = 0.0d0 |
step of the nH axis in log10, zero for a single row
Definition at line 242 of file mod_radiative_cooling.t.
| double precision mod_radiative_cooling::rc_fluid::y_mod_lg_nh_step_inv = 0.0d0 |
Definition at line 240 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::y_mod_max_per_row |
Definition at line 236 of file mod_radiative_cooling.t.
| integer mod_radiative_cooling::rc_fluid::y_mod_n_nh = 0 |
Definition at line 237 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 251 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 249 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::y_ppl |
Definition at line 103 of file mod_radiative_cooling.t.
| double precision, dimension(:), allocatable mod_radiative_cooling::rc_fluid::yc |
Definition at line 97 of file mod_radiative_cooling.t.