oxirs_physics/lib.rs
1//! # OxiRS Physics - Physics-Informed Digital Twin Bridge
2//!
3//! [](https://github.com/cool-japan/oxirs/releases)
4//!
5//! **Status**: Production Release (v0.1.0)
6//!
7//! Connects RDF knowledge graphs with SciRS2 physics simulations.
8//!
9//! # Features
10//!
11//! - **Parameter Extraction**: Extract simulation parameters from RDF graphs and SAMM Aspect Models
12//! - **Result Injection**: Write simulation results back to RDF with provenance
13//! - **Physics Constraints**: Validate results against conservation laws
14//! - **Digital Twin Sync**: Synchronize physical asset state with digital representation
15//!
16//! # Architecture
17//!
18//! ```text
19//! [RDF Graph] ──extract──> [Simulation Params]
20//! │
21//! ▼
22//! [SciRS2 Simulation]
23//! │
24//! ▼
25//! [Simulation Results]
26//! │
27//! ┌────────────────────┴────────────────┐
28//! ▼ ▼
29//! [Physics Validation] [Provenance Tracking]
30//! │ │
31//! ▼ ▼
32//! [Result Injection] ─────────────> [RDF Graph Updated]
33//! ```
34//!
35//! # Examples
36//!
37//! ```rust,no_run
38//! use oxirs_physics::simulation::SimulationOrchestrator;
39//! use oxirs_physics::digital_twin::DigitalTwin;
40//!
41//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
42//! // Create orchestrator
43//! let orchestrator = SimulationOrchestrator::new();
44//!
45//! // Extract parameters from RDF
46//! let params = orchestrator.extract_parameters(
47//! "urn:example:battery:001",
48//! "thermal_simulation"
49//! ).await?;
50//!
51//! // Run simulation
52//! let result = orchestrator.run("thermal_simulation", params).await?;
53//!
54//! // Inject results back to RDF
55//! orchestrator.inject_results(&result).await?;
56//! # Ok(())
57//! # }
58//! ```
59
60pub mod constraints;
61pub mod digital_twin;
62pub mod error;
63pub mod simulation;
64
65pub use error::{PhysicsError, PhysicsResult};
66
67/// Physics simulation bridge version
68pub const VERSION: &str = env!("CARGO_PKG_VERSION");