euv-core 0.53.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
/// Standard physical rest density of liquid water at 20 °C in `kg/m³`.
pub const WATER_REST_DENSITY_KGM3: f32 = 1000.0;

/// Physical refractive index (IOR) of liquid water at visible wavelengths.
pub const WATER_REFRACTIVE_INDEX: f32 = 1.333;

/// Physical dynamic viscosity of pure water at 20 °C in `Pa·s`.
pub const WATER_DYNAMIC_VISCOSITY_PAS: f32 = 0.001_002;

/// Physical air-water surface tension coefficient at 20 °C in `N/m`.
pub const WATER_SURFACE_TENSION_NPM: f32 = 0.072_8;

/// Physical density of pure water ice at 0 °C in `kg/m³` (~91.7% submerged).
pub const ICE_DENSITY_KGM3: f32 = 917.0;

/// Physical density of the lightweight buoyant floating orb in `kg/m³` (~45% submerged).
pub const FLOATING_ORB_DENSITY_KGM3: f32 = 450.0;

/// Default physical handheld glass vessel width in meters (`12 cm`).
pub const DEFAULT_VESSEL_WIDTH_M: f32 = 0.12;

/// Default physical handheld glass vessel height in meters (`9 cm`).
pub const DEFAULT_VESSEL_HEIGHT_M: f32 = 0.09;

/// Minimum allowed water volume fill ratio.
pub const FLUID_MIN_FILL_RATIO: f32 = 0.20;

/// Maximum allowed water volume fill ratio.
pub const FLUID_MAX_FILL_RATIO: f32 = 0.85;

/// Default water volume fill ratio.
pub const FLUID_DEFAULT_FILL_RATIO: f32 = 0.48;

/// Maximum pre-allocated PBF fluid particle capacity (zero steady-state reallocation).
pub const FLUID_MAX_PARTICLES: usize = 960;

/// Maximum pre-allocated entrained micro-bubble / foam capacity.
pub const FLUID_MAX_BUBBLES: usize = 220;

/// Maximum pre-allocated buoyant floating rigid bodies inside the vessel.
pub const FLUID_MAX_BUOYANT_BODIES: usize = 4;

/// Default target particle count at maximum simulation fidelity (`FLUID_MAX_PARTICLES`).
pub(crate) const FLUID_BASE_PARTICLES_HALF_FILL: usize = FLUID_MAX_PARTICLES;

/// Default fixed physics substeps per frame tick at maximum simulation fidelity.
pub(crate) const FLUID_DEFAULT_SUBSTEPS: u32 = 4;

/// Default PBF Jacobi density constraint iterations per substep at maximum simulation fidelity.
pub(crate) const FLUID_DEFAULT_SOLVER_ITERS: u32 = 6;

/// Silent hydrostatic PBF relaxation iterations executed during `reset_water` so Frame 1 starts in exact equilibrium.
pub(crate) const FLUID_HYDROSTATIC_RELAX_ITERS: u32 = 10;

/// Maximum cached PBF neighbor indices stored per particle in the flat zero-alloc neighbor table.
pub(crate) const FLUID_MAX_NEIGHBORS: usize = 32;

/// Smoothing radius multiplier relative to nominal resting particle spacing `d0`.
pub(crate) const FLUID_KERNEL_RADIUS_MULT: f32 = 2.45;

/// Dimensionless CFM relaxation factor scaled by inverse particle area `1 / A_p`.
pub(crate) const FLUID_CFM_RELAXATION_FACTOR: f32 = 0.11;

/// Tensile-instability artificial pressure coefficient (`s_corr`, Macklin & Müller 2013).
pub(crate) const FLUID_SCORR_K: f32 = 0.000_85;

/// Tensile-instability reference distance fraction `Δq / h`.
pub(crate) const FLUID_SCORR_DQ_RATIO: f32 = 0.24;

/// Base XSPH viscosity blending coefficient corresponding to 20 °C water.
pub(crate) const FLUID_BASE_XSPH_COEFF: f32 = 0.042;

/// Additional free-surface XSPH velocity smoothing keeping gravity-capillary waves coherent without breakup.
pub(crate) const FLUID_SURFACE_XSPH_BOOST: f32 = 0.065;

/// Physical bulk viscous damping rate per second (`s⁻¹`) allowing natural wave sloshing while converging cleanly to rest.
pub(crate) const FLUID_VISCOUS_DAMP_PER_SEC: f32 = 0.62;

/// Sub-millimeter PBF constraint-creep damping rate (`s⁻¹`) active only when external excitation is zero and particle speed is microscopic.
pub(crate) const FLUID_REST_SETTLE_DAMP_PER_SEC: f32 = 5.2;

/// Vorticity confinement strength keeping interior high-speed eddies crisp without exciting free-surface particles.
pub(crate) const FLUID_VORTICITY_EPSILON: f32 = 0.000_18;

/// Minimum particle speed in `m/s` required before interior vorticity confinement activates.
pub(crate) const FLUID_VORTICITY_MIN_SPEED_MPS: f32 = 0.28;

/// Laplacian free-surface smoothing strength minimizing surface spikes into smooth capillary-gravity waves.
pub(crate) const FLUID_SURFACE_LAPLACIAN_GAIN: f32 = 0.022;

/// Hydrophilic glass wall capillary adhesion strength near the left/right tank walls.
pub(crate) const FLUID_WALL_MENISCUS_STRENGTH: f32 = 0.000_065;

/// Stationary hardware linear acceleration noise deadzone in `m/s²`.
pub(crate) const FLUID_SENSOR_LIN_DEADZONE_MPS2: f32 = 0.30;

/// Stationary hardware gyroscope angular velocity deadzone in `rad/s`.
pub(crate) const FLUID_SENSOR_GYRO_DEADZONE_RAD_S: f32 = 0.045;

/// Stationary hardware gravity vector micro-tremor deadzone in `m/s²` preventing idle IMU noise from shaking the camera horizon.
pub(crate) const FLUID_SENSOR_GRAVITY_DEADZONE_MPS2: f32 = 0.05;

/// Small-angle dt-invariant gravity low-pass damping rate in Hertz for smooth handheld IMU tracking.
pub(crate) const FLUID_SENSOR_GRAVITY_DAMP_HZ: f32 = 8.5;

/// Maximum clamped particle speed in `m/s` preventing tunneling on extreme impulses.
pub(crate) const FLUID_MAX_PARTICLE_SPEED_MPS: f32 = 2.85;

/// Maximum clamped linear shake acceleration in `m/s²`.
pub(crate) const FLUID_MAX_LINEAR_ACCEL_MPS2: f32 = 65.0;

/// Maximum clamped angular velocity in `rad/s`.
pub(crate) const FLUID_MAX_OMEGA_RAD_S: f32 = 24.0;

/// Maximum clamped angular acceleration in `rad/s²`.
pub(crate) const FLUID_MAX_ALPHA_RAD_S2: f32 = 140.0;

/// Wall boundary restitution coefficient for high-speed liquid splash impacts.
pub(crate) const FLUID_WALL_RESTITUTION: f32 = 0.06;

/// Wall boundary tangential slip retention factor (smooth borosilicate glass interior).
pub(crate) const FLUID_WALL_TANGENTIAL_KEEP: f32 = 0.982;

/// Glass tank inner corner bevel radius expressed as a fraction of the smaller vessel axis.
pub(crate) const FLUID_CORNER_RADIUS_RATIO: f32 = 0.055;

/// Virtual shake decay rate per second (`exp(-decay * dt)`).
pub(crate) const FLUID_SHAKE_DECAY_PER_SEC: f32 = 8.5;

/// Buoyant micro-bubble terminal rise velocity in `m/s`.
pub(crate) const FLUID_BUBBLE_RISE_SPEED_MPS: f32 = 0.16;

/// Speed threshold in `m/s` above which energetic surface particles entrain foam and micro-bubbles.
pub(crate) const FLUID_FOAM_SPEED_THRESHOLD_MPS: f32 = 0.32;

/// Pointer stir radius expressed as a fraction of vessel width.
pub(crate) const FLUID_STIR_RADIUS_RATIO: f32 = 0.16;

/// Maximum spatial hash grid cell capacity (`64 * 64 = 4096` cells, zero reallocation).
pub(crate) const FLUID_MAX_GRID_CELLS: usize = 4096;

/// Maximum clamped fixed-update delta time in seconds for unconditional stability.
pub(crate) const FLUID_MAX_STEP_DT: f32 = 1.0 / 30.0;

/// Deterministic PRNG initial seed for bubble jitter and splash micro-variation.
pub(crate) const FLUID_RNG_SEED: u64 = 0x517C_C1B7_2722_0A95;