1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//! # OxiRS Physics - Physics-Informed Digital Twin Bridge
//!
//! [](https://github.com/cool-japan/oxirs/releases)
//!
//! **Status**: Production Release (v0.2.4)
//!
//! Connects RDF knowledge graphs with SciRS2 physics simulations.
//!
//! # Features
//!
//! - **Parameter Extraction**: Extract simulation parameters from RDF graphs and SAMM Aspect Models
//! - **Result Injection**: Write simulation results back to RDF with provenance
//! - **Physics Constraints**: Validate results against conservation laws
//! - **Digital Twin Sync**: Synchronize physical asset state with digital representation
//! - **SPARQL Integration**: Build and execute SPARQL queries for entity properties
//! - **RDF Literal Parsing**: Parse typed literals with full SI unit conversion
//! - **SAMM Bridge**: Parse SAMM Aspect Model TTL and bridge to simulation types
//!
//! # Architecture
//!
//! ```text
//! [RDF Graph] ──extract──> [Simulation Params]
//! │
//! ▼
//! [SciRS2 Simulation]
//! │
//! ▼
//! [Simulation Results]
//! │
//! ┌────────────────────┴────────────────┐
//! ▼ ▼
//! [Physics Validation] [Provenance Tracking]
//! │ │
//! ▼ ▼
//! [Result Injection] ─────────────> [RDF Graph Updated]
//! ```
//!
//! # Examples
//!
//! ```rust,no_run
//! use oxirs_physics::simulation::SimulationOrchestrator;
//! use oxirs_physics::digital_twin::DigitalTwin;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Create orchestrator
//! let orchestrator = SimulationOrchestrator::new();
//!
//! // Extract parameters from RDF
//! let params = orchestrator.extract_parameters(
//! "urn:example:battery:001",
//! "thermal_simulation"
//! ).await?;
//!
//! // Run simulation
//! let result = orchestrator.run("thermal_simulation", params).await?;
//!
//! // Inject results back to RDF
//! orchestrator.inject_results(&result).await?;
//! # Ok(())
//! # }
//! ```
//!
//! # SPARQL / RDF Integration
//!
//! ```rust
//! use oxirs_physics::rdf::sparql_builder::{PhysicsPropertyQuery, PhysicsProperty};
//! use oxirs_physics::rdf::literal_parser::{parse_rdf_literal, PhysicalUnit, convert_unit};
//!
//! // Build a SPARQL SELECT query
//! let query = PhysicsPropertyQuery::new("urn:example:motor:42")
//! .with_property(PhysicsProperty::Mass)
//! .with_property(PhysicsProperty::Temperature)
//! .build_select_query();
//!
//! assert!(query.contains("SELECT"));
//!
//! // Parse a typed RDF literal
//! let value = parse_rdf_literal("9.80665 m/s^2", None).expect("parse failed");
//! assert_eq!(value.unit, PhysicalUnit::MetersPerSecondSquared);
//!
//! // Convert units
//! let in_g = convert_unit(&value, &PhysicalUnit::StandardGravity).expect("convert failed");
//! assert!((in_g.value - 1.0).abs() < 1e-5);
//! ```
// v1.1.0 Material property database
// v1.1.0: Thermal finite-element analysis (CST elements, Dirichlet/Neumann/Robin BCs)
// v1.1.0 round 5: Adaptive mesh refinement for FEM
// v1.1.0 round 6: Heat transfer simulation (Fourier / Newton / Stefan-Boltzmann)
// v1.1.0 round 7: Basic computational fluid dynamics (pipe flow, Bernoulli, drag)
// v1.1.0 round 11: Structural vibration and modal analysis (mass-spring-damper systems)
// v1.1.0 round 12: Lumped-capacity thermal analysis (Fourier / Newton / Stefan-Boltzmann)
// v1.1.0 round 13: 1D/2D wave propagation simulation (FDTD, standing/traveling/attenuated waves)
// v1.1.0 round 11: Basic quantum mechanics (particle-in-box, QHO, tunneling, spin, density matrices)
// v1.1.0 round 12: Optical physics (Snell, Fresnel, thin lens, diffraction, prism)
// v1.1.0 round 13: Statistical mechanics (Maxwell-Boltzmann, partition function, Fermi-Dirac, Bose-Einstein, mean free path)
// v1.1.0 round 14: Orbital mechanics and N-body simulation (Newtonian gravity, Kepler, vis-viva)
// v1.1.0 round 15: PID and cascade control system simulation
// v1.1.0 round 16: Kinematic equations for linear and rotational motion
pub use ;
/// Physics simulation bridge version
pub const VERSION: &str = env!;