//! # Entropyk Core
//!
//! Core types and primitives for the Entropyk thermodynamic simulation library.
//!
//! This crate provides the foundation types used throughout the Entropyk ecosystem,
//! including type-safe physical quantities via the NewType pattern.
//!
//! ## Physical Types
//!
//! All physical quantities use the NewType pattern to provide compile-time unit safety:
//!
//! - [`Pressure`] - Pressure in Pascals (Pa)
//! - [`Temperature`] - Temperature in Kelvin (K)
//! - [`Enthalpy`] - Specific enthalpy in Joules per kilogram (J/kg)
//! - [`MassFlow`] - Mass flow rate in kilograms per second (kg/s)
//! - [`Power`] - Power in Watts (W)
//! - [`Concentration`] - Glycol/brine mixture fraction [0.0, 1.0]
//! - [`VolumeFlow`] - Volumetric flow rate in cubic meters per second (m³/s)
//! - [`RelativeHumidity`] - Air moisture level [0.0, 1.0]
//! - [`VaporQuality`] - Refrigerant two-phase state [0.0, 1.0]
//! - [`Entropy`] - Entropy in Joules per kilogram per Kelvin (J/(kg·K))
//! - [`ThermalConductance`] - Thermal conductance in Watts per Kelvin (W/K)
//!
//! ## Example
//!
//! ```rust
//! use entropyk_core::{Pressure, Temperature, Enthalpy, MassFlow, Concentration, VolumeFlow};
//!
//! // Create values using constructors
//! let pressure = Pressure::from_bar(1.0);
//! let temperature = Temperature::from_celsius(25.0);
//! let concentration = Concentration::from_percent(30.0);
//! let flow = VolumeFlow::from_l_per_s(5.0);
//!
//! // Convert to base units
//! assert_eq!(pressure.to_pascals(), 100_000.0);
//! assert_eq!(temperature.to_kelvin(), 298.15);
//! assert_eq!(concentration.to_fraction(), 0.3);
//! assert_eq!(flow.to_m3_per_s(), 0.005);
//!
//! // Arithmetic operations
//! let p1 = Pressure::from_pascals(100_000.0);
//! let p2 = Pressure::from_pascals(50_000.0);
//! let p3 = p1 + p2;
//! assert_eq!(p3.to_pascals(), 150_000.0);
//!
//! // Bounded types clamp to valid range
//! let c = Concentration::from_percent(150.0); // Clamped to 100%
//! assert_eq!(c.to_fraction(), 1.0);
//! ```

#![deny(warnings)]
#![warn(missing_docs)]

pub mod calib;
pub mod smoothing;
pub mod state;
pub mod types;

// Re-export all physical types for convenience
pub use types::{
    CircuitId, Concentration, Enthalpy, Entropy, MassFlow, Power, Pressure, RelativeHumidity,
    Temperature, ThermalConductance, VaporQuality, VolumeFlow, MIN_MASS_FLOW_REGULARIZATION_KG_S,
};

// Re-export calibration types
pub use calib::{
    id_ends_with_calib_suffix, normalize_factor_name, Calib, CalibIndices, CalibValidationError, F_W,
    Z_DP, Z_ETAV, Z_FLOW, Z_FLOW_ECO, Z_POWER, Z_UA,
};

// Re-export system state
pub use state::{InvalidStateLengthError, SystemState};
