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

propertyClassvoid

Allocate and return the concrete radiativeTransferPropertiesMatter object used to store per-cell matter properties (density, temperature, ionization fractions) in the computational domain.

  • class(radiativeTransferPropertiesMatter), intent(inout), allocatable :: properties

populateDomainvoid

Populate 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 ), intent(inout) :: properties

  • class(computationalDomainVolumeIntegratorClass), intent(inout) :: integrator

  • logical , intent(in ) :: onProcess

broadcastDomainvoid

Broadcast 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 , intent(in ) :: sendFromProcess

  • class (radiativeTransferPropertiesMatter), intent(inout) :: properties

resetvoid

Reset 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 ), intent(inout) :: properties

absorptionCoefficientdouble precision

Return 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 ), intent(inout) :: properties

  • class(radiativeTransferPhotonPacketClass), intent(inout) :: photonPacket

accumulatePhotonPacketvoid

Accumulate 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 ), intent(inout) :: properties

  • class (radiativeTransferPhotonPacketClass), intent(inout) :: photonPacket

  • double precision , intent(in ) :: absorptionCoefficient, lengthTraversed

interactWithPhotonPacketlogical

Attempt 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 ), intent(inout) :: properties

  • class(radiativeTransferPhotonPacketClass), intent(inout) :: photonPacket

stateSolvevoid

Solve 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), intent(inout), target :: properties

  • integer , intent( out), optional :: status

convergenceMeasuredouble precision

Return 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), intent(inout) :: properties

outputPropertydouble precision

Return 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), intent(inout) :: properties

  • integer(c_size_t ), intent(in ) :: output

countOutputsinteger(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.

outputNametype(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), intent(in ) :: output

accumulationReductionvoid

Perform reduction across MPI processes of accumulated properties.

  • class(radiativeTransferPropertiesMatter), intent(inout) :: properties

broadcastStatevoid

Broadcast 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 , intent(in ) :: sendFromProcess

  • class (radiativeTransferPropertiesMatter), intent(inout) :: properties

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 — Return the total rate of recombinations (in units of s\(^{-1}\)).

  • absorptionCoefficientSpecies — Return the total rate of recombinations (in units of s\(^{-1}\)).

  • historyUpdate — Update the ionization state history in a properties object.

  • crossSectionPhotoIonization — Compute the total photoionization cross section for the given element and ionization state.

Parameters

  • [iterationAverageCount] (default 5) — The number of iterations over which to average the photoionization rate.

  • [temperatureMinimum] (default 1.0d0) — The minimum temperature that matter is allowed to reach in the case of zero photoheating.

  • [abundancePattern] (default var_str('solar')) — 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] (default metallicitySolar) — 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] (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] (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] (default .false.) — If true, output absorption coefficients of each species (at the hydrogen Lyman continuum edge).

  • [convergencePercentile] (default 0.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.