euv-core 0.48.2

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 50% vessel fill ratio.
pub(crate) const FLUID_BASE_PARTICLES_HALF_FILL: usize = 520;

/// Default fixed physics substeps per frame tick.
pub(crate) const FLUID_DEFAULT_SUBSTEPS: u32 = 2;

/// Default PBF Jacobi density constraint iterations per substep.
pub(crate) const FLUID_DEFAULT_SOLVER_ITERS: u32 = 3;

/// 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.09;

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

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

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

/// Vorticity confinement strength keeping wave curls and eddies crisp.
pub(crate) const FLUID_VORTICITY_EPSILON: f32 = 0.000_28;

/// Cohesive surface tension correction strength in PBF position space.
pub(crate) const FLUID_COHESION_STRENGTH: f32 = 0.000_045;

/// Hydrophilic glass wall capillary adhesion strength near the free surface.
pub(crate) const FLUID_WALL_MENISCUS_STRENGTH: f32 = 0.000_14;

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

/// 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.12;

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

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

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

/// 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 surface particles entrain foam and micro-bubbles.
pub(crate) const FLUID_FOAM_SPEED_THRESHOLD_MPS: f32 = 0.26;

/// 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;