Radiative Transfer Matter¶
Class providing matter types for Monte Carlo radiative transfer calculations—the physical description of the gas and dust that photon packets interact with as they propagate through the computational domain. Methods populate domain cells with matter properties (density, temperature, ionization fractions), compute the absorption coefficient at each packet wavelength, accumulate absorbed energy from traversing packets, and update the matter state (e.g. photoionization equilibrium) after each iteration. The default implementation models atomic hydrogen gas.
Default implementation: radiativeTransferMatterAtomic
Methods¶
propertyClassAllocate and return the concrete
radiativeTransferPropertiesMatterobject used to store per-cell matter properties (density, temperature, ionization fractions) in the computational domain.class(radiativeTransferPropertiesMatter) properties[inout]
populateDomainPopulate the given domain cell with matter properties (density, composition, initial temperature) by querying the volume integrator, setting up the local state for subsequent photon-packet propagation.
class(radiativeTransferPropertiesMatter) properties[inout]class(computationalDomainVolumeIntegratorClass) integrator[inout]logical onProcess[in]
broadcastDomainBroadcast the populated domain cell properties from the specified MPI process to all other processes, ensuring all ranks share a consistent initial matter state before photon propagation begins.
integer sendFromProcess[in]class(radiativeTransferPropertiesMatter) properties[inout]
resetReset the accumulated radiation-field tallies (absorbed energy, photon counts) stored in the cell properties to zero in preparation for a new Monte Carlo iteration of photon propagation.
class(radiativeTransferPropertiesMatter) properties[inout]
absorptionCoefficient→double precisionReturn the absorption coefficient (in units of inverse length) of the matter in the given cell at the wavelength of the photon packet, used to compute the mean free path during packet propagation.
class(radiativeTransferPropertiesMatter) properties[inout]class(radiativeTransferPhotonPacketClass) photonPacket[inout]
accumulatePhotonPacketAccumulate the energy deposited by the photon packet into the cell properties, recording the absorbed luminosity and packet-crossing statistics for the current Monte Carlo iteration.
class(radiativeTransferPropertiesMatter) properties[inout]class(radiativeTransferPhotonPacketClass) photonPacket[inout]double precision absorptionCoefficient[in]double precision lengthTraversed[in]
interactWithPhotonPacket→logicalAttempt a physical interaction (e.g. absorption, scattering, or re-emission) between the matter and the photon packet, updating the packet properties and returning true if an interaction occurred.
class(radiativeTransferPropertiesMatter) properties[inout]class(radiativeTransferPhotonPacketClass) photonPacket[inout]
stateSolveSolve for the equilibrium matter state (e.g. photoionization balance, dust temperature) in the given cell based on the radiation field accumulated during the current iteration, updating the cell properties in place.
class(radiativeTransferPropertiesMatter) properties[inout]integer status(optional) [out]
convergenceMeasure→double precisionReturn a scalar convergence measure (e.g. the fractional change in ionization fraction or temperature) for the given cell between the current and previous iterations, used to assess global radiative transfer convergence.
class(radiativeTransferPropertiesMatter) properties[inout]
outputProperty→double precisionReturn the value of the indexed output property (e.g. ionization fraction, temperature, or density) for the given cell, as written to the output HDF5 file after convergence.
class(radiativeTransferPropertiesMatter) properties[inout]integer(c_size_t) output[in]
countOutputs→integer(c_size_t)Return the total number of scalar output properties provided by this matter implementation, used to allocate output arrays before iterating over individual property names and values.
outputName→type(varying_string)Return the name of the output property at the given index, used as the dataset name when writing per-cell matter properties to the HDF5 output file.
integer(c_size_t) output[in]
accumulationReductionPerform reduction across MPI processes of accumulated properties.
class(radiativeTransferPropertiesMatter) properties[inout]
broadcastStateBroadcast the solved matter state (ionization fractions, temperatures, and other cell properties) from the specified MPI process to all other processes after the state-solve step.
integer sendFromProcess[in]class(radiativeTransferPropertiesMatter) properties[inout]
radiativeTransferMatterAtomic¶
A radiative transfer matter class for atomic gas, computing photoionization, collisional ionization, recombination, and thermal equilibrium for hydrogen and helium. The abundance pattern and metallicity are set via the [abundancePattern] and [metallicity] parameters, and the temperature floor is controlled by [temperatureMinimum].
(Default implementation)
Methods
recombinationRateHydrogen→double precisionReturn the total rate of recombinations (in units of s\(^{-1}\)).
type(radiativeTransferPropertiesMatterAtomic) properties[inout]
absorptionCoefficientSpecies→double precisionReturn the total rate of recombinations (in units of s\(^{-1}\)).
integer elementIndex[in]integer ionizationState[in]double precision wavelength[in]class(radiativeTransferPropertiesMatter) properties[inout]
historyUpdateUpdate the ionization state history in a properties object.
class(radiativeTransferPropertiesMatter) properties[inout]
crossSectionPhotoIonization→double precisionCompute the total photoionization cross section for the given element and ionization state.
integer elementIndex[in]integer ionizationState[in]double precision wavelength[in]
Parameters
[iterationAverageCount](integer; default5) — The number of iterations over which to average the photoionization rate.[temperatureMinimum](real; default1.0d0) — The minimum temperature that matter is allowed to reach in the case of zero photoheating.[abundancePattern](string; defaultsolar) — The elemental abundance pattern (e.g.solar) used to set the relative number densities of the tracked species relative to hydrogen when computing photoionization and cooling rates.[metallicity](real; defaultmetallicitySolar) — The gas metallicity (in units of \(Z_\odot\)) used to scale the heavy-element abundances relative to the solar pattern when computing photoionization equilibrium and cooling.[elements](string; default['H']) — The list of chemical element symbols (e.g.H,He) whose photoionization equilibrium is tracked; defaults to hydrogen only if not specified.[outputRates](boolean; default.false.) — If true, write the per-cell photoionization and photoheating rates for each tracked element to the output HDF5 file in addition to the standard ionization-fraction and temperature outputs.[outputAbsorptionCoefficients](boolean; default.false.) — If true, output absorption coefficients of each species (at the hydrogen Lyman continuum edge).[convergencePercentile](real; default0.90d0) — The percentile of the per-cell convergence measure distribution used to assess global convergence; e.g. 0.90 means convergence is declared when 90% of cells satisfy the convergence tolerance.