Skip to main content

FlrwMetric

Struct FlrwMetric 

Source
pub struct FlrwMetric {
    pub scale_factor: f64,
    pub curvature: Curvature,
    pub hubble_param: f64,
}
Expand description

FLRW metric parameters (OCS §1.2).

Fields§

§scale_factor: f64

Scale factor a(t) — dimensionless, a(now) = 1.0

§curvature: Curvature

Curvature parameter

§hubble_param: f64

Hubble parameter H = ȧ/a at the current epoch (1/s)

Implementations§

Source§

impl FlrwMetric

Source

pub fn flat_present_epoch() -> Self

Create a flat ΛCDM metric at the current epoch (a=1).

Source

pub fn spatial_line_element(&self, r: f64, theta: f64) -> f64

FLRW line element: ds² = -c²dt² + a(t)²[dr²/(1-kr²) + r²(dθ² + sin²θ dφ²)]

Compute the proper distance element for a radial comoving coordinate. Returns ds² (spatial part only, dt=0) for a given comoving radius r.

Source

pub fn physical_distance(&self, comoving_r: f64) -> f64

Physical distance from comoving distance: d_phys = a(t) * r_comoving (OCS §1.2).

Source

pub fn redshift(&self, a_emit: f64) -> f64

Cosmological redshift: 1 + z = a(t_obs) / a(t_emit) (OCS §1.2).

Source

pub fn hubble_velocity(&self, distance_m: f64) -> f64

Hubble’s law: v = H(z) * d (OCS §1.2). At low redshift, v = H₀ * d.

Source

pub fn redshift_to_distance(&self, z: f64) -> f64

Convert redshift to comoving distance (approximate, low-z linear). d ≈ c * z / H₀ for z << 1.

Source

pub fn distance_to_redshift(&self, distance_m: f64) -> f64

Convert distance to redshift (approximate, low-z linear).

Source

pub fn intercept_vector_comoving( &self, target_comoving_pos_mpc: [f64; 3], target_peculiar_vel_km_s: [f64; 3], interceptor_beta: f64, ) -> Result<ComovingInterceptSolution, FlrwInterceptError>

Compute a comoving intercept vector and arrival solution for a target at target_comoving_pos_mpc with peculiar velocity target_peculiar_vel_km_s pursued by an interceptor traveling at speed $v_{\text{int}} = \beta c_0$ (Packet OCS-12).

§Cosmological Epoch & Trajectory Assumptions
  • Evaluates physical separation $\mathbf{r}_0 = a(t_0),\boldsymbol{\chi}_0$ at epoch $a(t_0)$.
  • Target effective velocity in the local comoving chart combines Hubble flow and peculiar velocity: $\mathbf{v}{\text{eff}} = \mathbf{v}{\text{pec}} / a(t_0)$ in comoving coordinates, while the physical radial recession check enforces $v_{\text{H}} = H(t_0) |\mathbf{r}_0| < \beta c_0$.
  • Solves the quadratic intercept condition $|\mathbf{r}0 + \mathbf{v}{\text{eff}} \Delta t|^2 = (\beta_{\text{eff}} c_0 \Delta t)^2$ where $\beta_{\text{eff}} c_0 = \beta c_0 - v_{\text{H}}$ accounts for Hubble expansion along the line of sight.
Source

pub fn to_value(&self) -> Value

Converts to value.

Trait Implementations§

Source§

impl Clone for FlrwMetric

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FlrwMetric

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FlrwMetric

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FlrwMetric

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,