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: f64Scale factor a(t) — dimensionless, a(now) = 1.0
curvature: CurvatureCurvature parameter
hubble_param: f64Hubble parameter H = ȧ/a at the current epoch (1/s)
Implementations§
Source§impl FlrwMetric
impl FlrwMetric
Sourcepub fn flat_present_epoch() -> Self
pub fn flat_present_epoch() -> Self
Create a flat ΛCDM metric at the current epoch (a=1).
Sourcepub fn spatial_line_element(&self, r: f64, theta: f64) -> f64
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.
Sourcepub fn physical_distance(&self, comoving_r: f64) -> f64
pub fn physical_distance(&self, comoving_r: f64) -> f64
Physical distance from comoving distance: d_phys = a(t) * r_comoving (OCS §1.2).
Sourcepub fn redshift(&self, a_emit: f64) -> f64
pub fn redshift(&self, a_emit: f64) -> f64
Cosmological redshift: 1 + z = a(t_obs) / a(t_emit) (OCS §1.2).
Sourcepub fn hubble_velocity(&self, distance_m: f64) -> f64
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.
Sourcepub fn redshift_to_distance(&self, z: f64) -> f64
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.
Sourcepub fn distance_to_redshift(&self, distance_m: f64) -> f64
pub fn distance_to_redshift(&self, distance_m: f64) -> f64
Convert distance to redshift (approximate, low-z linear).
Sourcepub fn intercept_vector_comoving(
&self,
target_comoving_pos_mpc: [f64; 3],
target_peculiar_vel_km_s: [f64; 3],
interceptor_beta: f64,
) -> Result<ComovingInterceptSolution, FlrwInterceptError>
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.