Skip to content

Profiles & EUV Attenuation ​

Single-Component Radial Profiles ​

All single-component radial profiles subtype AbstractNeutralProfile and share the allocation-free neutral_density and local_scale_height interface (H(r) = -1 / (d\ln n / dr)):

  • ExponentialProfile: Hydrostatic isothermal envelope with constant scale height :

    Setting H = Inf produces a constant density (local_scale_height == 0).

  • PowerLawProfile: Radial power-law envelope with exponent   (e.g.,   for radial outflow / Haser limit):

    Small integer powers   use multiplication instead of ^.

  • ChamberlainProfile: Classical exospheric hydrostatic distribution with scale parameter :

  • ExosphereProfile (constructed via exosphere_profile): Combined power-law and exponential envelope callable directly in 1D (x,), 2D (x, y), and 3D (x, y, z) coordinates around center:

julia
using Exosphere

exp_p = ExponentialProfile(10.0, 1.0, 0.5)
pl_p = PowerLawProfile(10.0, 1.0, 2.0)
ch_p = ChamberlainProfile(10.0, 1.0, 2.0)
haser = exosphere_profile(; n0 = 9.0, r0 = 1.0, H = Inf, power = 2.0)

println("Exponential: n(1.5) = ", round(neutral_density(exp_p, 1.5); sigdigits = 4),
    ", H = ", local_scale_height(exp_p, 1.5))
println("PowerLaw:    n(2.0) = ", neutral_density(pl_p, 2.0),
    ", H = ", local_scale_height(pl_p, 2.0))
println("Chamberlain: n(2.0) = ", round(neutral_density(ch_p, 2.0); sigdigits = 4),
    ", H = ", local_scale_height(ch_p, 2.0))
println("Haser 3D:    n(3,0,0) = ", haser(3.0, 0.0, 0.0))
Exponential: n(1.5) = 3.679, H = 0.5
PowerLaw:    n(2.0) = 2.5, H = 1.0
Chamberlain: n(2.0) = 3.679, H = 2.0
Haser 3D:    n(3,0,0) = 1.0

Multi-Component Exosphere Models ​

NeutralComponentCode packs a species' profile selector (:exponential, :powerlaw, or :chamberlain), surface density at , scale height , power exponent , neutral temperature , and label. build_exosphere_model combines a list of components into an ExosphereModel queried via n_components, exo_component_density, exo_density, and exo_scale_height.

Cylindrical Shadow vs. Optical Depth & Chapman Attenuation ​

ExosphereModel supports either geometric shadowing or radiative EUV absorption (mutually exclusive):

  • Geometric Shadow Cylinder (ShadowCylinder): Points behind the planet (  , downstream distance ) within cylinder radius have in_shadow== true and shadow_factor== 0.0; all other points have attenuation 1.0.

  • Plain Optical Depth (OpticalDepth with chapman = false): Computes vertical optical depth   on the dayside ( ) and grazing-ray optical depth   at impact parameter    on the nightside, returning   (and when   or  ).

  • Smith & Smith (1972) Chapman Function (OpticalDepth with chapman = true): Uses chapman_function(Xp, cos_sza) with   for the dominant absorbing component (chapman_component, auto-selected by maximum when unspecified) so that optical depth   transitions smoothly across the terminator ( ) into the nightside shadow.

julia
using Exosphere
using StaticArrays

sc = ShadowCylinder(; solar_dir = (1.0, 0.0, 0.0), radius = 1.0)
o_comp = NeutralComponentCode(:exponential, 100.0, 0.2, 0.0, 0.01, "O")

od_plain = OpticalDepth(; cross_sections = [0.05], solar_dir = (1.0, 0.0, 0.0), chapman = false)
od_chap = OpticalDepth(; cross_sections = [0.05], solar_dir = (1.0, 0.0, 0.0), chapman = true)
exo_plain = build_exosphere_model(; planet_radius = 1.0, components = [o_comp], optical_depth = od_plain)
exo_chap = build_exosphere_model(; planet_radius = 1.0, components = [o_comp], optical_depth = od_chap)

x_day = SVector(1.5, 0.0, 0.0)
x_term = SVector(0.0, 1.5, 0.0)
x_night = SVector(-1.5, 0.5, 0.0)

for (label, x) in (("Dayside   ", x_day), ("Terminator", x_term), ("Nightside ", x_night))
    r = sqrt(x[1]^2 + x[2]^2 + x[3]^2)
    println(
        label,
        " | shadow = ", shadow_factor(sc, x),
        " | plain = ", round(photo_attenuation(exo_plain, x, r); sigdigits = 4),
        " | chapman = ", round(photo_attenuation(exo_chap, x, r); sigdigits = 4),
    )
end
Dayside    | shadow = 1.0 | plain = 0.9212 | chapman = 0.9288
Terminator | shadow = 1.0 | plain = 0.5692 | chapman = 0.7542
Nightside  | shadow = 0.0 | plain = 1.0e-5 | chapman = 1.0e-6