Sources API

The Sources module provides semi-analytic plasma models — alternatives to a GRMHD snapshot when you want a controlled, reproducible emission region.

All sources implement the source_plasma_at seam, which is the single point both the imaging pipeline and the Monte Carlo module call to obtain plasma state at a position.

BlackLightPlus.SourcesModule
Sources

Semi-analytic plasma source models: Polish doughnut, Page–Thorne thin disk, and orbiting hot spot, derived equation-first from the published papers. Each model is a pure isbits struct implementing source_plasma_at(src, st, x), returning the decoded-plasma NamedTuple consumed by the Radiation coefficients. Signature (-,+,+,+), G = c = M = 1, Cartesian Kerr–Schild; axisymmetric quantities use the Killing vectors xi = dt and eta = dphi = (0,-y,x,0), so the circular-orbit machinery works directly in the CKS frame. AD-generic.

source

Interface

BlackLightPlus.Sources.AbstractSourceType
AbstractSource

Base type for every analytic plasma model. A concrete src <: AbstractSource is a pure parameter struct and must implement

source_plasma_at(src, st, x::SVector{4}) -> NamedTuple

(the grmhd plasma_at tuple, see the module docstring).

source
BlackLightPlus.Sources.source_plasma_atFunction
source_plasma_at(src::AbstractSource, st, x::SVector{4}) -> NamedTuple

Emitting-plasma state at CKS 4-position x for analytic model src in spacetime st: (n_e, theta_e, B, ucon, ucov, bcon, gcov, gcon, inside) with n_e [cm^-3], theta_e = k T_e/(m_e c^2) dimensionless, B [Gauss], ucon/ucov normalized u.u = -1, and bcon a UNIT spacelike field direction (b.b = +1, b.u = 0) — the synchrotron coefficients take the pitch angle from its direction and the field strength from the scalar B. inside == false (zeroed plasma, valid metric) marks vacuum. Each concrete source provides a method.

source

Models

BlackLightPlus.Sources.PolishDoughnutType
PolishDoughnut(a; l0=nothing, lambda=nothing, r_center=nothing,
               n_e_center=1e7, theta_e_center=50.0, polytrope_n=1.5,
               beta=10.0, W_surface=nothing, fill_factor=0.9, prograde=true)

Constant-l Abramowicz equilibrium torus around a Kerr hole of spin a. The angular momentum comes from exactly one of r_center (l0 = lK(rcenter)), l0 directly, or lambda ∈ (0,1) (l0 = lambda (lmb - lms) + lms), in that priority order; default lambda = 0.5. A closed torus needs lms < l0 < lmb. `necenter/thetaecenterset the central density [cm^-3] and temperature;polytropenis the polytropic index n (Gamma = 1+1/n);betasets |B| from p_gas.Wsurface` overrides the surface potential (default: cusp potential, Roche-lobe-filling); if the cusp overflows (l0 >= lmb), fill_factor ∈ (0,1) sets the surface that fraction down the central well so r_out stays finite. Derived geometry is precomputed; the struct is isbits.

source
BlackLightPlus.Sources.PageThorneDiskType
PageThorneDisk(a; mdot=1.0, r_out=50.0, n_e_max=1e6, theta_e_max=1.0,
               beta=10.0, scale_height=0.05, prograde=true)

Page–Thorne thin accretion disk around a Kerr hole of spin a. mdot scales the flux; r_out is the outer edge of the volumetric model. The volumetric plasma is a thin Gaussian layer of relative half-thickness scale_height (H/r) about the equator, with peak density n_e_max [cm^-3] and peak temperature theta_e_max located at the flux maximum, and |B| set by plasma-beta. The ISCO x-roots and the flux peak are precomputed; the struct is isbits.

source
BlackLightPlus.Sources.EquatorialHotspotType
EquatorialHotspot(a; r_orbit=6.0, t0=0.0, phi0=0.0, R_spot=0.5,
                  n_e0=1e6, theta_e0=50.0, B0=10.0,
                  ambient_n_e=0.0, ambient_theta_e=0.0, ambient_B=0.0,
                  prograde=true)

Gaussian hot spot on a circular equatorial Keplerian orbit at Boyer–Lindquist radius r_orbit, phase phi0 at time t0. R_spot is the Gaussian sigma (proper units); n_e0/theta_e0/B0 are the peak spot density [cm^-3], temperature and field [Gauss]. A uniform ambient_* background (default off) can be superposed. The struct is isbits and AD-generic: source_plasma_at differentiates cleanly w.r.t. r_orbit (and the other parameters).

source

Model internals

BlackLightPlus.Sources.torus_potentialFunction
torus_potential(src::PolishDoughnut, st, x::SVector{4}) -> W

Relativistic effective potential W = ln|u_t| of the constant-l flow at CKS position x (publication sign; minimum at the pressure-max centre). Returns +Inf where the constant-l flow is undefined (the fluid 4-velocity would be imaginary).

source
BlackLightPlus.Sources.page_thorne_fluxFunction
page_thorne_flux(disk::PageThorneDisk, r) -> F(r)

Time-averaged radiative flux F(r) of the Page–Thorne disk at Boyer–Lindquist radius r (natural G=c=M=1 units, scaled by mdot). Zero at and inside the ISCO, positive outside, ~r^-3 at large r.

source
BlackLightPlus.Sources.page_thorne_temperatureFunction
page_thorne_temperature(disk::PageThorneDisk, r; flux_scale=1.0) -> T_eff

Effective blackbody temperature T = (fluxscale * F(r) / sigmaSB)^{1/4}. flux_scale converts the natural-unit flux to cgs (= c^6/(G^2 M^2) * Mdot_cgs for a chosen mass and accretion rate); the default returns the natural-unit temperature shape (0 at the ISCO, peaked, -> 0 at large r).

source
BlackLightPlus.Sources.hotspot_centerFunction
hotspot_center(src::EquatorialHotspot, t) -> (x_c, y_c, z_c)

CKS position of the spot centre at coordinate time t (phic = phi0 + OmegaK (t - t0), Rc = sqrt(rorbit^2 + a^2), equatorial).

source