Skip to main content

DerivedParams

Struct DerivedParams 

Source
pub struct DerivedParams {
Show 15 fields pub h: f64, pub h2: f64, pub t_cmb0_k: f64, pub t_nu0_base_k: f64, pub t_nu0_k: f64, pub omega_b0: f64, pub omega_cdm0: f64, pub omega_m0: f64, pub omega_k0: f64, pub omega_de0: f64, pub omega_g0: f64, pub omega_ur0: f64, pub omega_nu0: f64, pub omega_gnu0: f64, pub omega_non_de0: f64,
}
Expand description

Single source of truth for cosmological composition at z = 0.

This struct contains only physical densities (ω ≡ Ω h²) and derived temperatures. Any hot-path computations (E(z), distances, growth, etc.) should use values from here to avoid divergence across components.

Fields§

§h: f64

Dimensionless Hubble parameter h.

§h2: f64

h² (cached).

§t_cmb0_k: f64

CMB temperature today in Kelvin.

§t_nu0_base_k: f64

Base neutrino temperature: T_ν0,base = (4/11)^(1/3) * T_cmb0

This is the background temperature used for the Split model.

§t_nu0_k: f64

Effective neutrino temperature used for the Effective model.

This scales the bath by (N_eff / N_species)^(1/4) so the total relativistic energy density matches n_eff.

§omega_b0: f64

Physical baryon density ω_b0.

§omega_cdm0: f64

Physical cold dark matter density ω_cdm0.

§omega_m0: f64

Total matter physical density ω_m0 = ω_b0 + ω_cdm0.

§omega_k0: f64

Physical curvature density ω_k0.

§omega_de0: f64

Physical dark energy density ω_de0 (Λ in ΛCDM).

§omega_g0: f64

Physical photon density ω_γ0.

§omega_ur0: f64

Massless-only (UR) contribution used in the Split model; 0.0 in Effective mode.

§omega_nu0: f64

Total neutrino physical density ω_ν0 (massive + any species included via the model).

§omega_gnu0: f64

Sum of present-day physical densities for photons + UR + neutrinos.

Note: this does not imply strict (1+z)^4 scaling for the massive part at all z.

§omega_non_de0: f64

Sum of all non-dark-energy components today: ω_non_de0 = ω_γ0 + ω_ur0 + ω_ν0 + ω_m0 + ω_k0

Implementations§

Source§

impl DerivedParams

Source

pub fn new( h: f64, t_cmb0: f64, omega_b: f64, omega_cdm: f64, omega_k: f64, omega_de: f64, omega_g: f64, omega_ur: f64, omega_nu: f64, t_nu0_base: f64, t_nu0: f64, ) -> Self

Construct DerivedParams and precompute cached sums.

Trait Implementations§

Source§

impl Clone for DerivedParams

Source§

fn clone(&self) -> DerivedParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DerivedParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.