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