#import "helpers.typ": *
= Introduction

The formation of the earliest astrophysical objects, such as stars, galaxies, and black holes, have a profound influence on the evolution of the universe. Though poorly understood, these events have shaped the characteristics of our current universe, including the structure and distribution of matter itself.
// Citation about an overview paper on ionization vs structure formation.
Despite the milestones achieved in observational cosmology, many aspects of the early universe and its dark ages remain difficult to probe. While traditional measurements provide insights into relatively recent epochs, and the cosmic microwave background (CMB) serves as an early snapshot of the universe, the dark ages are incompatible with direct observations. They represent a critical link between the late-time universe and the primordial conditions that has remained largely unexplored.

The epoch of reionization (EOR) spans the time period from the end of the dark ages until the time when the universe is fully ionized again. It is a period of complex interactions between matter and radiation but it is crucial to understand as it sets the stage for the subsequent evolution of the universe.
// including the formation of galaxies and large-scale structures.
// It simultaneously is affected by the fundamental mechanisms and also affects the subsequent evolution of the universe.
Beyond its impact on the late universe, a detailed understanding of the reionization process has been shown to provide new and competitive constraints on the current cosmological model (e.g.
@Mao_2008
@McQuinn_2006
@schneider2023cosmologicalforecast21cmpower
).
Understanding and being able to model the EOR is therefore essential for a comprehensive picture of cosmology.

The dark ages of the universe refer to the period after recombination where the primordial atoms remain neutral. They are characterized by the total lack of sources of radiation (beyond the radiation background). The dominant interactions during that period are either gravitational or due to the cooling of the primordial gas. During that time the formation of the first stars is obstructed by the lack of efficient cooling mechanisms in the absence of heavier nuclei. With the simplest cooling channel being the deexcitation of atomic hydrogen, the gas inside a virialized structure can only collapse if the enclosed mass is high enough. This so-called atomic cooling limit sets a minimum mass for the halos that can host star formation at around $10^8 M_(dot.circle)$. Other cooling channels such as the deexcitation of molecular hydrogen are suppressed by the emission of photons from the first stars.
// => argument that there is no "galaxy" in that sense below

The formation of the first stars marks the end of the dark ages. These so-called population III stars have zero metallicity and very distinct characteristics compared to later generations of stars. Their existence has not been confirmed observationally but they are thought to have shaped the subsequent formation of stars and galaxies and to have played a crucial role in the reionization of the universe (e.g. @Mebane_2020).

// Paragraph talking about the evolution of the IGM and the formation of ionized bubbles around sources.
Driven by the newly formed stars and galaxies, reionization is explained as an inside-out process (e.g. @10.1111-j.1365-2966.2006.10502.x) expanding from within the halos that host the first galaxies. The ionizing radiation emitted by these sources reaches the intergalactic medium (IGM) and creates ionized bubbles that grow and eventually overlap to fully ionize the universe again.

While reionization marks the gradual disappearance of neutral hydrogen, the preceeding abundance during the dark ages and cosmic dawn allows for an additional mode of observation: the 21-cm line. Due to the hyperfine transition of neutral hydrogen there is a characteristic emission or absorption of photons at a frequency of $1420 "MHz"$. The strength of this signal depends on the local conditions, encoded by the spin temperature. The redshifting of the photons allows to probe different epochs through the observed frequency.

The detection of the 21-cm signal of reionization is a major goal of current and upcoming radio telescopes, for instance the
Square Kilometer Array #cite(<SKAlow>, form: "normal", supplement: "SKA")
or the Hydrogen Epoch of Reionization Array #cite(<HERA>, form: "normal", supplement: "HERA")
. These instruments are expected to detect the power spectrum of the 21-cm signal, providing further insights into the dynamics of the early universe. In particular the low-frequency component SKA-Low is expected to have the sensitivity to image the 21-cm signal directly and to produce maps of the ionization field during the EOR.

Beyond observations, an additional pillar of understanding the EOR is the modeling and simulation of the universe during that time. The main purpose of simulations is to constrain the EOR observables. Combined with the first observations, simulations will generate a wealth of information about the early universe at a range of redshifts that has previously been inaccessible. With the highest sensitivity and resolution forecasted for these observations, the simulations must be able to capture the full dynamic range of the interactions from the small-scale physics of star formation and feedback to the large-scale structure of the universe.

State-of-the-art simulations need to implement a range of physical processes, including gravitational interactions, hydrodynamics, radiative transfer, and feedback mechanisms. Prominent examples include for instance the #thesan simulations
#cite(<Kannan_2021>, form: "normal")
#cite(<Garaldi_2022>, form: "normal")
#cite(<Smith_2022>, form: "normal")
.
Another approach is to use ray-tracing algorithms which give detailed descriptions of the radiative transfer (see e.g. @MELLEMA2006374).
// Shortcomings of similar codes => justification for the development of #beorn (@Schaeffer_2023).
These simulations are computationally expensive and cannot be used to to repeatedly explore the parameter space of reionization.


This work presents #beorn, the _Bubbles during the Epoch of Reionization Numerical simulator_ by @Schaeffer_2023. In its simplest description #beorn is the implementation of the "halo model of reionization" by @schneider2023cosmologicalforecast21cmpower. In this model the radiative interactions are described through spherically symmetric profiles around sources embedded in dark matter halos. This effectively reduces the dimensionality of the radiative transfer problem. #beorn uses the one-dimensional (1-d) profiles generated by this model to paint the 3-d space around halos which are obtained from a large-scale #nbody simulation. A distinguishing feature of #beorn is the self-consistent treatment of the expansion of the affected regions around the sources. This approach allows for simulations at the largest scales while still taking into account the core processes of reionization. The computational efficiency of #beorn makes it suitable to explore the underlying parameters.

// growth of individual sources over the course of the simulation.
The first iteration of #beorn focused on the impact of parameters related to the emission of photons whereas this work focuses on the effects of gravitational mass accretion. We show that the radiation profiles are sensitive to the growth rate and that the mass accretion history provdied by #nbody simulations is too complex to be captured by simple parametrizations. Our improved version of #beorn permits a more consistent treatment by considering the individual mass accretion history of each source. We demonstrate the resulting measurable effects on the 21-cm observables when compared to the simpler models.

This report is structured as follows: @procedure describes the details of the simulation procedure, including the underlying model. @halo_mass_history explains how mass evolution is modeled and its impact on the flux profiles used by #beorn.
In @implementation we give an overview of the implementation and changes required by the refined modeling.
// assumed by #beorn and the steps required to produce a full 3-d lightcone simulation.
// self-consistent treatment of mass accretion.
@validation details the validation we perform on the refined procedure and in @results we compare the resulting signals to quantify the impact of different models of mass accretion. @conclusion summarizes our findings and discusses potential future improvements.

Note that throughout this report, physical distance units are specified with the prefix "p", while comoving distance units are specified with the prefix "c".


// Other points to mention
// - wouthuysen
// - cold reionization
// - comoving distances - check consistency

// how #beorn compares to traditional approaches
