From 4516f317e2d6f37fdda8aed0938be3c6fa73cd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=82=E4=B9=8B=E9=92=B3?= Date: Sun, 9 Aug 2026 23:14:21 +0800 Subject: [PATCH] =?UTF-8?q?triage:=20close=20VDE-1142~1150=20=E2=80=94=20d?= =?UTF-8?q?omain=20equipment=20Out=20of=20Scope=20(cron=202026-08-09)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pharmaceutical, MedicalDevice, AutoAssembly, Aerospace, Railway, Shipbuilding, Defense/Weapons, SpaceLaunch, NuclearFacility equipment engine requirements — all application-layer domain features, not VDE geometry kernel concerns. 9 files: Closed — Out of Scope. Triaged 2026-08-09 cron. --- docs/feedback/VDE-1142.md | 2137 +++++++++++++++++++++++ docs/feedback/VDE-1143.md | 2059 ++++++++++++++++++++++ docs/feedback/VDE-1144.md | 3063 +++++++++++++++++++++++++++++++++ docs/feedback/VDE-1145.md | 2575 ++++++++++++++++++++++++++++ docs/feedback/VDE-1146.md | 2995 ++++++++++++++++++++++++++++++++ docs/feedback/VDE-1147.md | 3418 +++++++++++++++++++++++++++++++++++++ docs/feedback/VDE-1148.md | 2463 ++++++++++++++++++++++++++ docs/feedback/VDE-1149.md | 2273 ++++++++++++++++++++++++ docs/feedback/VDE-1150.md | 531 ++++++ 9 files changed, 21514 insertions(+) create mode 100644 docs/feedback/VDE-1142.md create mode 100644 docs/feedback/VDE-1143.md create mode 100644 docs/feedback/VDE-1144.md create mode 100644 docs/feedback/VDE-1145.md create mode 100644 docs/feedback/VDE-1146.md create mode 100644 docs/feedback/VDE-1147.md create mode 100644 docs/feedback/VDE-1148.md create mode 100644 docs/feedback/VDE-1149.md create mode 100644 docs/feedback/VDE-1150.md diff --git a/docs/feedback/VDE-1142.md b/docs/feedback/VDE-1142.md new file mode 100644 index 000000000..ba599d60b --- /dev/null +++ b/docs/feedback/VDE-1142.md @@ -0,0 +1,2137 @@ +# VDE-1142: Pharmaceutical Equipment Engine Requirements (制药设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign PharmaEngine — solid dosage manufacturing, powder processing & blending, sterile injection (SVP/LVP/PFS), isolator & RABS containment, biopharma upstream & downstream processing, single-use systems, pharmaceutical packaging & serialization +**Module**: `vde/pharma_equipment/solid_dosage.h`, `vde/pharma_equipment/sterile_injection.h`, `vde/pharma_equipment/biopharma_packaging.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Pharma / Solid Dosage / Sterile Injection / Biopharma / Packaging + +--- + +## Background + +Pharmaceutical manufacturing represents one of the most highly regulated and technically demanding industrial sectors, governed by current Good Manufacturing Practice (cGMP) requirements from the US FDA (21 CFR Parts 210/211), EU GMP Annex 1 (sterile manufacturing), Annex 11 (computerized systems), ICH Q7 (active pharmaceutical ingredients), ICH Q8-Q10 (quality by design / risk management / quality systems), and pharmacopoeia standards (USP, Ph.Eur., JP). The industry spans oral solid dosage (OSD) manufacturing of tablets and capsules (representing ~60% of all drug products by volume), sterile injectable manufacturing (SVP small volume parenterals, LVP large volume parenterals, PFS pre-filled syringes), and biopharmaceutical manufacturing via cell culture and fermentation followed by complex downstream purification trains. + +Solid dosage manufacturing encompasses multiple unit operations linked in a continuous or batch train: wet granulation (high-shear mixer → fluid bed drying → milling), dry granulation (roller compaction → milling), blending (V-blender / bin blender / tumble), tablet compression (rotary press), tablet coating (perforated drum coater), and capsule filling (dosator / tamping pin technology). Each unit operation has distinct critical process parameters (CPPs) that affect critical quality attributes (CQAs) such as tablet hardness, disintegration time, dissolution profile, content uniformity, and weight variation per USP <905>. Process analytical technology (PAT) for real-time monitoring of moisture (near-infrared NIR), particle size (laser diffraction / focused beam reflectance measurement FBRM), blend homogeneity (Raman spectroscopy), and tablet weight/hardness/thickness enables real-time release testing (RTRT). + +Sterile injectable manufacturing requires aseptic processing in ISO 14644 classified cleanrooms (Grade A/B/C/D) with unidirectional airflow (UDAF), HEPA filtration, and rigorous environmental monitoring. Key unit operations include: component preparation (vial/ampoule washing in WFI water-for-injection, depyrogenation via dry heat tunnel at 300-350°C achieving ≥3-log endotoxin reduction with FH ≥1365 at 250°C), aseptic filling (peristaltic pump / rotary piston pump / time-pressure filling with ±1% fill volume accuracy), stoppering (partial insertion for lyophilization, full insertion with 100% check), capping (aluminum flip-off seal crimping with defined residual seal force RSF), and terminal sterilization (steam autoclave at 121°C saturated steam, F₀ ≥15 min). Lyophilization (freeze-drying) adds unique requirements: shelf temperature ramping, chamber pressure control <1 mbar, condenser temperature −50 to −85°C, primary drying sublimation followed by secondary drying desorption, product temperature monitoring below collapse temperature, and end-point detection via Pirani/capacitance manometer comparative pressure measurement. + +Containment technologies—isolators and Restricted Access Barrier Systems (RABS)—provide the physical separation between operator and aseptic process, enabling reduced environmental monitoring requirements and enhanced sterility assurance. Isolators use vaporized hydrogen peroxide (VHP) bio-decontamination with ≥6-log reduction of Geobacillus stearothermophilus spores, positive or negative pressure cascades, glove ports and half-suits for manipulation, and integrated viable + non-viable particle monitoring. + +Biopharmaceutical upstream processing centers on bioreactors (single-use SUB with multilayer film or CIP/SIP stainless steel) with precise control loops (PID) for pH, dissolved oxygen (DO), temperature, and agitation. Perfusion culture with alternating tangential flow (ATF) cell retention enables high cell density. Downstream processing follows a complex purification train: depth filtration + centrifugation harvest → Protein A affinity chromatography capture → low pH virus inactivation (pH 3.5-4.0 hold) → ion exchange chromatography (IEX) polishing → nanofiltration (20 nm parvovirus retention) → ultrafiltration/diafiltration (UF/DF) tangential flow filtration (TFF) for concentration and buffer exchange → final formulation filtration (0.45+0.22μm sterilizing grade with integrity testing). + +Pharmaceutical packaging and serialization completes the drug product lifecycle: blister packaging (thermoforming or cold form foil), bottle lines (unscrambler → electronic counter → cotton inserter → induction sealing → capping → labeling), cartoning (horizontal cartoner with leaflet insertion), and serialization for track-and-trace compliance with global regulations (EU FMD/EMVS, US DSCSA, Russia Chestny ZNAK, China traceability). + +VDE currently lacks: +- Solid dosage unit operation models (wet/dry granulation, tablet compression force-displacement, coating spray dynamics, capsule filling weight control, softgel rotary die encapsulation) +- Powder processing and blending design (milling particle size D50/D90, sieving mesh/micron, blending homogeneity RSD, vacuum conveying ATEX) +- Sterile injection equipment design (vial washing WFI stages, depyrogenation tunnel FH calculation, aseptic filling accuracy, lyophilizer shelf/chamber/condenser thermodynamics, PFS nest+tub handling, autoclave F₀ value) +- Isolator and RABS containment design (VHP cycle development, UDAF velocity 0.45±0.1m/s, cleanroom particle/microbial limits per ISO 14644, HVAC pressurization cascade) +- Biopharma upstream/downstream design (bioreactor PID control loops, chromatography breakthrough curve DBC, UF/DF flux and TMP, virus clearance LRV) +- Single-use system design (bag film barrier properties, gamma irradiation sterility, aseptic connector, single-use sensor integration) +- Packaging and serialization design (blister thermoform sealing, counter accuracy, induction seal integrity, Data Matrix GS1 verification, parent-child aggregation) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native pharmaceutical equipment engine. + +--- + +## Detailed Requirements + +### 1. Solid Dosage Manufacturing — Tablet & Capsule + +**Priority**: P1 + +#### 1.1 Wet Granulation, Dry Granulation, Tablet Compression, Coating, and Capsule Filling + +``` +Solid dosage manufacturing train overview: + API (Active Pharmaceutical Ingredient) + excipients (diluent, binder, + disintegrant, lubricant, glidant) are processed through wet or dry + granulation to improve powder flowability and compressibility before + tablet compression or capsule filling. + +Wet Granulation — High Shear Mixer: + Equipment: top-driven impeller (main blade) + side-mounted chopper + + High shear mixer bowl geometry: + Impeller blade at bowl bottom, rotating at low (100–300 rpm) + or high (300–800 rpm) speed + Chopper at side wall, high speed (1,500–3,000 rpm) → breaks + large wet agglomerates + + Wet massing process: + Stage 1 — Dry mixing: + API + excipients mixed for 2–5 min (impeller only) + Achieves blend uniformity before liquid addition + Stage 2 — Liquid binder addition: + Granulating fluid (water, ethanol, or PVP/HPC binder solution) + pumped in via peristaltic pump at controlled rate + Spray nozzle above powder bed for even distribution + Impeller continues mixing, chopper engaged + Stage 3 — Wet massing: + Mixing continues 2–10 min after binder addition complete + Target end-point: consistent granule size (1–3 mm), + no dry powder, no overwet paste + + End-point determination: + Impeller power/torque monitoring: + P_imp = 2π × τ × N / 60 [W] + Where: τ = torque [Nm], N = impeller speed [rpm] + Power consumption curve reflects granule formation: + Phase I: dry mixing → low, stable power + Phase II: liquid addition → power increases as granules form + Phase III: over-wetting → power spikes, paste formation + End-point: plateau region before over-wetting power spike + + Alternative: NIR moisture sensor, acoustic emission + + Scale-up from lab to production: + Tip speed (peripheral velocity) maintained constant: + v_tip = π × D_imp × N / 60 [m/s] + D_imp_lab / D_imp_prod = N_prod / N_lab + Froude number scaling: + Fr = (N² × D) / g + Fr_lab = Fr_prod → N_prod = N_lab × √(D_lab/D_prod) + + Wet Granulation — Fluid Bed Dryer: + Top spray configuration (most common for granulation drying) + + Fluidization: + Inlet air heated to 40–80°C, passes through product bowl + Product fluidized as air velocity > minimum fluidization velocity: + u_mf = (μ / (ρ_g × d_p)) × [√(33.7² + 0.0408 × Ar) − 33.7] + Ar = (ρ_g × (ρ_p − ρ_g) × g × d_p³) / μ² (Archimedes number) + + Drying phases: + Phase 1 — Preheating: bed temperature rises + Phase 2 — Constant rate: surface moisture evaporates, + bed temperature ≈ wet bulb temperature + Phase 3 — Falling rate: internal moisture diffusion limited, + bed temperature rises toward inlet temperature + + LOD (Loss on Drying) moisture end-point: + Target LOD: 1–3% w/w (for tablet compression) + Measured by: in-line NIR probe or at-line moisture balance + End-point: outlet air temperature rise or RH drop below threshold + + Drying time estimate: + t_dry = (m_water_to_remove × ΔH_vap) / (Q_heater − Q_loss) + Q_heater = ṁ_air × c_p_air × (T_inlet − T_ambient) + + Dry Granulation — Roller Compaction: + Gerteis / Alexanderwerk / Fitzpatrick roller compactors + + Process: + Powder fed between two counter-rotating rolls via screw feeder + Powder compressed into ribbon (compact) + Ribbon milled to desired granule size + + Key parameters: + Roll pressure: P_roll [kN/cm roll width], typically 2–20 kN/cm + Roll speed: 2–15 rpm + Gap between rolls: 1–5 mm (adjustable, hydraulic) + Ribbon density ρ_ribbon [g/cm³]: + ρ_ribbon = ρ_bulk / (1 − ε_ribbon) + ε_ribbon = f(P_roll, powder properties) + Typical ribbon solid fraction: 0.6–0.8 + + Johanson model for roller compaction: + Pressure distribution in nip region: + P(θ) = P_max × [(1 + sin δ − cos θ) / (1 + sin δ)]^K + Where: + δ = effective angle of internal friction + θ = angular position in nip region + K = compressibility factor (from powder compressibility test) + + Mass throughput: + ṁ = ρ_bulk × π × D_roll × N × W_roll × h_gap × f_grip + + Milling after compaction: + FitzMill / Comil conical screen mill + Screen size: 0.5–2.0 mm (fine to coarse granules) + Rotor speed: 500–5,000 rpm + Granule size distribution (GSD): + D10/D50/D90 by sieve analysis or laser diffraction + +Tablet Press — Rotary Tablet Press: + Fette / Korsch / Bosch / IMA rotary tablet press + + Compression cycle (per turret rotation): + Station 1 — Die filling: + Feed frame fills die cavity with granules + Fill depth adjusted by dosing cam (lower punch position) + Fill weight control: force feedback from pre-compression station + adjusts fill depth automatically (weight control loop) + Station 2 — Pre-compression: + Upper punch descends, pre-compression roller applies force + Pre-compression: removes entrapped air, initial bonding + Pre-compression force: 2–10 kN (depending on tablet size) + Station 3 — Main compression: + Main compression rollers apply final compression force + Main compression force: 5–100 kN + Dwell time under maximum force: + t_dwell = L_flat_head / (π × D_pitch × N / 60) + Where L_flat_head = flat portion of punch head [mm] + Station 4 — Ejection: + Lower punch rises, ejects tablet above die table + Ejection force: 50–500 N (indication of die wall friction) + + Heckel equation (compressibility): + ln(1/(1 − D)) = K × P + A + Where: + D = relative density (tablet density / true density) + P = compression pressure [MPa] + K = Heckel slope (related to yield pressure P_y = 1/K) + A = intercept + + Mean yield pressure P_y: indicates material plasticity + P_y < 80 MPa: plastic (good compressibility, e.g., MCC) + P_y > 150 MPa: brittle/fragmenting (e.g., lactose, DCP) + + Weight control feedback: + W_target = W_setpoint + W_measured (from pre-compression force correlation) + ΔW = W_measured − W_target + Fill depth adjustment: + Δh_fill = −K_gain × ΔW / (ρ_bulk × A_die) + Control cycle: every rotation, PID algorithm + + Ejection force monitoring: + F_ej = μ_wall × (σ_r_residual × π × D_die × h_tablet) + Where: + μ_wall = die wall friction coefficient + σ_r_residual = residual radial stress after decompression + High ejection force → lubrication issue, sticking risk + Ejection force trend: early warning of tooling wear + +Tablet Coating — Perforated Drum Coater: + O'Hara / Glatt / Thomas / IMA coating pan + + Coating pan configuration: + Perforated cylindrical drum, rotating about horizontal axis + Inlet air: heated filtered air enters through plenum + Exhaust air: exits through perforations or rear plenum + Spray guns: mounted on manifold inside drum, atomize coating solution + + Spray system: + Nozzle type: two-fluid (air-atomizing) or hydraulic + Spray rate: 10–50 g/min/nozzle (lab), 200–1,000 g/min/nozzle (production) + Atomizing air pressure: 1–3 bar + Pattern air: shapes spray cone for uniform coverage + + Peristaltic pump delivers coating solution at controlled rate: + Q_coat = f(rpm_pump, tubing_ID) + + Process parameters: + Inlet air temperature: 50–80°C (aqueous coating), 30–50°C (organic) + Exhaust air temperature: 35–55°C + Pan speed: 2–15 rpm (optimal: tablets cascade, not slide) + Spray rate: balanced with drying capacity + Drying capacity = ṁ_air × c_p × (T_in − T_out)_effective + + Tablet bed temperature: + T_bed ≈ T_exhaust − 2 to 5°C (for aqueous coating) + T_bed = critical for film formation quality + + Weight gain %: + Coating weight gain (%) = + (W_coated_tablet − W_core_tablet) / W_core_tablet × 100 + Typical: 2–4% w/w for film coating (aesthetic, protection) + Functional coating (enteric, sustained release): 5–15% w/w + + Coating uniformity: + CV_coat = stdev(coating_weight) / mean(coating_weight) × 100 + Target CV < 5% across tablets + Influenced by: pan speed, spray pattern, mixing baffles + +Capsule Filling — Dosator / Tamping Pin: + Bosch / MG2 / IMA / Zanasi capsule filler + + Capsule types: + Hard gelatin capsule (sizes 000 to 5, volume 0.13–1.37 mL) + HPMC (hydroxypropyl methylcellulose) vegetarian capsule + + Dosator disc principle: + Step 1 — Separation: empty capsules separated into body + cap + Step 2 — Dosing: dosator tube plunges into powder bed + Powder compressed inside tube to form plug (slug) + Plug weight ∝ dosator immersion depth × powder bed density + Weight adjustment: change immersion depth or compression + Step 3 — Transfer: dosator tube moves over capsule body + Step 4 — Ejection: piston ejects powder plug into capsule body + Step 5 — Closing: capsule cap rejoined with body + Step 6 — Ejection: filled capsule ejected, empty capsule rejected + + Tamping pin principle: + Multiple tamping pins (3–5 stations) compress powder + incrementally into dosing disc bore (incremental filling) + Better for low-density / poorly flowing powders + + Weight variation: + Individual capsule weight measured in-line (every capsule + or statistical sampling) via load cell + Acceptance: per USP <905>, weight variation <2.5% RSD + Rejection: out-of-spec capsules blown off with compressed air + + Empty capsule rejection: + Optical / capacitive sensor detects missing or improperly + separated capsules + Rejected before filling station + +Empty Hard Capsule Manufacturing: + Gelatin / HPMC solution → dipping pins → drying → stripping + → cutting to length → joining → printing → packaging + Key parameters: gelatin viscosity (Bloom strength), pin + temperature, drying air conditions (T, RH, velocity), dip depth + +Softgel Encapsulation — Rotary Die: + Rotary die process: + 1. Gelatin + plasticizer (glycerin/sorbitol) melted and cast + into two ribbons via spreader box onto cooling drums + 2. Ribbons (0.5–1.2 mm thickness) feed between two rotary dies + 3. Fill medicine (oil/suspension) injected between ribbons + via heated wedge (segment) + 4. Rotary dies with matching cavities cut + seal gel ribbons + 5. Softgel capsules drop onto conveyor + + Die roll synchronization: + Both die rolls synchronized for cavity alignment + Seam (web) thickness: 0.3–0.7 mm + Die roll pressure: hydraulic or pneumatic + + Drying: + Initial tumble drying: rotary tumbler, 30–60 min, warm air + Tray drying: stacked trays in drying tunnel/room, + 24–72 hours, controlled T (20–25°C) and RH (20–30%) + Final moisture: 6–10% w/w (gelatin shell) + + Quality: + Seam thickness control (leak test, 100% visual or camera) + Fill weight accuracy ±5% + Shell integrity (burst test, disintegration time per USP) + +Pellet Manufacturing — Extrusion-Spheronization: + Process: + 1. Wet massing: API + MCC microcrystalline cellulose + (core material for spheronization) + water → wet mass + 2. Extrusion: screw extruder (axial/radial screen) + → cylindrical extrudate, Ø 0.5–2.0 mm + 3. Spheronization: rotating friction plate (cross-hatch pattern) + at 400–1,500 rpm → breaks extrudate, rounds into spheres + 4. Drying: fluid bed dryer to LOD <2% + 5. Coating: Wurster fluid bed (bottom spray) for + functional coating (sustained release, enteric) + + Wurster coating: + Bottom spray nozzle inside cylindrical partition (Wurster tube) + Particles circulate: up through tube (spray zone) → + fall outside tube (drying zone) → repeat + Coating uniformity: CV <10% film thickness + Drug layering: API suspension sprayed onto inert cores + (sugar spheres / MCC spheres) +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +// ============ Enums ============ +enum class GranulationType { Wet_HighShear, Dry_RollerCompaction, FluidBed_Granulation }; +enum class DryerType { FluidBed_TopSpray, FluidBed_Wurster, Tray_Dryer, Microwave_Vacuum }; +enum class MillType { FitzMill_Hammer, Comil_Conical, Oscillating_Granulator }; +enum class TabletPressType { Rotary_SingleSided, Rotary_DoubleSided, Eccentric_SinglePunch }; +enum class CoaterType { PerforatedDrum, SolidPan_Conventional, FluidBed_Wurster }; +enum class CapsuleFillerType { DosatorDisc, TampingPin, Auger_Dosing }; +enum class CapsuleShellMaterial { HardGelatin, HPMC_Vegetarian, Pullulan }; +enum class SoftgelType { RotaryDie, PlateProcess, Accogel }; + +// ============ Granulation Specs ============ +struct HighShearMixerSpec { + double bowl_volume_L; // 10–1200 L + double impeller_diameter_mm; + double impeller_speed_rpm_min; // typically 100–300 + double impeller_speed_rpm_max; // typically 300–800 + double chopper_speed_rpm; // 1500–3000 + double motor_power_kW; + double tip_speed_m_per_s; + double binder_addition_rate_ml_per_min; + double wet_massing_time_min; + bool torque_monitoring_enabled; + bool nir_moisture_sensor; +}; + +struct FluidBedDryerSpec { + double product_bowl_volume_L; + double air_flow_rate_m3_per_h; + double inlet_air_temp_C_min; + double inlet_air_temp_C_max; + double exhaust_air_temp_C; + double filter_bag_area_m2; + double air_distributor_plate_type; // gill plate, perforated + double min_fluidization_velocity_m_per_s; + double heater_power_kW; + double target_lod_pct; // 1–3% + double drying_time_target_min; +}; + +struct RollerCompactorSpec { + double roll_diameter_mm; + double roll_width_mm; + double roll_pressure_max_kN_per_cm; + double roll_speed_rpm; + double roll_gap_mm; + double screw_feeder_speed_rpm; + double ribbon_density_g_per_cm3; + double ribbon_solid_fraction; + MillType integrated_mill_type; + double mill_screen_size_mm; // 0.5–2.0 + double mill_rotor_speed_rpm; + double granule_D50_target_um; +}; + +struct GranulationSpec { + GranulationType type; + HighShearMixerSpec high_shear; + FluidBedDryerSpec fluid_bed; + RollerCompactorSpec roller_compactor; + double binder_solution_pct_wt; + double batch_size_kg; + double api_loading_pct; +}; + +// ============ Tablet Press Spec ============ +struct TabletToolingSpec { + int number_of_stations; // 8–80 + double die_diameter_mm; + double punch_tip_diameter_mm; + std::string punch_shape; // round, oval, capsule, custom + double precompression_flat_head_length_mm; + double maincompression_flat_head_length_mm; + double punch_material; // steel D2, S7, 440C + bool multi_tip_tooling; +}; + +struct TabletSpec { + double tablet_weight_mg_target; + double tablet_weight_mg_min; + double tablet_weight_mg_max; + double tablet_hardness_N_target; // 30–200 N typical + double tablet_hardness_N_min; + double tablet_thickness_mm_target; + double tablet_thickness_mm_tolerance; + double disintegration_time_sec_max; // per USP <701> + double friability_pct_max; // per USP <1216>, <1% + double dissolution_Q_pct_at_time_min; // per USP <711> +}; + +struct TabletPressSpec { + TabletPressType type; + TabletToolingSpec tooling; + double turret_speed_rpm; // 10–100 rpm + double output_tablets_per_hour; + double fill_depth_mm_min; + double fill_depth_mm_max; + double precompression_force_kN; + double main_compression_force_kN; + double main_compression_force_max_kN; + double dwell_time_ms; + double ejection_force_N_max; + double weight_control_Kp; // PID proportional gain + double weight_control_Ki; + double weight_control_Kd; + bool compression_force_monitoring; + bool ejection_force_monitoring; + TabletSpec tablet_spec; +}; + +// ============ Tablet Coater Spec ============ +struct SprayGunSpec { + int number_of_guns; + double nozzle_orifice_mm; + double atomizing_air_pressure_bar; + double pattern_air_pressure_bar; + double spray_rate_per_gun_g_per_min; + double spray_distance_to_bed_mm; + double spray_cone_angle_deg; +}; + +struct TabletCoaterSpec { + CoaterType type; + double pan_diameter_mm; // 12–66 inch production + double pan_speed_rpm; // 2–15 + int number_of_baffles; + SprayGunSpec spray_gun; + double inlet_air_flow_m3_per_h; + double inlet_air_temp_C; + double exhaust_air_temp_C; + double tablet_bed_temp_C_target; // 35–55°C for aqueous + double peristaltic_pump_flow_ml_per_min; + double coating_solution_solids_pct; // 8–20% typically + double target_weight_gain_pct; // 2–4% film coat + double batch_size_kg; + double coating_time_min; +}; + +// ============ Capsule Filler Spec ============ +struct CapsuleFillerSpec { + CapsuleFillerType type; + int capsule_size; // 000 to 5 + CapsuleShellMaterial shell_material; + int number_of_stations; + double output_capsules_per_hour; + double target_fill_weight_mg; + double fill_weight_tolerance_mg; + double fill_weight_rsd_target_pct; // <2.5% per USP <905> + double dosator_tube_diameter_mm; + double powder_bed_height_mm; + double compression_force_N; + bool empty_capsule_rejection; + bool fill_weight_online_check; + int sampling_rate_capsules_per_min; +}; + +// ============ Softgel Spec ============ +struct SoftgelSpec { + SoftgelType type; + double die_roll_diameter_mm; + double die_roll_width_mm; + double die_roll_speed_rpm; + int cavities_per_roll; + double ribbon_thickness_mm; // 0.5–1.2 + double gel_melting_temp_C; // 55–65°C + double spread_box_temp_C; + double cooling_drum_temp_C; // 10–20°C + double segment_temp_C; // wedge/injection temp + double fill_medicine_temp_C; + double fill_weight_mg_target; + double fill_weight_tolerance_pct; + double seam_thickness_mm_target; // 0.3–0.7 + double seam_thickness_tolerance_mm; + double tumble_dry_time_min; + double tray_dry_time_hours; + double drying_air_temp_C; + double drying_air_RH_pct; + double final_shell_moisture_pct_target; // 6–10% +}; + +// ============ Pellet Spec ============ +struct PelletExtruderSpec { + double screw_diameter_mm; + double screw_speed_rpm; + double screen_hole_diameter_mm; // 0.5–2.0 + double screen_thickness_mm; + double extrusion_pressure_bar; + double feed_rate_kg_per_h; +}; + +struct SpheronizerSpec { + double plate_diameter_mm; + double plate_speed_rpm; // 400–1500 + double plate_groove_type; // cross-hatch pitch + double spheronization_time_min; + double pellet_target_size_um; +}; + +struct WursterCoaterSpec { + double wurster_tube_diameter_mm; + double wurster_tube_height_mm; + double partition_gap_mm; // tube-to-plate gap + double spray_nozzle_diameter_mm; + double atomizing_air_pressure_bar; + double spray_rate_g_per_min; + double inlet_air_temp_C; + double product_temp_C_target; + double coating_weight_gain_pct; + int number_of_cycles; // multi-layer coating +}; + +struct PelletSpec { + double core_material; // MCC, sugar sphere + double core_size_um_initial; + double target_pellet_size_um; + PelletExtruderSpec extruder; + SpheronizerSpec spheronizer; + FluidBedDryerSpec dryer; + WursterCoaterSpec wurster_coater; + double drug_load_pct_per_layer; +}; + +// ============ State & Performance Types ============ +struct SolidDosageBatchState { + double batch_id; + GranulationType current_gran_step; + double highshear_impeller_power_kW; + double highshear_endpoint_torque_Nm; + double fluidbed_inlet_temp_C; + double fluidbed_exhaust_temp_C; + double fluidbed_product_moisture_pct; + double rollercomp_ribbon_density_g_per_cm3; + double tabletpress_current_force_kN; + double tabletpress_weight_actual_mg; + double tabletpress_weight_rsd_pct; + double coater_pan_speed_rpm; + double coater_weight_gain_actual_pct; + double capsule_fill_weight_actual_mg; + int capsules_rejected; + double softgel_seam_thickness_mm; +}; + +struct SolidDosagePerformance { + double granule_D10_um, granule_D50_um, granule_D90_um; + double granule_lod_pct; + double tablet_weight_rsd_pct; // target <2.0% + double tablet_hardness_mean_N; + double tablet_friability_pct; // target <1% + double tablet_disintegration_sec; + double dissolution_pct_at_time; // target >Q+5% + double capsule_weight_variation_rsd_pct; + double capsule_yield_pct; // filled/passed + double coater_weight_gain_actual_pct; + double coater_uniformity_cv_pct; + double softgel_fill_accuracy_pct; + double softgel_seam_integrity_pass_rate_pct; + bool meets_USP_905_weight_variation; + bool meets_USP_1216_friability; + bool meets_USP_701_disintegration; + bool meets_USP_711_dissolution; +}; + +SolidDosageBatchState initialize_solid_dosage_batch(double batch_size_kg, GranulationType gran_type); +GranulationSpec design_granulation(GranulationType type, double batch_size_kg, double api_load_pct, bool torque_endpoint = true); +TabletPressSpec design_tablet_press(double target_weight_mg, double target_output_tph); +TabletCoaterSpec design_tablet_coater(double batch_kg, double target_weight_gain_pct, CoaterType type = CoaterType::PerforatedDrum); +CapsuleFillerSpec design_capsule_filler(int capsule_size, double target_fill_mg, CapsuleFillerType type = CapsuleFillerType::DosatorDisc); +SoftgelSpec design_softgel(double fill_weight_mg, SoftgelType type = SoftgelType::RotaryDie); +SolidDosagePerformance simulate_solid_dosage_batch(const GranulationSpec& gran, const TabletPressSpec& press, + const TabletCoaterSpec& coater, SolidDosageBatchState& state); + +double calculate_heckel_yield_pressure(const std::vector& P_kN, const std::vector& density_g_cm3); +double calculate_fluidization_velocity_min(double d_p_um, double rho_p, double rho_g, double mu_g); +double calculate_tablet_dwell_time(double flat_head_mm, double pitch_circle_mm, double rpm); +double calculate_softgel_seam_thickness(double die_roll_pressure, double ribbon_thickness); + +} // namespace vde::pharma_equipment +``` + +--- + +### 2. Powder Processing & Blending + +**Priority**: P1 + +#### 2.1 Milling, Sieving, Blending, and Vacuum Conveying + +``` +Powder processing overview: + Pharmaceutical powders must be reduced to specific particle sizes, + classified by sieving, and uniformly blended to ensure content + uniformity (CU) of low-dose APIs in the final dosage form. + +Milling — Size Reduction: + Hammer mill (FitzMill): + Rotating hammers impact particles against screen + Screen size determines product particle size + Tip speed: 20–70 m/s + Product D50 ∝ 1 / tip_speed (approximately) + + Conical mill (Comil / Quadro): + Rotating impeller forces particles through conical screen + Lower shear, gentler than hammer mill + Screen: round/perforated or grater + Impeller speed: 500–5,000 rpm + Suitable for wet and dry granulation milling + + Pin mill: + Two counter-rotating discs with pins + Impact + attrition comminution + Very fine particles achievable (<10 μm) + High speed: 5,000–20,000 rpm + Product cooling may be required (heat generation) + + Jet mill (micronization): + Compressed gas (N₂ or air) expands through nozzles + Particles accelerated to sonic velocity → collide + No moving parts → low contamination risk + Product: D50 1–10 μm (micronized) + Classifier wheel: rejects oversize → only fine particles exit + Parameters: + Grinding pressure: 4–8 bar + Classifier speed: 2,000–10,000 rpm + Feed rate: 0.5–50 kg/h (lab to production) + + Particle size distribution: + D10: 10% of particles below this size + D50: median particle size [μm] + D90: 90% of particles below this size + Span = (D90 − D10) / D50 (width of distribution) + Typical Span: 1.0–3.0 for milled powders + +Sieving — Particle Classification: + Vibratory sieve (Russell Finex / Sweco): + Mesh sizes: 20–635 mesh (841–20 μm) + Mesh opening [μm]: + Aperture = 25,400 / mesh_number (approximate) + Example: 100 mesh ≈ 150 μm, 325 mesh ≈ 44 μm + + Amplitude: 0.5–4 mm + Frequency: 25–50 Hz + Deck angle: 0–30° (adjustable) + + Sieving efficiency: + Eff = (mass of undersize passing through) / + (total mass of undersize in feed) × 100 + Target: >90% for single deck + + Multiple deck configuration: + Deck 1 (top): coarsest mesh → oversize (recycle/mill) + Deck 2 (middle): intermediate → product + Deck 3 (bottom): finest → fines (recycle) + +Blending — Homogeneity: + V-blender / Bin blender / Tumble blender: + Diffusion mixing mechanism + Rotation: 5–25 rpm + Fill volume: 40–60% of total volume (optimal) + Blend time: 10–30 minutes + + Blend uniformity assessment (stratified sampling): + Sample thief: takes samples from multiple locations + (top, middle, bottom, left, right, front, back) + Locations: typically 10–20 sampling points + API content assay: HPLC / UV / NIR + + Homogeneity metric: + RSD (Relative Standard Deviation) [%]: + RSD = (s / x̄) × 100 + Where: s = sample standard deviation + x̄ = sample mean + + Acceptance: RSD ≤ 5.0% (per FDA Guidance for Industry) + Excellent: RSD ≤ 2.0% + Borderline: 5.0% < RSD ≤ 6.0% (stratified sampling investigation) + + Mixing index (Lacey index): + M = (s₀² − s²) / (s₀² − s_R²) + Where: + s₀² = variance of completely segregated state + s² = variance of current mixture + s_R² = variance of perfectly random mixture + M = 0: completely segregated + M = 1: perfectly random + M ≥ 0.95: acceptably mixed + + Scale-up considerations: + Tip speed constant: v_tip_lab = v_tip_prod + Froude number constant: Fr_lab = Fr_prod + Blend time: t_blend_prod = t_blend_lab × (V_prod / V_lab)^n + n ≈ 0.2–0.5 (empirical) + +Vacuum Conveying — Dense & Lean Phase: + Powder transfer between process equipment without + manual handling (containment benefit). + + Dense phase: + Low velocity (1–5 m/s), high solid loading ratio + Plug flow regime, gentle product handling + Suitable for fragile granules and blends + Higher vacuum level (−0.6 to −0.9 bar) + Pipe diameter: 25–75 mm + + Lean (dilute) phase: + Higher velocity (15–30 m/s), lower solid loading + Suspension flow regime + Lower vacuum level (−0.2 to −0.4 bar) + Pipe diameter: 50–150 mm + + ATEX dust explosion protection: + Pharmaceutical powders often combustible + Dust explosion risk assessment per ATEX Directive 2014/34/EU + Measures: + Inerting (N₂ purge, O₂ < LOC limiting oxygen concentration) + Explosion venting panels + Explosion isolation valves + Antistatic design (conductive hoses, grounding) + Dust hazard analysis (DHA) per NFPA 652 +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class MillEquipmentType { Hammer_FitzMill, Conical_Comil, Pin_Mill, Jet_Mill, Ball_Mill }; +enum class SieveType { Vibratory_Russell, Centrifugal_Sifter, Ultrasonic_Sieve }; +enum class BlenderType { V_Blender, Bin_Blender_Tumble, DoubleCone, Ribbon_Blender, Diffusion }; +enum class ConveyingPhase { DensePhase, LeanPhase, DilutePhase }; + +struct MillSpec { + MillEquipmentType type; + double screen_size_mm; // hammer/comil: 0.2–6.0 + double screen_hole_type; // round, grater, slotted + double rotor_speed_rpm; // 500–20,000 + double tip_speed_m_per_s; + double motor_power_kW; + double feed_rate_kg_per_h; + double grinding_pressure_bar; // jet mill: 4–8 + double classifier_speed_rpm; // jet mill: 2,000–10,000 + double target_D50_um; + double target_D90_um; + bool cryogenic_cooling; // for heat-sensitive materials + double nitrogen_flow_kg_per_h; +}; + +struct ParticleSizeSpec { + double D10_um; + double D50_um; + double D90_um; + double span; // (D90−D10)/D50 + double specific_surface_area_m2_per_g; // BET + bool measured_by_laser_diffraction; + std::string instrument; // Malvern Mastersizer, Sympatec +}; + +struct SieveSpec { + SieveType type; + int number_of_decks; + double deck_1_mesh_micron; // top + double deck_2_mesh_micron; + double deck_3_mesh_micron; // bottom + double amplitude_mm; + double frequency_Hz; + double deck_angle_deg; + double feed_rate_kg_per_h; + double sieve_efficiency_pct; +}; + +struct BlenderSpec { + BlenderType type; + double total_volume_L; + double working_volume_L; // 40–60% of total + double fill_ratio_pct; + double rotation_speed_rpm; + double blend_time_min; + double batch_size_kg; + int number_of_sampling_points; // 10–20 + double blend_uniformity_RSD_target_pct; // ≤5% + double api_concentration_pct_wt; + bool ifc_enabled; // in-line NIR/Raman blending monitoring +}; + +struct VacuumConveyorSpec { + ConveyingPhase phase; + double conveying_distance_m; + double conveying_height_m; + double pipe_diameter_mm; + double conveying_velocity_m_per_s; + double vacuum_level_bar; + double solid_loading_ratio_kg_per_kg; // kg powder / kg gas + double transfer_rate_kg_per_h; + bool nitrogen_inerting; + double oxygen_concentration_limit_pct; // LOC + bool explosion_venting; + bool antistatic_hoses; + bool atex_zone_classification; // 20/21/22 +}; + +struct PowderProcessingSpec { + MillSpec mill; + ParticleSizeSpec particle_size_in; + ParticleSizeSpec particle_size_target; + SieveSpec sieve; + BlenderSpec blender; + VacuumConveyorSpec conveyor; +}; + +struct PowderProcessingState { + double mill_rotor_speed_actual; + double mill_motor_power_actual; + double particle_D50_actual_um; + double sieve_mass_flow_actual; + double blender_rsd_actual_pct; + double blender_lacey_index; + double conveyor_velocity_m_per_s; + double conveyor_transfer_rate_actual; + bool atex_alarm; +}; + +struct PowderProcessingPerformance { + double milled_D50_um; + double milled_D90_um; + double yield_pct; // through desired sieve fraction + double blend_uniformity_rsd_pct; + double blend_lacey_index; + bool blend_meets_rsd_5pct; + double conveyor_capacity_kg_per_h; + double specific_energy_kWh_per_kg; + bool atex_compliant; +}; + +MillSpec design_mill(MillEquipmentType type, double feed_D50_um, double target_D50_um, double feed_rate_kg_per_h); +SieveSpec design_sieve(double target_mesh_micron, double feed_rate_kg_per_h, int num_decks = 3); +BlenderSpec design_blender(BlenderType type, double batch_size_kg, double api_load_pct); +VacuumConveyorSpec design_vacuum_conveyor(double transfer_rate, double distance_m, double height_m, ConveyingPhase phase = ConveyingPhase::DensePhase); +PowderProcessingPerformance simulate_powder_processing(const PowderProcessingSpec& spec, PowderProcessingState& state); + +double calculate_jet_mill_D50(double grinding_pressure_bar, double classifier_rpm, double feed_rate, double material_hardness_Mohs); +double calculate_blend_rsd(const std::vector& assay_values); +double calculate_lacey_index(const std::vector& sample_compositions, int total_particles); +double estimate_minimum_fluidization_velocity(double dp_um, double rho_particle, double rho_gas, double mu); + +} // namespace vde::pharma_equipment +``` + +--- + +### 3. Sterile Injection Manufacturing (SVP/LVP/PFS) + +**Priority**: P1 + +#### 3.1 Vial Washing, Depyrogenation, Aseptic Filling, Stoppering, Capping, Lyophilization, and Terminal Sterilization + +``` +Sterile injectable manufacturing overview: + Parenteral drug products must be sterile (sterility assurance level + SAL ≤ 10⁻⁶) and free from pyrogens (endotoxins). The manufacturing + process includes component preparation, aseptic filling, closure, + and optional lyophilization or terminal sterilization. + +Vial Washing — Rotary Vial Washer: + Process stations (continuous rotary motion): + Station 1 — Pre-wash: WFI (Water for Injection) spray, internal+external + Station 2 — Main wash: WFI recirculated wash at 60–80°C + Station 3 — Rinse 1: fresh WFI rinse + Station 4 — Rinse 2: WFI final rinse + Station 5 — Compressed air blow-out: filtered compressed air, 2–3 bar + Station 6 — Siliconization (optional): silicone emulsion spray + (dimethicone 1–5% in WFI) for reduced stopper insertion force + Station 7 — Drying: hot air (150–250°C, HEPA filtered) + + WFI quality per USP <1231>: + Conductivity: ≤1.3 μS/cm at 25°C + TOC (Total Organic Carbon): ≤500 ppb + Endotoxin: <0.25 EU/mL + Microbiological: <10 CFU/100 mL + + Washing cycle time: 5–15 min per vial + Vial throughput: 100–600 vials/min (depending on machine size) + +Depyrogenation Tunnel: + Dry heat sterilization + endotoxin destruction + + Tunnel zones: + Zone 1 — Infeed: gradual heating + Zone 2 — Sterilization zone: 300–350°C (setpoint) + Zone 3 — Cooling zone: sterile HEPA-filtered air cooling + Exits directly into Grade A aseptic filling zone + + Endotoxin inactivation: + Log reduction = log(N₀/N) ≥ 3 log (minimum for depyrogenation) + + FH value (equivalent time at 250°C): + FH = Σ(Δt × 10^((T − 250) / Z)) + Where: + Δt = time interval [min] + T = actual temperature [°C] + Z = z-value for endotoxin destruction ≈ 46.4°C + Minimum FH ≥ 1365 min (equivalent to 250°C for 1365 min, + which gives ≥3-log reduction) + + Belt speed: + v_belt = L_sterilization_zone / t_residence_target + Where: + L_sterilization_zone = length of zone at ≥300°C [m] + t_residence = time vials at target temperature [min] + + Typical: 3–10 min residence at 300°C, belt speed 100–300 mm/min + + Airflow: + Laminar unidirectional from ceiling HEPA to bottom return + Pressure cascade: tunnel > washing room (ISO 8) > technical area + +Aseptic Filling: + Filling technologies: + Peristaltic pump (flexible tubing, disposable): + Fill volume V = π × (d_tube/2)² × L_stroke × n_strokes + Accuracy: ±1.0–2.0% of target + Disposable → no cross-contamination + Suitable for small batches, clinical + + Rotary piston pump (stainless steel + ceramic piston): + Fill volume V = π × (d_piston/2)² × stroke_length + Accuracy: ±0.5–1.0% + CIP/SIP cleanable, reusable + Suitable for high-speed, large batch production + + Time-pressure filling: + V = Q × t_open (valve open time) + Q = f(ΔP, orifice_diameter, fluid_viscosity) + Accuracy: ±1.0% + 100% in-line weight check (load cell per filling station) + + Fill volume accuracy: + For SVP (Small Volume Parenteral, ≤100 mL): + USP <1151>: volume delivered ≥ labeled volume + Overfill: typically 0.5–3% to ensure withdrawal volume + Target: ±1% of target fill weight (in-process control) + + Nitrogen flushing: + O₂-sensitive products (biologics, oxidation-prone) + N₂ flush before and/or after filling + Headspace O₂ target: <1–2% (residual) + N₂ purity: >99.999%, filtered 0.2μm sterile + Flush flow rate: 0.5–5 L/min per nozzle + + Filling line speed: + SVP: 100–600 vials/min + LVP (Large Volume Parenteral, >100 mL): 20–100 containers/min + PFS (Pre-filled Syringe): 100–400 units/min + +Stoppering: + Vibratory bowl feeder: + Stoppers fed via vibratory bowl → track → stopper insertion station + Stopper orientation: consistent (flange up for lyo stoppers) + + Partial stoppering (for lyophilization): + Stopper inserted partially (vents open) + Allows water vapor escape during primary drying + Insertion depth: 50–70% of stopper height + + Full stoppering (for non-lyo products): + Stopper fully seated in vial neck + Stopper insertion force: 10–50 N + 100% stopper presence check via camera/vision + +Capping — Aluminum Flip-Off Seal: + Cap feeding → cap placement on stoppered vial → crimping + + Crimping head: + Jaws (3–4 segments) close around cap periphery + Rollers form aluminum skirt around vial neck finish + Crimping force: 50–200 N (depends on vial/cap size) + + Residual Seal Force (RSF): + RSF = force required to release the seal [N] + Measured offline via RSF tester (torque-to-loosen + or direct pull-off test) + RSF target: 20–60 N (product-specific) + RSF too low: container closure integrity (CCI) risk + RSF too high: difficult to open, potential glass damage + + Cap types: + Standard flip-off: polypropylene disc + aluminum ring + Flip-tear-up: integrated plastic + aluminum + Plastic press-on: for non-sterile products + + Quality check: + Visual: crimp quality (no wrinkles, no exposed glass) + 100% camera inspection: cap presence, crimp integrity + +Lyophilization (Freeze-Drying): + Cycle phases: + Phase 1 — Freezing: + Shelf temperature ramped down to −40 to −50°C + Product frozen (ice crystals form) + Annealing (optional): hold at −15 to −25°C for crystal growth + Freezing rate (0.5–2°C/min) affects ice crystal size + → pore structure → primary drying rate + + Phase 2 — Primary Drying (sublimation): + Chamber pressure reduced to 0.05–0.5 mbar + Shelf temperature: −20 to +20°C (ramp + hold) + Heat transfer to product: + Q_sub = K_v × (T_shelf − T_product) + K_v = vial heat transfer coefficient [W/(m²·K)] + Ice sublimation: solid ice → water vapor (no liquid) + Product temperature must remain below: + T_c (collapse temperature): −15 to −30°C typically + T_g' (glass transition temp of maximally frozen concentrate) + + Sublimation rate: + ṁ_ice = (P_ice(T_product) − P_chamber) / R_total + Where: + P_ice = vapor pressure of ice at T_product [mbar] + P_chamber = chamber pressure [mbar] + R_total = total resistance (dried layer + stopper + chamber) + + End-point detection: + Pirani gauge (thermal conductivity) + Capacitance manometer + (absolute pressure): + Ratio = P_Pirani / P_CM + During sublimation: H₂O vapor → P_Pirani > P_CM + End of sublimation: H₂O vapor gone → P_Pirani ≈ P_CM + End-point criterion: Ratio < 1.1 (or differential <0.02 mbar) + Alternative: comparative thermocouple, MTM (Manometric + Temperature Measurement), tunable diode laser absorption + spectroscopy (TDLAS) + + Phase 3 — Secondary Drying (desorption): + Shelf temperature: +20 to +40°C + Chamber pressure: as low as possible (<0.01 mbar typical) + Unfrozen (bound) water removed by desorption + Target residual moisture: <1–3% w/w + Duration: 2–8 hours typical + + Phase 4 — Stoppering: + Under vacuum or partial N₂ backfill + Shelves compress downward to fully insert stoppers + Stopper seating: uniform across all vials + + Lyophilizer capacity metrics: + Shelf area: 0.5–50 m² + Number of shelves: 3–12 + Shelf spacing: 40–120 mm + Condenser capacity: 10–500 kg ice + Condenser temperature: −50 to −85°C + Shelf temperature range: −55 to +70°C + Shelf temperature uniformity: ±1°C + +Pre-Filled Syringe (PFS) Handling: + Nest + Tub configuration: + Syringe barrels held in plastic nest (array) + Nest sits in tub (plastic tray) + Tub sealed with Tyvek lid (sterile barrier) + Standard: ISO 11040-6 / 11040-8 + + Processing line: + 1. De-lidding (Tyvek peel-off, inside Grade A) + 2. Nest transfer into filling line + 3. Filling (plunger rod, needle not yet attached) + 4. Plunger (stopper) insertion: vacuum-assisted, bubble-free + 5. Inspection: fill volume, plunger position, particulates + 6. Labeling + packaging + + Bubble-free filling: + Vacuum in barrel during filling + Precision stopper insertion (controlled depth, no air) + +Steam Sterilization (Autoclave / Terminal Sterilization): + Saturated steam sterilization: + Temperature: 121°C (standard) or 134°C (rapid) + Pressure: 2.05 bar(abs) at 121°C, 3.04 bar(abs) at 134°C + + F₀ value (equivalent time at 121°C): + F₀ = Σ(Δt × 10^((T − 121) / 10)) [min] + Where: + Δt = time interval [min] + T = actual temperature [°C] + z = 10°C for moist heat (Geobacillus stearothermophilus) + + Minimum F₀: + Overkill method: F₀ ≥ 15 min (121°C equivalent) + Bioburden-based: F₀ = D121 × (log N₀ − log SAL) + D121 = 1.5 min for G. stearothermophilus + N₀ = initial bioburden + SAL = 10⁻⁶ + + Cycle phases: + 1. Air removal (prevacuum pulses, 3–4 ×) + Air removal validation: Bowie-Dick test + 2. Heating/Exposure (F₀ accumulation) + 3. Cooling (sterile filtered compressed air or WFI jacket) + + Load types: + Porous/hard goods: wrapped instruments, tubing + Liquid loads: filled vials/ampoules (vented closure) +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class WasherType { Rotary_Vial_Washer, Linear_Washer, Ultrasonic }; +enum class FillPumpType { Peristaltic, RotaryPiston, TimePressure, Ceramic }; +enum class LyophilizerType { Shelf_FreezeDryer, Manifold, Bulk_Tray }; +enum class StopperMode { Full_Stoppering, Partial_Lyo_Stoppering }; +enum class SterilizerType { Steam_Autoclave, DryHeat_Oven, EtO, VHP }; + +struct VialWasherSpec { + WasherType type; + int number_of_stations; // 6–12 + double wfi_temperature_C; // 60–80°C (wash), ambient (rinse) + double wfi_flow_rate_L_per_min; + double compressed_air_pressure_bar; // 2–3 + double hot_air_temp_C; // 150–250°C + double throughput_vials_per_min; // 100–600 + double vial_size_ml_min; // 1R–100R ISO + double vial_size_ml_max; + bool siliconization_station; + double silicone_emulsion_concentration_pct; // 1–5% +}; + +struct DepyrogenationTunnelSpec { + double sterilization_temp_C; // 300–350 + double sterilization_zone_length_m; + double belt_speed_mm_per_min; // 100–300 + double residence_time_min; + double FH_value_min; // ≥1365 + double endotoxin_log_reduction_target; // ≥3 + double hepa_filter_class; // H14 per EN 1822 + double cooling_zone_length_m; + double cooling_air_temp_C; // 20–25°C + double tunnel_width_mm; +}; + +struct SterileFillSpec { + FillPumpType pump_type; + double target_fill_volume_ml; + double fill_volume_tolerance_ml; + double fill_accuracy_pct; // ±1% + double filling_speed_units_per_min; // 100–600 + int number_of_filling_heads; // 2–16 + bool nitrogen_flush_enabled; + double nitrogen_flush_flow_L_per_min; + double headspace_O2_target_pct; // <2% + bool in_line_weight_check; + int weight_check_frequency; // every 1, 10, or 100 + double peristaltic_tubing_ID_mm; + double piston_diameter_mm; + double piston_stroke_mm; +}; + +struct StopperingSpec { + StopperMode mode; + std::string stopper_type; // 13mm, 20mm, 32mm + std::string stopper_material; // bromobutyl, chlorobutyl + double stopper_insertion_depth_mm; // partial lyo: 50–70% height + double stopper_insertion_force_N; // 10–50 + bool stopper_presence_check; // 100% camera + int vibratory_bowl_feed_rate_units_per_min; +}; + +struct CappingSpec { + std::string cap_type; // flip-off, flip-tear-up + std::string cap_size; // 13mm, 20mm, 32mm + double crimping_force_N; // 50–200 + double RSF_target_N; // 20–60 (residual seal force) + double RSF_tolerance_N; + bool cap_vision_inspection; + int capping_speed_units_per_min; +}; + +struct LyophilizerSpec { + double shelf_area_m2; // 0.5–50 + int number_of_shelves; + double shelf_spacing_mm; // 40–120 + double shelf_temp_min_C; // −55 typical + double shelf_temp_max_C; // +70 typical + double shelf_temp_uniformity_C; // ±1 + double condenser_capacity_kg_ice; + double condenser_temp_C; // −50 to −85 + double chamber_pressure_range_min_mbar; // 0.01 + double chamber_pressure_range_max_mbar; // 1.0 + + // Freezing parameters + double freezing_temp_C; // −40 to −50 + double freezing_ramp_rate_C_per_min; // 0.5–2 + double annealing_temp_C; // −15 to −25 (optional) + double annealing_hold_time_min; + + // Primary drying parameters + double primary_drying_shelf_temp_C; // −20 to +20 + double primary_drying_chamber_pressure_mbar; // 0.05–0.5 + double collapse_temperature_C; // product-specific + double primary_drying_end_pirani_cm_ratio; // <1.1 + + // Secondary drying parameters + double secondary_drying_shelf_temp_C; // +20 to +40 + double secondary_drying_chamber_pressure_mbar; // <0.01 + double target_residual_moisture_pct; // <1–3% + + // Stoppering + double stoppering_atmosphere; // vacuum or N2 + double stoppering_vacuum_mbar; +}; + +struct PFSSpec { + std::string syringe_size_ml; // 0.5, 1.0, 2.25, etc. + std::string nest_type; // ISO 11040-6/8 + double fill_volume_ml; + double plunger_stopper_insertion_depth_mm; + bool vacuum_bubble_free_filling; + bool plunger_position_check; + double throughput_units_per_min; // 100–400 +}; + +struct AutoclaveSpec { + SterilizerType type; + double sterilization_temp_C; // 121 (std) or 134 (rapid) + double sterilization_pressure_bara; + double F0_target_min; // ≥15 for overkill + int prevacuum_pulses; // 3–4 + double prevacuum_vacuum_level_bara; + double exposure_time_min; + double cooling_time_min; + double chamber_volume_L; + bool bowie_dick_test; + std::string load_type; // porous, liquid, instruments +}; + +struct SterileManufacturingSpec { + VialWasherSpec washer; + DepyrogenationTunnelSpec tunnel; + SterileFillSpec filling; + StopperingSpec stoppering; + CappingSpec capping; + LyophilizerSpec lyophilizer; + PFSSpec pfs; + AutoclaveSpec autoclave; + bool lyophilization_required; + bool terminal_sterilization; +}; + +struct SterileBatchState { + double washer_throughput_actual; + double tunnel_temp_actual_C; + double FH_accumulated; + double fill_volume_actual_ml; + double fill_weight_rsd_pct; + double headspace_O2_actual_pct; + double lyo_shelf_temp_current_C; + double lyo_chamber_pressure_mbar; + double lyo_product_temp_C; + double lyo_pirani_cm_ratio; + double F0_accumulated; + double autoclave_temp_actual_C; + int vials_filled; + int vials_rejected; +}; + +struct SterileManufacturingPerformance { + double fill_volume_accuracy_pct; + double fill_volume_rsd_pct; + double headspace_O2_mean_pct; + double capping_RSF_mean_N; + double capping_RSF_range_N; + double lyo_residual_moisture_pct; + double lyo_primary_drying_time_hours; + double lyo_endpoint_ratio_final; + double F0_final_min; + double sterility_assurance_SAL; // target ≤10⁻⁶ + double endotoxin_log_reduction; + double overall_yield_pct; // passed/total + bool meets_USP_sterility; + bool meets_endotoxin_limit; + bool cci_container_closure_integrity; +}; + +VialWasherSpec design_vial_washer(double throughput_vpm, double vial_ml, bool siliconization = true); +DepyrogenationTunnelSpec design_depyrogenation_tunnel(double throughput_vpm, double target_FH = 1365.0); +SterileFillSpec design_sterile_filling(double target_ml, double speed_upm, FillPumpType pump = FillPumpType::RotaryPiston); +LyophilizerSpec design_lyophilizer(double shelf_area_m2, double collapse_temp_C); +PFSSpec design_pfs_line(double syringe_ml, double throughput_upm); +AutoclaveSpec design_autoclave(double F0_target_min, double chamber_volume_L); +SterileManufacturingPerformance simulate_sterile_batch(const SterileManufacturingSpec& spec, SterileBatchState& state); + +double calculate_FH_value(const std::vector& temps_C, const std::vector& intervals_min, double z_value = 46.4); +double calculate_F0_value(const std::vector& temps_C, const std::vector& intervals_min); +double calculate_lyo_sublimation_rate(double T_product_C, double P_chamber_mbar, double K_v, double T_shelf_C); +bool check_lyo_endpoint(double P_pirani, double P_cm, double ratio_threshold = 1.08); + +} // namespace vde::pharma_equipment +``` + +--- + +### 4. Isolator & RABS Containment + +**Priority**: P1 + +#### 4.1 Aseptic Isolator, RABS, Cleanroom Classification, and HVAC + +``` +Containment technology overview: + Isolators and Restricted Access Barrier Systems (RABS) provide + physical separation between the operator and the aseptic process + zone (Grade A / ISO 5). They are the cornerstone of modern + aseptic manufacturing per EU GMP Annex 1. + +Aseptic Isolator: + Construction: + Stainless steel 316L enclosure with glove ports + Half-suit for large-reach manipulations + Viewing window (tempered glass or polycarbonate) + Transfer systems: + Rapid transfer ports (RTP): alpha-beta port for closed transfer + Mousehole: continuous opening with overpressure air curtain + Air-lock pass-through chambers + + Pressure control: + Positive pressure isolator: +30 to +80 Pa vs. room + (protects aseptic product from external contamination) + Negative pressure isolator: −30 to −80 Pa vs. room + (contains hazardous products: cytotoxics, hormones) + Pressure cascade monitoring and alarm system + + VHP (Vaporized Hydrogen Peroxide) Bio-decontamination: + Cycle phases: + 1. Dehumidification: + Reduce chamber RH to <10–20% (improves VHP efficacy) + Typically 5–15 min + 2. Conditioning: + Inject VHP (30–35% H₂O₂ aqueous solution vaporized) + Rapid rise to target H₂O₂ concentration (200–1,000 ppm) + 3. Bio-decontamination (dwell): + Hold at target H₂O₂ concentration + Target: ≥6-log reduction of Geobacillus stearothermophilus + Duration: 20–60 min (depends on concentration, temperature) + C(t) = ∫₀^t conc(τ) dτ (concentration × time integral) + 4. Aeration: + Catalytic converter or fresh air purge + Reduce H₂O₂ to <1 ppm (occupational safety limit) + Duration: 30–120 min + + VHP efficacy model: + D-value: time at given concentration to reduce population + by 1 log + D = D₀ × (C₀ / C)^n (concentration dependence) + Sporicidal log reduction: + LR = (C × t) / (C₀ × D₀) in simplified linear model + + Environmental monitoring (isolator interior): + Non-viable particle counting: + ISO 14644-1 method at 0.5μm and 5.0μm + Grade A at rest: ≤3,520/m³ at ≥0.5μm, ≤20/m³ at ≥5.0μm + Viable monitoring: + Settle plates (90mm, exposed 4h): <1 CFU per plate + Active air sampling (1m³): <1 CFU/m³ + Contact plates (55mm): <1 CFU per plate + Swabs (glove, surface): <1 CFU + +RABS — Restricted Access Barrier System: + Two types: + oRABS (open RABS): + Physical barrier + UDAF, but open to room at bottom/corners + Cleanroom background: Grade B (ISO 7) + Requires full Grade B gowning for interventions + + cRABS (closed RABS): + Fully enclosed, positive pressure + Cleanroom background: Grade C or D (ISO 7 or 8) + Reduced gowning requirements + Can use VHP decontamination + + Unidirectional Airflow (UDAF): + Supply velocity at working position: + v = 0.45 ± 0.1 m/s (EU GMP Annex 1 guidance) + Measured at working height (typically 200–300 mm below + HEPA filter face) + Smoke study visualization: + Airflow pattern: smooth, parallel streamlines + No turbulence, no reverse flow into critical zone + Smoke recovery time after disturbance <15 seconds + + HEPA filter specification: + H14 per EN 1822-1 + Efficiency: ≥99.995% at MPPS (most penetrating particle size) + Leak tested per ISO 14644-3: scan test at 0.01% of rated flow + No single leak >0.01% penetration (upstream/downstream) + +Cleanroom Classification (ISO 14644-1 & EU GMP Annex 1): + Particle limits (per m³): + + Grade | ISO Class | ≥0.5μm (at rest) | ≥5.0μm (at rest) | ≥0.5μm (in op) | ≥5.0μm (in op) + -------|-----------|-------------------|-------------------|-----------------|---------------- + A | ISO 5 | 3,520 | 20 | 3,520 | 20 + B | ISO 7 | 352,000 | 2,900 | 352,000 | 2,900 + C | ISO 8 | 3,520,000 | 29,000 | 3,520,000 | 29,000 + D | ISO 9 | - | - | - | - + + Microbial limits: + Grade | Settle plate (CFU/4h) | Contact plate (CFU) | Active air (CFU/m³) + -------|-----------------------|---------------------|--------------------- + A | <1 | <1 | <1 + B | 5 | 5 | 10 + C | 50 | 25 | 100 + D | 100 | 50 | 200 + + Recovery rate: + Speed at which cleanroom returns to specified cleanliness + after particle generation event: + Recovery time: <15–20 min to return to ISO classification + Recovery rate [min⁻¹]: ln(C_initial / C_target) / t + +HVAC System Design for Cleanrooms: + Air Handling Unit (AHU): + Make-up air (fresh) + recirculation air + Filtration train: pre-filter (G4) → bag filter (F7/F9) → HEPA H14 + Temperature control: 18–26°C (typically 20–22°C) + Relative humidity: 45–60% (typically 50±5%) + Supply air change rate: 20–60 ACH (air changes per hour) + Grade A zone (UDAF): velocity-based, typically 0.45 m/s + Grade B: >40 ACH + Grade C: >30 ACH + Grade D: >20 ACH + + Pressurization cascade: + Differential pressure between adjacent cleanliness grades: + ΔP = 10–15 Pa (positive, flowing from cleaner to less clean) + Most critical zone (Grade A) has highest pressure + Cascade: A > B > C > D > unclassified + Pressure monitoring: continuous, with alarm + + Temperature and RH control: + Cooling coil: chilled water or DX + Heating coil: hot water, steam, or electric + Humidifier: steam injection (clean steam) + Dehumidifier: cooling coil + reheat or desiccant wheel +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class IsolatorPressureMode { Positive, Negative, Dual }; +enum class RABS_Type { oRABS_Open, cRABS_Closed }; +enum class CleanroomGrade { Grade_A_ISO5, Grade_B_ISO7, Grade_C_ISO8, Grade_D_ISO9 }; +enum class VHP_CyclePhase { Dehumidification, Conditioning, Biodecontamination, Aeration }; + +struct IsolatorSpec { + double chamber_volume_L; + double glove_ports_count; + bool half_suit_integrated; + IsolatorPressureMode pressure_mode; + double pressure_setpoint_Pa; // +30 to +80 or −30 to −80 + double pressure_alarm_low_Pa; + double pressure_alarm_high_Pa; + int rtp_transfer_ports; + bool mousehole_air_curtain; + + // VHP cycle + double vhp_concentration_target_ppm; // 200–1000 + double vhp_biodecontamination_time_min; // 20–60 + double vhp_log_reduction_target; // ≥6 + double vhp_aeration_time_min; // 30–120 + double vhp_aeration_limit_ppm; // <1 + + // Environmental monitoring + bool integrated_particle_counter; + bool viable_air_sampler; + bool settle_plate_positions; + int particle_counter_locations; +}; + +struct RABS_Spec { + RABS_Type type; + double supply_air_velocity_m_per_s; // 0.45 ±0.1 + double hepa_filter_class; // H14 + CleanroomGrade background_grade; + bool vhp_decontamination; + double smoke_recovery_time_sec; // <15 + int working_openings_count; + bool glove_port_access; +}; + +struct CleanroomSpec { + CleanroomGrade grade; + double floor_area_m2; + double ceiling_height_m; + double room_volume_m3; + double supply_air_flow_m3_per_h; + double air_change_rate_per_h; // 20–60 ACH + double temperature_setpoint_C; // 18–26 + double temperature_tolerance_C; + double RH_setpoint_pct; // 45–60 + double RH_tolerance_pct; + double differential_pressure_Pa; // 10–15 vs adjacent grade + double particle_limit_05um_per_m3; // per ISO 14644 + double particle_limit_5um_per_m3; + double microbial_settle_plate_CFU_4h; + double microbial_contact_plate_CFU; + double microbial_active_air_CFU_per_m3; + bool continuous_particle_monitoring; + bool continuous_microbial_monitoring; + bool ems_environmental_monitoring_system; +}; + +struct HVAC_Spec { + double total_supply_air_m3_per_h; + double fresh_air_makeup_pct; // 10–30% + double recirculation_air_pct; // 70–90% + double cooling_capacity_kW; + double heating_capacity_kW; + double humidification_kg_per_h; + double dehumidification_capacity_kg_per_h; + double pre_filter_grade; // G4 + double secondary_filter_grade; // F7/F9 + double hepa_filter_class; // H14 + double fan_power_kW; + double heat_recovery_efficiency_pct; + std::string chiller_type; // chilled water, DX + std::string boiler_type; // steam, hot water +}; + +struct ContainmentSystemSpec { + IsolatorSpec isolator; + RABS_Spec rabs; + CleanroomSpec cleanroom; + HVAC_Spec hvac; + bool isolator_deployed; + bool rabs_deployed; +}; + +struct ContainmentSystemState { + bool isolator_pressure_ok; + double isolator_pressure_actual_Pa; + double vhp_concentration_actual_ppm; + VHP_CyclePhase vhp_phase; + double vhp_cycle_time_elapsed_min; + double cleanroom_temp_actual_C; + double cleanroom_RH_actual_pct; + double cleanroom_particles_05um_per_m3; + double cleanroom_particles_5um_per_m3; + double cleanroom_settle_plate_CFU; + double cleanroom_recovery_time_min; + bool ems_alarm_active; +}; + +struct ContainmentSystemPerformance { + double vhp_log_reduction_achieved; + double vhp_cycle_success_rate_pct; + double isolator_pressure_stability_Pa_stddev; + double udaF_velocity_mean_m_per_s; + double udaF_velocity_stddev_m_per_s; + double cleanroom_particle_compliance_pct; + double cleanroom_microbial_compliance_pct; + double hvac_energy_consumption_MWh_per_year; + bool meets_EU_GMP_Annex1; + bool meets_ISO_14644; +}; + +IsolatorSpec design_isolator(double chamber_volume_L, IsolatorPressureMode mode, int glove_ports); +RABS_Spec design_rabs(RABS_Type type, double working_length_m); +CleanroomSpec design_cleanroom(CleanroomGrade grade, double floor_area_m2, int occupants); +HVAC_Spec design_hvac(double cleanroom_area_m2, CleanroomGrade grade); +ContainmentSystemPerformance simulate_containment(const ContainmentSystemSpec& spec, ContainmentSystemState& state); + +double calculate_VHP_log_reduction(double concentration_ppm, double time_min, double D_value, double n_concentration_exponent); +double calculate_cleanroom_recovery_time(double initial_particles, double target_particles, double air_change_rate); +bool validate_cleanroom_classification(double particles_05, double particles_5, CleanroomGrade target_grade, bool at_rest = true); + +} // namespace vde::pharma_equipment +``` + +--- + +### 5. Biopharma Upstream & Downstream Processing + +**Priority**: P1 + +#### 5.1 Bioreactor, Harvest, Chromatography, Virus Clearance, UF/DF, and Final Formulation + +``` +Biopharma processing overview: + Biopharmaceuticals (monoclonal antibodies mAbs, recombinant proteins, + vaccines, cell/gene therapies) are produced via cell culture in + bioreactors followed by a multi-step downstream purification train. + +Bioreactor — Upstream Processing: + Types: + Stainless steel (CIP/SIP): + Material: 316L stainless steel, electropolished Ra ≤0.4μm + Volume: 50–20,000 L (production scale) + CIP: NaOH 0.5M, 60–80°C; SIP: 121–134°C saturated steam, F₀≥15 + + SUB (Single-Use Bioreactor): + Multilayer film bag, volume 50–6,000 L + Pre-sterilized by gamma irradiation (25–45 kGy) + + Rocker (WAVE) Bioreactor: + Disposable Cellbag, rocking angle 2–12°, rock rate 5–40 rpm + Very low shear, volume 1–500 L + + Process control loops (PID): + Temperature: T_set = 37.0°C ±0.5°C, PID typical Kp=2.0, Ki=0.5, Kd=0.1 + pH: 7.0–7.2 ±0.05, CO₂ sparging + NaHCO₃/NaOH base addition + DO: 30–50% air saturation, cascade O₂ sparge → agitation → headspace O₂ + Agitation: Rushton impeller Np=5.0 (turbulent), tip speed 0.5–2.0 m/s + + Perfusion with ATF (Alternating Tangential Flow): + Hollow fiber 0.2–0.65 μm, cell density 50–200 × 10⁶ cells/mL + Perfusion rate: 0.5–2.0 VVD + +Harvest — Primary Recovery: + Depth filtration: filter area 0.5–5 m²/1000L, flux 50–200 LMH + Centrifugation: disc-stack, 5,000–12,000 × g, NTU <10 supernatant + +Chromatography — Downstream Purification: + Protein A Affinity Capture: + Resin: MabSelect SuRe / PrismA (Cytiva), DBC 30–60 g mAb/L + Load: pH 7–8, Elution: pH 3.0–3.8 + Step yield: >95%, HCP reduction: 2–3 log, DNA reduction: 3–4 log + + Dynamic Binding Capacity (DBC): + DBC_10% = amount bound at 10% breakthrough [mg/mL resin] + Breakthrough curve: C_outlet/C_inlet vs. loaded mass + + IEX (CEX bind-elute, AEX flow-through) + HIC (aggregate removal), SEC (polishing) + + Column packing quality: + HETP < 2× d_p (particle diameter) + Asymmetry 0.8–1.2 + +Virus Inactivation: + Low pH 3.5–4.0, hold 30–60 min, >4 log LRV enveloped viruses + +Virus Filtration (Nanofiltration): + Planova 20N / Viresolve Pro, pore 15–20 nm, >4 log LRV parvovirus + Pre-use + post-use integrity test + +UF/DF — Tangential Flow Filtration: + Pellicon cassette, MWCO 10/30/50kDa + Concentration factor CF = V_feed / V_retentate, typical 5–20× + TMP: (P_feed + P_retentate)/2 − P_permeate, 0.5–1.5 bar + Flux J [LMH] vs. TMP: knee at optimal TMP + Diafiltration: C/C₀ = exp(−N × S), 5–10 diavolumes for >99% exchange + CIP: 0.5M NaOH, flux recovery >90% + Flux decay: J(t) = J₀ × t^(−b), b ≈ 0.05–0.20 + +Final Formulation: + DS → formulation buffer → 0.45 + 0.22μm sterilizing filters + Filter integrity: bubble point (hydrophilic, ~3.2–3.8 bar for 0.22μm) + diffusion flow, WIT (hydrophobic) + Must pass pre-fill and post-fill +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class BioreactorType { Stainless_CIP_SIP, SUB_SingleUse, Rocker_WAVE, Perfusion }; +enum class ChromatographyType { ProteinA_Affinity, CEX_CationExchange, AEX_AnionExchange, HIC, SEC }; +enum class VirusInactivationMethod { LowPH_Hold, SolventDetergent }; +enum class TFF_Mode { UF_Concentration, DF_Diafiltration, UFDF_Combined }; +enum class FilterIntegrityTest { BubblePoint, DiffusionFlow, WIT_WaterIntrusion }; + +struct BioreactorSpec { + BioreactorType type; + double working_volume_L; + double agitation_speed_rpm; + double impeller_tip_speed_m_per_s; + double temperature_setpoint_C; + double pH_setpoint; + double DO_setpoint_pct; + double sparge_rate_vvm; + double O2_transfer_rate_kLa_per_h; + bool perfusion_atf; + double perfusion_rate_vvd; + double cell_density_target_million_per_ml; + double Kp_T, Ki_T, Kd_T; + double Kp_pH, Ki_pH, Kd_pH; + double Kp_DO, Ki_DO, Kd_DO; +}; + +struct HarvestSpec { + bool depth_filtration; + double depth_filter_area_m2; + double depth_filter_flux_LMH; + bool centrifugation; + double centrifuge_g_force; + double centrifuge_feed_rate_L_per_h; + double supernatant_clarity_NTU_target; +}; + +struct ChromatographySpec { + ChromatographyType type; + std::string resin_name; + double column_diameter_cm; + double bed_height_cm; + double column_volume_L; + double resin_DBC_mg_per_mL; + double load_mass_g; + double flow_rate_cm_per_h; + double residence_time_min; + double elution_pH; + double step_yield_pct_target; + double cip_NaOH_concentration_M; + double cip_contact_time_min; + double hetp_max_target; + double asymmetry_target; + int number_of_cycles_per_batch; +}; + +struct VirusInactivationSpec { + VirusInactivationMethod method; + double target_pH; + double hold_time_min; + double hold_temperature_C; + double target_log_reduction; +}; + +struct VirusFiltrationSpec { + std::string filter_name; + double pore_size_nm; + double filtration_area_m2; + double operating_pressure_bar; + double target_flux_LMH; + double Vmax_L_per_m2; + double pre_filter_pore_um; + double target_LRV; + bool pre_use_integrity_test; + bool post_use_integrity_test; +}; + +struct TFF_Spec { + TFF_Mode mode; + std::string membrane_type; + double MWCO_kDa; + double membrane_area_m2; + double feed_flow_rate_L_per_min_per_m2; + double TMP_target_bar; + double flux_target_LMH; + double concentration_factor_CF; + double diavolumes_N; + double cip_NaOH_M; + double flux_recovery_after_CIP_pct_target; +}; + +struct FinalFormulationSpec { + double drug_substance_conc_g_per_L; + double target_formulation_conc_g_per_L; + std::string formulation_buffer; + double prefilter_045um_area_m2; + double sterilizing_filter_022um_area_m2; + FilterIntegrityTest integrity_test_method; + double bubble_point_pressure_bar; + double diffusion_flow_limit_mL_per_min; + bool pre_filtration_integrity; + bool post_filtration_integrity; +}; + +struct BiopharmaProcessSpec { + BioreactorSpec bioreactor; + HarvestSpec harvest; + std::vector chromatography_steps; + VirusInactivationSpec virus_inactivation; + VirusFiltrationSpec virus_filtration; + TFF_Spec tff; + FinalFormulationSpec final_formulation; +}; + +struct BiopharmaBatchState { + double bioreactor_viable_cell_density; + double bioreactor_viability_pct; + double bioreactor_titer_g_per_L; + double chromatography_elution_conc_g_per_L; + double virus_inactivation_pH_actual; + double tff_feed_pressure_bar; + double tff_permeate_flow_LMH; + double tff_concentration_factor_actual; + double tff_diavolumes_completed; + bool filter_integrity_pass; +}; + +struct BiopharmaProcessPerformance { + double bioreactor_max_vcd_million_per_ml; + double bioreactor_titer_final_g_per_L; + double protein_A_step_yield_pct; + double overall_purification_yield_pct; + double HCP_clearance_log; + double DNA_clearance_log; + double virus_LRV_lowpH; + double virus_LRV_nanofiltration; + double total_virus_LRV; + double tff_step_yield_pct; + double drug_substance_purity_pct; + bool meets_viral_safety_ICH_Q5A; + bool meets_purity_spec; +}; + +BioreactorSpec design_bioreactor(BioreactorType type, double working_volume_L, double target_vcd); +ChromatographySpec design_chromatography_column(ChromatographyType type, double mass_to_bind_g, double resin_dbc, double bed_height_cm = 15.0); +TFF_Spec design_tff_system(double feed_volume_L, double target_conc_factor, double diavolumes, double MWCO = 30.0); +BiopharmaProcessPerformance simulate_biopharma_process(const BiopharmaProcessSpec& spec, BiopharmaBatchState& state); + +double calculate_DBC_at_breakthrough(double DBC_static, double flow_rate_cm_per_h, double resin_age_cycles); +double calculate_TFF_flux_TMP_curve(const TFF_Spec& spec, double TMP_bar); +double calculate_diafiltration_buffer_exchange(int diavolumes, double sieving_coefficient = 1.0); +bool check_filter_integrity_bubble_point(double measured_P_bar, double expected_P_bar, double tolerance_pct = 5.0); + +} // namespace vde::pharma_equipment +``` + +--- + +### 6. Single-Use Systems (SUS) + +**Priority**: P2 + +#### 6.1 Bioprocess Bags, Tubing, Connectors, Sensors, and Pumps + +``` +SUS Bioprocess Bags: 2D (50mL–50L), 3D (50L–3000+L). Multilayer film PE/EVOH/ULDPE 200–400μm. Gamma 25–45kGy, SAL≤10⁻⁶ per ISO 11137. +Extractables per USP <665>/<1665>. Integrity: pressure decay 250–500mbar or He leak <1×10⁻⁶ mbar·L/s. + +Manifold Tubing: C-Flex (weldable), PharMed BPT (pump life), Silicone (purity). Welding: Terumo SCD IIB, BioWelder. Sealing: BioSealer. + +Aseptic Connectors: ReadyMate (Cytiva) genderless peel-away. Lynx ST (Merck) steam-through SIP. Kleenpak (Pall). + +Single-Use Sensors: pH optical ±0.1pH. DO optical ±1%. Conductivity 0.1–200mS/cm. Pressure −1 to +4bar(g). + +Single-Use Pumps: Levitronix MagLev bearingless centrifugal 0.1–100L/min. Quattroflow 4-diaphragm 0.1–20L/min. +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class SUS_BagType { Pillow_2D, Cubical_3D, Cylindrical_3D }; +enum class SUS_FilmTier { Standard_PE_EVOH, HighBarrier_Plus }; +enum class TubingMaterial { CFlex, PharMed, Silicone_Platinum, TPE }; +enum class ConnectorType { ReadyMate, Lynx_ST, Kleenpak }; +enum class SUS_SensorType { pH_Optical, DO_Optical, Conductivity, Pressure }; +enum class SUS_PumpType { Levitronix_MagLev, Quattroflow_Diaphragm }; + +struct SUS_BagSpec { + SUS_BagType type; double total_volume_L, working_volume_L; + SUS_FilmTier film_tier; double film_thickness_um, gamma_dose_kGy; + bool pressure_decay_tested; double max_working_pressure_bar; +}; + +struct SUS_TubingSpec { + TubingMaterial material; double ID_mm, wall_thickness_mm, length_m; + bool weldable; double pump_life_hours; +}; + +struct SUS_ConnectorSpec { + ConnectorType type; std::string size; + double max_pressure_bar; int max_connect_disconnect_cycles; +}; + +struct SUS_SensorSpec { + SUS_SensorType type; + double measurement_range_min, measurement_range_max, accuracy, drift_per_day; + bool pre_calibrated, gamma_sterilizable; +}; + +struct SUS_PumpSpec { + SUS_PumpType type; + double flow_rate_min_Lpm, flow_rate_max_Lpm, max_pressure_bar; + bool single_use_wetted_parts; +}; + +struct SUS_AssemblySpec { + SUS_BagSpec bag; + std::vector tubing_segments; + std::vector connectors; + std::vector sensors; + SUS_PumpSpec pump; + bool gamma_irradiated; std::string lot, expiry; +}; + +struct SUS_AssemblyState { + bool bag_integrity_ok; double bag_pressure_bar; + double pH_actual, DO_actual_pct, pump_flow_actual_Lpm; + int tubing_weld_count; +}; + +struct SUS_Performance { + bool bag_passed_pressure_test, sterility_maintained; + double pump_cumulative_hours, sensor_drift_total; + bool connector_no_leakage; + bool meets_USP_665_1665, meets_ISO_11137_gamma; +}; + +SUS_BagSpec design_sus_bag(SUS_BagType type, double working_volume_L, SUS_FilmTier tier = SUS_FilmTier::Standard_PE_EVOH); +SUS_AssemblySpec design_sus_assembly(const SUS_BagSpec& bag, const std::vector& sensors); +SUS_Performance simulate_sus_batch(const SUS_AssemblySpec& spec, SUS_AssemblyState& state, double batch_duration_h); + +} // namespace vde::pharma_equipment +``` + +--- + +### 7. Pharmaceutical Packaging & Serialization + +**Priority**: P1 + +#### 7.1 Blister, Bottle, Cartoner, and Track & Trace + +``` +Blister: Alu-PVC/PVDC thermoform 120–150°C or Alu-Alu CFF. Seal 150–200°C at 2–6bar. Seal integrity dye penetration (250–500mbar vac, methylene blue) or vacuum decay (100% inline). + +Bottle line: Unscrambler→electronic counter 12–48ch IR beam→cotton inserter→induction cap seal 0.5–3kW Al foil/polymer→capper torque 0.5–3Nm→retorque→labeler ±1mm→check weigher ±0.01g→serialization printer TIJ/laser. + +Cartoner: Horizontal cartoner with carton erection, GUK/Körber leaflet fold (roll/Z/C), product insertion, tuck/flap/glue closure. + +Serialization: GS1 Data Matrix GTIN(14)+SN+expiry(YYMMDD)+lot, X-dim 0.25–0.50mm. +Camera vision ISO/IEC 15415 Grade A(>3.5)/B(2.5–3.5)/C(1.5–2.5). Min Grade B. +Aggregation: Unit→Bundle→Case(SSCC)→Pallet, 100% parent-child linkage. +Regulations: EU FMD/EMVS, US DSCSA, Russia Chestny ZNAK, China traceability. +``` + +#### 7.2 Proposed API + +```cpp +namespace vde::pharma_equipment { + +enum class BlisterMachineType { Thermoforming_AluPVC, ColdForm_AluAlu }; +enum class CartonClosureType { Tuck, Flap_Glue, Combi }; +enum class PrinterTech { TIJ, Laser_CO2, CIJ }; +enum class AggregationLevel { Unit, Bundle, Case, Pallet }; + +struct BlisterSpec { + BlisterMachineType type; double forming_thickness_um, lidding_thickness_um; + double forming_temp_C, sealing_temp_C, sealing_pressure_bar; + double pocket_depth_mm; int pockets_per_blister; + double throughput_bpm; bool in_line_leak_test; +}; + +struct BottleLineSpec { + double unscrambler_bpm; int counter_channels, target_count; + double induction_power_kW, capper_torque_Nm; + double labeler_accuracy_mm, check_weigher_accuracy_g; + bool child_resistant; PrinterTech printer; +}; + +struct CartonerSpec { + double throughput_cpm; std::string carton_mm, leaflet_fold; + CartonClosureType closure; bool leaflet_check, product_check; +}; + +struct SerializationSpec { + std::string gtin; int sn_length; + double dmx_X_mm; PrinterTech printer; + std::string min_vision_grade; // "B" + bool bundle_agg, case_agg, pallet_agg; + int units_per_bundle, cases_per_pallet; + double agg_accuracy_target; // 100.0 + std::string market; // EU_FMD, US_DSCSA, RU, CN + bool tamper_evident; +}; + +struct PackagingSpec { + BlisterSpec blister; BottleLineSpec bottle; + CartonerSpec cartoner; SerializationSpec serialization; + bool blister_format; double line_speed_upm; +}; + +struct PackagingLineState { + double seal_temp_C; int counter_count; double capper_torque_Nm; + double check_weight_g; int sn_counter, units_serialized, units_rejected; + int bundles_agg, cases_agg; bool agg_error; +}; + +struct PackagingLinePerformance { + double seal_leak_rate_pct, fill_accuracy_pct, capper_Cpk; + double label_accuracy_mm, serialization_FPY_pct; + double dmx_grade_A_pct, dmx_grade_B_pct, agg_accuracy_pct; + double OEE_pct; + bool meets_GS1, meets_FMD, meets_DSCSA; +}; + +BlisterSpec design_blister(BlisterMachineType type, int pockets, double throughput); +BottleLineSpec design_bottle_line(int target_count, double throughput_bpm); +CartonerSpec design_cartoner(double cpm, std::string size, CartonClosureType closure); +SerializationSpec design_serialization(std::string market, int bundle_size, int case_size); +PackagingLinePerformance simulate_packaging_line(const PackagingSpec& spec, PackagingLineState& state, double hours); + +double calc_dmx_grade(double contrast, double modulation, double axial_NU, double grid_NU); +bool validate_gs1(const std::string& gtin, const std::string& sn, const std::string& lot, const std::string& exp); + +} // namespace vde::pharma_equipment +``` + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Primary Types | +|-----------|--------|---------------| +| `vde::pharma_equipment` | `vde/pharma_equipment/solid_dosage.h` | `TabletSpec`, `CapsuleSpec`, `SoftgelSpec`, `GranulationSpec`, `TabletPressSpec`, `TabletCoaterSpec`, `CapsuleFillerSpec`, `PowderSpec`, `BlenderSpec`, `MillSpec`, `SieveSpec` | +| `vde::pharma_equipment` | `vde/pharma_equipment/sterile_injection.h` | `SterileFillSpec`, `LyophilizerSpec`, `VialWasherSpec`, `DepyrogenationTunnelSpec`, `StopperingSpec`, `CappingSpec`, `AutoclaveSpec`, `PFSSpec`, `IsolatorSpec`, `CleanroomSpec`, `RABS_Spec`, `HVAC_Spec` | +| `vde::pharma_equipment` | `vde/pharma_equipment/biopharma_packaging.h` | `BioreactorSpec`, `ChromatographySpec`, `TFF_Spec`, `VirusInactivationSpec`, `VirusFiltrationSpec`, `SUS_BagSpec`, `SUS_AssemblySpec`, `SUS_PumpSpec`, `PackagingSpec`, `SerializationSpec`, `BlisterSpec`, `CartonerSpec` | + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|---|---|---| +| USP <905> | Uniformity of Dosage Units | Tablet/capsule weight variation, content uniformity | +| USP <701>/<711>/<1216> | Disintegration / Dissolution / Friability | Solid dosage QC testing | +| USP <1151> | Pharmaceutical Dosage Forms — Injections | Parenteral volume, overfill | +| USP <1231> | Water for Pharmaceutical Purposes | WFI quality standards | +| USP <661>/<665>/<1665> | Plastic Packaging / Extractables | SUS material extractables & leachables | +| Ph.Eur. 2.9.5/2.9.40 | Uniformity of Dosage / Dissolution | European pharmacopoeia | +| ICH Q5A | Viral Safety of Biotechnology Products | Virus clearance validation | +| ICH Q7/Q8/Q9/Q10 | GMP / QbD / QRM / PQS | Quality system framework | +| EU GMP Annex 1 | Manufacture of Sterile Medicinal Products | Aseptic processing, isolator, RABS, cleanroom | +| EU GMP Annex 11 | Computerised Systems | Data integrity, electronic records | +| FDA 21 CFR Part 210/211 | cGMP for Finished Pharmaceuticals | GMP regulations | +| FDA 21 CFR Part 11 | Electronic Records / Signatures | Data integrity for serialization | +| ISO 14644-1 | Cleanrooms — Classification of Air Cleanliness | Particle limits per ISO class | +| ISO 14644-3 | Cleanrooms — Test Methods | HEPA leak, recovery test | +| ISO 11040-6/8 | Pre-filled Syringes | PFS component standards | +| ISO 11137 | Sterilization — Radiation | Gamma irradiation for SUS | +| ISO 13408-1 | Aseptic Processing of Health Care Products | Aseptic manufacturing | +| ISO 8317 | Child-Resistant Packaging | CR cap testing | +| ISO/IEC 15415 | Bar Code Print Quality — 2D Symbols | Data Matrix grade specification | +| GS1 General Specs | AIDC for Healthcare | GTIN, Data Matrix, serialization encoding | +| EN 1822-1 | HEPA and ULPA Filters | H14 HEPA classification | +| ATEX 2014/34/EU | Equipment for Explosive Atmospheres | Dust explosion protection | +| NFPA 652 | Standard on Combustible Dusts | Dust hazard analysis | +| EU FMD 2011/62/EU | Falsified Medicines Directive | EU serialization | +| US DSCSA | Drug Supply Chain Security Act | US traceability | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| High Shear Mixer | GEA / Glatt | UltraGran / VG | 10–1200L, torque endpoint | +| Fluid Bed Dryer | Glatt / GEA | GPCG / PRECISION | Top spray, Wurster, PAT | +| Roller Compactor | Gerteis / Alexanderwerk | Mini-Pactor / WP | Gap control, 1–100kg/h | +| Tablet Press | Fette / Korsch / IMA | 2200i / XL / Prexima | 80+ stations, force control | +| Tablet Coater | O'Hara / Glatt | LabCoat / Coater | Perforated drum, PAT | +| Capsule Filler | Bosch(Syntegon) / MG2 / IMA | GKF / Planeta / Zanasi | Dosator/tamping, 200k/h | +| Jet Mill | Hosokawa Micron | Spiral Jet Mill | D50 1–10μm | +| Vial Washer | Bausch+Ströbel | FAW | Rotary, 600vpm | +| Depyrogenation Tunnel | Bausch+Ströbel | DHT | FH monitoring, 300–350°C | +| Aseptic Filling | Bausch+Ströbel / Groninger / Optima | FVF / Fill-Finish | Peristaltic/piston, PFS | +| Lyophilizer | IMA Life / Steriline / Tofflon | 2R / FreezePro | 0.5–50m², −55 to +70°C | +| Isolator | SKAN / Steriline | ISOLATOR / IsoSteri | VHP ≥6-log reduction | +| RABS | IMA Life | oRABS/cRABS | UDAF 0.45±0.1m/s | +| Autoclave | Fedegari / Getinge | FOB/S / GSS | Prevacuum, F₀≥15min | +| Bioreactor Stainless | Sartorius / ZETA / ABEC | CIP/SIP | 50–20,000L, 316L | +| SUB Single-Use | Sartorius / Thermo Fisher | BIOSTAT STR / HyPerforma | 50–6,000L, gamma | +| WAVE Bioreactor | Cytiva | WAVE 25 | Rocker 1–500L | +| ATF Perfusion | Repligen | XCell ATF | Hollow fiber, 0.2–0.65μm | +| Protein A Resin | Cytiva | MabSelect SuRe / PrismA | DBC 30–60g/L | +| ÄKTA Chromatography | Cytiva | ÄKTA process / pilot | UV/pH/Cond, gradient | +| UF/DF TFF Cassette | Merck Millipore / Sartorius | Pellicon 3 / Sartocon | MWCO 10/30/50kDa | +| Virus Filtration | Asahi Kasei / Merck | Planova 20N / Viresolve Pro | 15–20nm parvovirus | +| Single-Use Pump | Levitronix / Quattroflow | PumpDrive / QF | MagLev 100Lpm / diaphragm | +| Aseptic Connector | Cytiva / Merck / Pall | ReadyMate / Lynx ST / Kleenpak | Peel-away / SIP | +| Blister Machine | Uhlmann / IMA / CAM | BEC / Express | Thermoform/CFF | +| Bottle Counter | Cremer | CF Series | 12–48ch optical | +| Cartoner | IMA / Körber Medipak | Horizontal | Carton+leaflet insertion | +| Serialization Vision | Cognex / Keyence | In-Sight / CV-X | Data Matrix grade A/B | +| Serialization T&T | Antares Vision / SEA Vision | Suite | EU FMD, US DSCSA agg | + +--- + +## Acceptance Criteria + +1. **Solid Dosage (必选):** Wet granulation torque endpoint ≤±5% power target; fluid bed LOD 1–3% end-point; roller compaction ribbon solid fraction 0.6–0.8; tablet weight variation ≤2.0% RSD per USP <905>; tablet friability <1% per USP <1216>; coating weight gain ±0.5% of target; capsule weight variation <2.5% RSD; softgel seam thickness 0.3–0.7mm, fill accuracy ±5%; pellet size CV <10%. + +2. **Powder Processing (必选):** Jet mill D50 within ±2μm of target; sieve efficiency >90%; blend homogeneity RSD ≤5% per FDA guidance; Lacey index M≥0.95; vacuum conveyor ATEX compliant with O₂ (conductivity ≤1.3μS/cm, TOC≤500ppb, endotoxin<0.25EU/mL); depyrogenation FH≥1365, endotoxin log reduction ≥3; fill volume accuracy ±1% of target; headspace O₂<2%; lyophilizer Pirani/CM ratio <1.1 at primary drying endpoint; F₀≥15min for overkill sterilization; SAL≤10⁻⁶; RSF 20–60N range. + +4. **Containment (必选):** VHP log reduction ≥6-log G. stearothermophilus; isolator pressure ±5Pa of setpoint; UDAF velocity 0.45±0.1m/s; HEPA H14 ≥99.995% at MPPS; Grade A particles ≤3,520/m³(≥0.5μm) and ≤20/m³(≥5.0μm) at rest; pressure cascade ΔP 10–15Pa between grades. + +5. **Biopharma (必选):** Bioreactor temperature ±0.5°C, pH ±0.05, DO ±5%; Protein A step yield >95%; HCP clearance ≥2 log, DNA clearance ≥3 log; virus inactivation ≥4 log LRV; virus filtration ≥4 log LRV; total virus clearance ≥10 log LRV per ICH Q5A; UF/DF flux recovery after CIP >90%; filter integrity bubble point ±5% of expected. + +6. **Single-Use Systems (必选):** Gamma dose 25–45kGy with SAL≤10⁻⁶ per ISO 11137; bag pressure decay <5 mbar/min at 500 mbar; tubing weld strength >80% of tube tensile; sensor drift <0.05 pH/day; pump flow within ±5% setpoint. + +7. **Packaging (必选):** Blister seal integrity zero dye ingress at 500mbar vacuum; bottle counter ±1 tablet accuracy; induction seal 100% visual uniform melt ring; capper torque Cpk>1.33; label position ±1mm; Data Matrix Grade ≥B per ISO/IEC 15415; aggregation 100% accurate parent-child linkage; serialization FPY >99.5%. + +8. **Regulatory Compliance (必选):** All USP/pharmacopoeia thresholds verifiable; EU GMP Annex 1 Grade A limits enforced; ICH Q5A viral safety LRV tracked; FDA 21 CFR Part 11 audit trail for serialization data; GS1 syntax validated; F₀/FH calculations validated against known reference data. \ No newline at end of file diff --git a/docs/feedback/VDE-1143.md b/docs/feedback/VDE-1143.md new file mode 100644 index 000000000..0ef39c65b --- /dev/null +++ b/docs/feedback/VDE-1143.md @@ -0,0 +1,2059 @@ +# VDE-1143: Medical Device Equipment Engine Requirements (医疗器械设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign MedicalDeviceEngine — diagnostic imaging (X-ray/CT/MRI/Ultrasound/Nuclear Medicine/Endoscopy), surgical systems (robots/energy/instruments), active implantable devices (pacemaker/ICD/neurostimulator/cochlear), orthopedic & cardiovascular implants +**Module**: `vde/medical_device/diagnostic_imaging.h`, `vde/medical_device/surgical_systems.h`, `vde/medical_device/implants_prosthetics.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Medical Device / Imaging / Surgery / Implants / Prosthetics + +--- + +## Background + +Medical device engineering spans diagnostic imaging modalities that visualize anatomy and physiology, surgical systems that enable minimally invasive intervention, active implantable devices that sustain life, and passive implants that restore musculoskeletal and cardiovascular function. The global medical device market exceeds $500 billion annually, with imaging and surgical robotics among the fastest-growing segments. + +Diagnostic imaging encompasses five major modalities. X-ray and computed tomography (CT) use ionizing radiation: X-ray tubes with rotating tungsten-rhenium anodes (focal spot 0.3–1.0 mm, anode heat capacity measured in MHU, kVp 40–150) generate photons detected by flat panel detectors (CsI:Tl or GOS scintillator + a-Si TFT photodiode array, pixel pitch 100–200 μm, DQE detector quantum efficiency). CT gantries achieve rotation times of 0.25–0.5 seconds with slip ring data/power transmission, detector rows ranging from 16 to 320 slices, and z-coverage from 4 to 16 cm. Image reconstruction uses filtered back projection (FBP), iterative reconstruction (IR, including model-based MBIR), and increasingly deep learning-based DLIR. Emerging photon-counting CT (CZT/CdTe direct conversion detectors) enables spectral/dual-energy imaging with energy bin discrimination and K-edge imaging. Magnetic resonance imaging (MRI) uses superconducting NbTi magnets at 1.5T or 3.0T with liquid helium zero boil-off and field homogeneity <0.5 ppm Vrms over a 30 cm DSV. Gradient coils deliver max gradient amplitude (mT/m) and slew rate (T/m/s) with eddy current compensation, while RF coils (body coil, phased array) support parallel imaging (SENSE/GRAPPA). Pulse sequences include spin echo, FSE/TSE, GRE, EPI, DWI (b-value, ADC map), BOLD fMRI, ASL perfusion, and MRA. Ultrasound imaging uses piezoelectric PZT or single-crystal PMN-PT probes (2–18 MHz, 64–256 elements) with electronic beamforming for transmit focusing, dynamic receive focusing, harmonic imaging (tissue 2nd harmonic), spatial/frequency compounding, and Doppler modes (PW/CW/color/power). Nuclear medicine includes PET (LSO/LYSO/BGO scintillator crystals + SiPM silicon photomultiplier detectors, coincidence timing 4.5–6 ns, TOF resolution 200–400 ps, attenuation correction via CT-based μ-map, SUV quantification) and SPECT (NaI(Tl) crystal + PMT, collimator LEHR/LEAP/LEUHR, Anger logic positioning, energy window photopeak ±10% at 140 keV for Tc-99m). Endoscopy spans flexible GI endoscopes (CCD tip chip, angulation control, 2.0–3.7 mm working channel, NBI narrow band imaging at 415/540 nm hemoglobin absorption), rigid laparoscopes (Hopkins rod-lens design, 5/10 mm diameter, 0°/30°/45° viewing angle, 3D stereo dual optical path, ICG near-infrared fluorescence at 807 nm excitation), and capsule endoscopy (PillCam, 2–6 fps at 433 MHz wireless, 8-hour battery). + +Surgical systems include surgical robots with serial 6-DOF arms and EndoWrist 7-DOF instruments, remote center of motion (RCM) kinematics, inverse kinematics solutions, haptic feedback via force/torque sensors, tremor filtering (Butterworth low-pass), and master-slave bilateral control. Navigation systems use optical trackers (NDI Polaris Vicra with passive/active marker spheres) and reference frame registration (paired-point matching, ICP surface registration) to transform CT/MRI coordinates to patient coordinates. Energy-based surgical devices include electrosurgical units (ESU, 400–500 kHz fundamental, cut/blend/coag/fulguration/desiccation modes, bipolar vessel sealing via LigaSure impedance feedback, return electrode contact quality monitoring REM), ultrasonic surgery (55.5 kHz Langevin transducer, amplitude 50–100 μm, tissue denaturation/coagulation at 60–100°C, vessel sealing burst pressure), and surgical lasers (Ho:YAG 2100 nm for kidney stones, CO₂ 10.6 μm for superficial cutting, diode 980/1470 nm). + +Active implantable medical devices include pacemakers (titanium can hermetically sealed by laser welding, lithium-iodine battery 2.8V 0.5–2 Ah, pacing lead with steroid-eluting tip, MICS 402–405 MHz or Bluetooth telemetry, MRI conditional), ICD defibrillators (high-voltage capacitor charge 700–800V, biphasic shock waveform, DF-4 connector), neurostimulators (DBS with extension lead and quadripolar electrode, rechargeable IPG), and cochlear implants (external speech processor with microphone+DSP, transcutaneous RF coil, implant receiver-stimulator, 22-contact electrode array for tonotopic stimulation). + +Orthopedic and cardiovascular implants include hip arthroplasty components (acetabular shell with titanium porous coating, ceramic BIOLOX delta liner or XLPE, stem Ti-6Al-4V or CoCr with HA coating, PMMA bone cement), knee replacements (femoral component CoCr, tibial baseplate Ti, insert UHMWPE), spinal pedicle screw systems (Ti alloy, polyaxial tulip head, 5.5/6.0 mm CoCr rod with contour bending), interbody cages (PEEK/Ti, lordotic angle, bone graft), coronary stents (balloon-expandable CoCr L-605/PtCr, strut thickness 60–80 μm, drug-eluting with PLA-PLGA bioabsorbable polymer), and heart valves (bioprosthetic pericardial tissue with glutaraldehyde fixation, sewing ring, leaflet coaptation). + +VDE currently lacks: +- X-ray/CT system design (tube focal spot/anode heat, detector DQE/pixel pitch, gantry rotation time, reconstruction FBP/IR/DLIR, photon counting spectral CT) +- MRI system design (magnet field homogeneity, gradient amplitude/slew rate, RF coil phased array, pulse sequences, SAR) +- Ultrasound system design (probe element count/frequency, beamforming, harmonic/Doppler/elastography modes) +- Nuclear medicine design (PET TOF timing/SUV, SPECT collimator/energy window) +- Endoscopy design (flexible CCD, rigid rod-lens, capsule wireless) +- Surgical robot kinematics (RCM, inverse kinematics, haptic feedback, tremor filtering, master-slave control) +- Surgical energy device design (ESU cut/coag, ultrasonic transducer, laser delivery) +- Active implant design (pacemaker hermeticity, ICD biphasic shock, neurostimulator programming, cochlear speech processing) +- Orthopedic/cardiovascular implant design (hip/knee wear, stent radial force, valve coaptation) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native medical device equipment engine. + +--- + +## Detailed Requirements + +### 1. X-Ray & Computed Tomography (CT) + +**Priority**: P1 + +#### 1.1 X-Ray Tube, Flat Panel Detector, CT Gantry, and Reconstruction + +``` +X-Ray Tube: + Rotating anode: tungsten-rhenium (W-Re) alloy disc, 90–200 mm diameter + Rotation speed: 3,000–10,800 rpm (high-speed anode) + Focal spot sizes: 0.3 / 0.6 / 1.0 mm (fine / broad focus, IEC 60336) + Anode angle: 7–15° (determines effective focal spot vs. field coverage) + Anode heat capacity: 0.5–8 MHU (Mega Heat Units) + HU = kVp × mA × s × 1.35 (single-phase) or × 1.4 (high-frequency) + Anode heat dissipation: 300–1,000 kHU/min (air or oil cooling) + + Heel effect: + Radiation intensity I(θ) decreases toward anode side: + I(θ) ∝ sin(θ_anode + φ) where φ = emission angle from cathode side + + Tube voltage: kVp 40–150 (diagnostic range) + Tube current: mA 10–1,000 (continuous), can reach 500–1,000 mA + Filtration: inherent (tube housing, ~0.5–2 mm Al eq.) + added (1–3 mm Al) + Total filtration per IEC 60522: ≥2.5 mm Al equivalent + + X-ray spectrum: + Bremsstrahlung continuum + characteristic lines (Kα, Kβ of W) + Half-value layer (HVL): 3–8 mm Al at 80 kVp + Beam quality indicator + +Flat Panel Detector (FPD): + Indirect conversion (CsI:Tl scintillator + a-Si TFT): + CsI:Tl needle structure → channeled light → reduced lateral spread + a-Si TFT photodiode array → charge readout + Direct conversion (a-Se photoconductor + TFT): + X-ray → electron-hole pairs directly → high spatial resolution + Used primarily in mammography + + Detector quantum efficiency (DQE): + DQE(f) = (SNR_out(f)² / SNR_in(f)²) + Measured per IEC 62220-1 + DQE(0): 60–80% for CsI FPD + DQE at Nyquist frequency: 20–40% + + Pixel pitch: 100–200 μm (general rad), 50–100 μm (mammography) + Matrix size: 2,048×2,048 to 4,288×4,288 pixels + Dynamic range: 14–16 bit (16,384–65,536 gray levels) + Fill factor: 50–80% (ratio of photosensitive area to pixel area) + Frame rate: 1–30 fps (general rad), up to 60 fps (fluoroscopy) + + Wireless portable detectors: + Battery powered, Wi-Fi data transmission + Weight: 2.5–4 kg + + Anti-scatter grid: + Grid ratio r = h/d (height/spacing): 8:1, 10:1, 12:1 + Grid frequency: 40–80 lines/cm + Bucky factor B = dose with grid / dose without grid ≈ 3–8 + Selectivity Σ = T_p / T_s (primary vs. scatter transmission) + Grid alignment: ±1° tolerance + +CT Gantry: + Rotation time: 0.25–0.5 sec/rotation (single-tube), 0.25–0.28 (dual-source) + Slip ring: transmits power + data (eliminates cable wrap) + Detector rows: 16, 64, 128, 256, 320 slice configurations + Detector element size at isocenter: 0.5–1.0 mm (transverse) × 0.5–1.0 mm (z) + z-coverage: 4–16 cm per rotation + Gantry aperture: 70–90 cm diameter + Table speed: 0.5–200 mm/s + Pitch p = table_feed_per_rotation / total_collimated_beam_width + Helical scanning: 0.5 < p < 1.5 (typical) + + Tube current modulation: + Angular (x-y): mA modulated with rotation angle (patient asymmetry) + Longitudinal (z): mA modulated with table position (attenuation changes) + Tube current range: 20–800 mA (adult), 10–500 mA (pediatric) + + Collimation: + Pre-patient (z-direction): determines beam width, dose efficiency + Post-patient: reduces scatter reaching detector + +CT Reconstruction: + Filtered Back Projection (FBP): + p(ξ, θ) → Ramp filter |ω| → Backprojection → μ(x, y) + Ram-Lak kernel: highest spatial resolution, highest noise + Soft tissue kernels (Shepp-Logan, Hamming): noise reduction + + Iterative Reconstruction (IR): + Forward project current estimate → compare to measured data → + update estimate → repeat + ASiR (GE): blend of FBP + IR, 20–100% ASiR weighting + MBIR (model-based IR, VEO/GE): full system optics modeling, + noise model, 50–80% dose reduction potential + DLIR (deep learning IR, TrueFidelity/GE): CNN-based, + trained on high-dose FBP as target + + CT number (Hounsfield Unit): + HU = 1,000 × (μ_material − μ_water) / μ_water + Air: −1000 HU (μ ≈ 0) + Water: 0 HU (reference) + Bone: +300 to +1,000+ HU + Soft tissue: +10 to +60 HU + CT number accuracy: ±5 HU for water (daily QA) + +Photon Counting CT (PCCT): + Direct conversion: CZT (CdZnTe) or CdTe semiconductor + Each photon detected individually → energy bin classification + 4–8 energy bins → spectral information in every scan + + Advantages: + No electronic noise (photon counting threshold) + Intrinsic spectral separation (no dual-source needed) + Higher spatial resolution (smaller detector pixel) + Reduced radiation dose (no Swank noise) + + K-edge imaging: material-specific differentiation + Iodine K-edge: 33.2 keV → contrast agent quantification + Gadolinium: 50.2 keV + +C-arm / CBCT (Cone Beam CT): + Flat panel on C-arm, orbital rotation 180–210° + 3D reconstruction: FDK (Feldkamp-Davis-Kress) algorithm + Volume: 15×15×15 cm to 25×25×25 cm (FOV) + Voxel size: 0.2–0.5 mm isotropic + Applications: interventional radiology, dental implant planning, + orthopedic surgery (3D intra-op) +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::medical_device { + +enum class AnodeTargetMaterial { Tungsten_Rhenium, Molybdenum, Rhodium }; +enum class DetectorType { Indirect_CsI_TFT, Indirect_GOS_TFT, Direct_aSe_TFT, PhotonCounting_CZT }; +enum class ReconstructionAlgorithm { FBP_RamLak, FBP_SoftKernel, IR_ASiR, MBIR_VEO, DLIR_CNN }; + +struct XRayTubeSpec { + AnodeTargetMaterial target; + double anode_angle_deg; // 7–15 + double focal_spot_small_mm; // 0.3 + double focal_spot_large_mm; // 1.0 + double anode_heat_capacity_MHU; // 0.5–8 + double anode_heat_dissipation_kHU_per_min; + double anode_rotation_rpm; // 3,000–10,800 + double kVp_min, kVp_max; // 40–150 + double mA_max_continuous; + double inherent_filtration_mm_Al; + double added_filtration_mm_Al; // 1–3 + double hvl_mm_Al_at_80kVp; // half-value layer +}; + +struct FlatPanelDetectorSpec { + DetectorType type; + double pixel_pitch_um; // 100–200 + int matrix_rows, matrix_cols; // up to 4288×4288 + double active_area_mm_x, active_area_mm_y; + double DQE_at_0lp_per_mm; // 0.60–0.80 + double DQE_at_nyquist; // 0.20–0.40 + int bit_depth; // 14–16 + double frame_rate_fps; // 1–60 + bool wireless_portable; + double grid_ratio; // 8:1, 10:1, 12:1 + double grid_frequency_lp_per_cm; // 40–80 +}; + +struct CT_GantrySpec { + double rotation_time_sec; // 0.25–0.50 + int detector_rows; // 16–320 + double detector_element_size_mm; // 0.5–1.0 at iso + double z_coverage_per_rotation_mm; // 40–160 + double gantry_aperture_mm; // 700–900 + double table_speed_min_mm_per_s; + double table_speed_max_mm_per_s; // 0.5–200 + double pitch_helical; // 0.5–1.5 + bool tube_current_modulation; // angular + longitudinal + ReconstructionAlgorithm recon_algorithm; +}; + +struct PhotonCountingCTSpec { + std::string detector_material; // CZT, CdTe + int energy_bins; // 4–8 + double pixel_pitch_um; // 150–250 + double energy_resolution_pct; // 5–10% at 60 keV + double count_rate_per_pixel_mm2_Mcps; + double k_edge_imaging_target_keV; +}; + +struct CT_SystemSpec { + XRayTubeSpec xray_tube; + FlatPanelDetectorSpec detector; + CT_GantrySpec gantry; + PhotonCountingCTSpec photon_counting; // if PCCT + bool is_photon_counting; + double spatial_resolution_lp_per_cm; // >15 target + double low_contrast_detectability_mm_hu; // 3mm at 0.3% typical + double ct_dose_index_CTDIvol_mGy; +}; + +struct CT_ReconState { + double ct_number_water_HU; // −5 to +5 calibration + double ct_number_uniformity_range_HU; + double spatial_resolution_measured_lp_cm; + double noise_std_dev_HU; // water phantom, ROI + double dose_actual_CTDIvol_mGy; + bool ring_artifact_detected; +}; + +struct CT_ReconPerformance { + double spatial_resolution_lp_cm; // MTF 10% cutoff + double low_contrast_resolution_mm; // smallest visible at 0.3% + double ct_number_accuracy_HU; + double uniformity_HU_range; + double image_noise_HU_std; + double dose_efficiency_relative_pct; // vs. reference protocol + bool photon_counting_K_edge_material_id; + bool meets_IEC_61223_quality_assurance; +}; + +XRayTubeSpec design_xray_tube(double kVp_max, double target_MHU, double focal_small_mm = 0.6); +FlatPanelDetectorSpec design_fpd(DetectorType type, double pixel_pitch_um, int matrix_size); +CT_GantrySpec design_ct_gantry(int detector_rows, double rotation_time_sec, double z_coverage_mm); +CT_SystemSpec design_ct_system(double tube_kVp, int detector_rows, bool photon_counting = false); +CT_ReconPerformance simulate_ct_scan(const CT_SystemSpec& spec, CT_ReconState& state, double CTDIvol_target_mGy); + +double calculate_hounsfield_unit(double mu_material, double mu_water); +double calculate_ctdi_vol(double mAs, double collimation_mm, double pitch); +double calculate_dqe(double snr_out_sq, double snr_in_sq); +double calculate_mtf_at_frequency(double aperture_mm, double focal_mm, double magnification); + +} // namespace vde::medical_device +``` + +--- + +### 2. MRI & Ultrasound + +**Priority**: P1 + +#### 2.1 MRI Magnet, Gradient, RF, Pulse Sequences, and Ultrasound Probe & Beamforming + +``` +MRI Magnet: + Superconducting: NbTi (niobium-titanium) wire in copper matrix + Field strength: 1.5T, 3.0T (clinical), 7.0T+ (research) + Operating T: ~4.2 K (liquid helium bath) + Helium consumption: zero boil-off (closed-cycle cryocooler) + Re-condensing: 0–2 L/day He boil-off → re-liquefied + + Field homogeneity: + <0.5 ppm Vrms over 30 cm DSV (diameter spherical volume) + Measured by field mapping (B₀ mapping, phase difference method) + Shimming: + Passive: iron shims placed in magnet bore + Active: shim coils (up to 3rd order spherical harmonics) + + Fringe field (5 Gauss line): + 1.5T: ~2.5 m radial, ~4 m axial + 3.0T: ~3.5 m radial, ~5.5 m axial + Safety: controlled access zone per ACR/FDA + +Gradient Coils: + Three orthogonal sets: Gx, Gy, Gz (X/Y/Z) + Maximum gradient amplitude [mT/m]: + 1.5T: 33–45 mT/m; 3.0T: 40–100 mT/m + + Slew rate [T/m/s]: + Typical: 100–200 T/m/s + Slew rate limited by: dB/dt → peripheral nerve stimulation (PNS) + dB/dt safety limit: <60 T/s (FDA), <20 T/s in some modes + + Gradient rise time: + t_rise = G_max / SR (gradient/slew rate) [μs] + Typical: 100–300 μs + + Eddy current compensation: + Pre-emphasis: overdrive gradient current to cancel eddy currents + Shielded gradients: active shield reduces eddy in cryostat + + Gradient duty cycle: percentage of time gradients active at maximum + Typical: 30–70% (depends on cooling capability) + +RF (Radiofrequency) System: + Transmit: body coil (quadrature birdcage), power 15–35 kW peak + Receive: multi-channel phased array (4–128 channels) + Surface coils: higher SNR near coil (small FOV) + Volume coils: uniform sensitivity over region + + Parallel imaging: + SENSE (Sensitivity Encoding): + Aliased pixels unfolded using coil sensitivity maps + Reduction factor R = 2–8 + SNR_SENSE = SNR_full / (g × √R) + g = geometry factor (g≥1, depends on coil geometry) + + GRAPPA (GeneRalized Autocalibrating Partial Parallel Acquisition): + Missing k-space lines synthesized from calibration data + Kernel-based interpolation in k-space + + Specific Absorption Rate (SAR): + SAR [W/kg] = σ × E² / (2ρ) + Where: σ = tissue conductivity [S/m], E = E-field [V/m], ρ = density [kg/m³] + Whole-body SAR: <2.0 W/kg (normal), <4.0 W/kg (1st level controlled) + Head SAR: <3.2 W/kg + Local SAR (per 10g tissue): more restrictive for implants, tattoos + + B₁⁺ mapping: transmit field uniformity + B₁⁻ mapping: receive field sensitivity (used for quantitative MRI) + +Pulse Sequences: + Spin Echo (SE): + 90° - TE/2 - 180° - TE/2 - acquisition (echo at TE) + TR (repetition time): 400–600 ms (T1-w), 2,000–6,000 ms (T2/PD-w) + TE (echo time): 10–30 ms (T1-w), 80–120 ms (T2-w) + Signal: S = ρ × (1−exp(−TR/T1)) × exp(−TE/T2) + T1-weighted: short TR, short TE + T2-weighted: long TR, long TE + Proton density: long TR, short TE + + FSE/TSE (Fast/Turbo Spin Echo): + Multiple 180° refocusing pulses per TR + Echo train length (ETL): 4–32 + Scan time reduction: TR × NEX × NPE / ETL + + GRE (Gradient Echo): + Spoiled GRE (FLASH, SPGR): coherent transverse signal destroyed + T1-weighted, used for 3D volumetric imaging + Balanced SSFP (TrueFISP, FIESTA, b-FFE): + Refocused gradients → high signal from T2/T1 ratio + Cardiac cine imaging (bright blood) + + EPI (Echo Planar Imaging): + Single-shot or multi-shot, rapid acquisition + Used in: DWI, BOLD fMRI, perfusion, DTI + Susceptibility artifacts: geometric distortion near air/tissue + interfaces (corrected by B₀ field map + reversed gradient) + + Diffusion Weighted Imaging (DWI): + b-value [s/mm²]: b = γ² × G² × δ² × (Δ − δ/3) + Where: γ = gyromagnetic ratio, G = diffusion gradient amplitude, + δ = gradient duration, Δ = diffusion time + Typical: b = 0, 500, 1,000 s/mm² (brain), b = 0, 50, 500 (body) + ADC (Apparent Diffusion Coefficient): + ADC = −ln(S_b / S₀) / b [mm²/s] + Tissue with restricted diffusion (stroke, tumor): low ADC + Free water: high ADC (~3.0×10⁻³ mm²/s) + + BOLD fMRI: + T2*-weighted EPI, BOLD contrast from deoxyhemoglobin + TR: 2–3 sec, TE: 25–35 ms at 3T + +Acoustic Noise: + Gradient switching → Lorentz forces on conductors → vibration + Sound pressure level: up to 125 dBA (peak) without hearing protection + Reduced by: acoustic insulation, soft gradient switching (whisper mode) + Limit: <99 dBA (IEC 60601-2-33 recommendation) + +Ultrasound: + Transducer (probe) types: + Linear array: high frequency (7–18 MHz), superficial (vascular, MSK) + Curved (convex) array: 2–5 MHz, abdominal, obstetric + Phased array: 2–4 MHz, cardiac (small footprint, sector scan) + Matrix array: 1.5D/2D, volumetric (4D) imaging + + Piezoelectric materials: + PZT (lead zirconate titanate): standard, coupling kₜ ≈ 0.5 + Single crystal PMN-PT: higher kₜ ≈ 0.9, broader bandwidth >130% + CMUT (capacitive micromachined ultrasonic transducer): + Silicon MEMS, wide bandwidth, IC integration potential + + Element count: 64–256 (1D), 64×64 for matrix + Element pitch: λ/2 to λ (to avoid grating lobes) + λ = c / f [c ≈ 1,540 m/s in soft tissue] + At 5 MHz: λ ≈ 0.31 mm → pitch ≈ 0.15–0.3 mm + + Bandwidth: fractional bandwidth (BW/ f_center) + PZT: 60–80%, Single crystal: 90–130% + Harmonic imaging requires >80% bandwidth + +Beamforming: + Transmit beamforming: + Focused beam to depth of interest: + Delay for element n at position x_n: + τ_n = (√(x_n² + z_f²) − z_f) / c + Dynamic aperture: fewer elements for shallow, more for deep + + Receive beamforming: + Dynamic focusing: focal point tracks returning echo depth + Aperture growth with depth: F-number F/z ≈ constant + F-number = focus_depth / aperture_size + Typical: F/1 to F/2 + + Harmonic imaging: + Tissue harmonic imaging (THI): + Transmit at f₀, receive at 2f₀ (2nd harmonic) + Nonlinear propagation in tissue generates harmonics + Advantages: reduced clutter, improved lateral resolution, + reduced near-field artifacts + + Compounding: + Spatial compounding: multiple scan angles averaged → speckle reduction + Frequency compounding: split spectrum → reduced speckle + +Doppler: + PW (Pulsed Wave) Doppler: range-gated, limited by Nyquist limit + v_max = c × PRF / (4 × f₀ × cosθ) + Aliasing if v > v_max (correct: baseline shift, lower f₀, higher PRF) + + CW (Continuous Wave) Doppler: no range discrimination, no aliasing limit + Used for high-velocity flow (valve stenosis) + + Color Doppler: color-encoded mean velocity, overlaid on B-mode + Power Doppler: color-encoded Doppler signal energy + Angle-independent, more sensitive to slow flow, no aliasing + +Elastography: + Strain elastography: manual compression → tissue displacement → strain map + Shear wave elastography (SWE): + ARFI (acoustic radiation force impulse) generates shear waves + Shear wave speed c_s [m/s]: + c_s = √(μ/ρ) = √(E/(3ρ)) + Where: μ = shear modulus [kPa], ρ = density, E = Young's modulus + Stiffer tissue → higher shear wave speed + Measured: kPa or m/s + Liver fibrosis staging: F0 (<7 kPa) to F4 (>14 kPa) +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::medical_device { + +enum class MRIFieldStrength { T_1p5, T_3p0, T_7p0 }; +enum class MRISequenceType { SE, FSE_TSE, GRE_FLASH, Balanced_SSFP, EPI, DWI, BOLD }; +enum class CoilType { Body_Birdcage, PhasedArray_Surface, Head_Volume, TxRx_Knee }; +enum class UltrasoundProbeType { Linear, Curved_Convex, PhasedArray_Cardiac, Matrix_4D }; +enum class DopplerMode { PW, CW, Color, Power }; +enum class ElastographyMode { Strain, ShearWave_SWE, ARFI }; + +struct MRIMagnetSpec { + MRIFieldStrength field_strength; // Tesla + double field_homogeneity_ppm_vrms; // <0.5 ppm, 30cm DSV + double fringe_field_5gauss_radial_m; + double fringe_field_5gauss_axial_m; + double helium_boiloff_L_per_day; // zero boil-off target + double bore_diameter_mm; // 600–700 + bool active_shielding; +}; + +struct MRIGradientSpec { + double max_amplitude_mT_per_m; // 33–100 + double max_slew_rate_T_per_m_per_s; // 100–200 + double rise_time_us; + bool eddy_current_compensated; + bool shielded_gradient_coil; + double max_duty_cycle_pct; +}; + +struct MRIRFCoilSpec { + int num_rx_channels; // 4–128 + CoilType type; + double coil_load_Q_ratio; + double acceleration_factor_R; // SENSE/GRAPPA, 2–8 + double geometry_factor_g_mean; // g≥1 +}; + +struct MRIPulseSequence { + MRISequenceType type; + double TR_ms; // repetition time + double TE_ms; // echo time + double flip_angle_deg; // 1–180 + int echo_train_length; // FSE/TSE: 4–32 + double b_value_s_per_mm2; // DWI: 0–3000 + int diffusion_directions; // DTI: 6–256 + double pixel_bandwidth_Hz; + int matrix_size; + double FOV_mm; + double slice_thickness_mm; + double scan_time_sec; + double SAR_W_per_kg; + double acoustic_noise_dBA; +}; + +struct MRISystemSpec { + MRIMagnetSpec magnet; + MRIGradientSpec gradient; + MRIRFCoilSpec rf_coil; + std::vector sequences; + double SNR_target; // >100 head coil + double spatial_resolution_isotropic_mm; +}; + +struct UltrasoundProbeSpec { + UltrasoundProbeType type; + double center_frequency_MHz; // 2–18 + double fractional_bandwidth_pct; // 60–130% + int num_elements; + double element_pitch_mm; + double aperture_length_mm; + double elevational_focus_mm; + double f_number; // focal/aperture + bool single_crystal_pmnt; // PMN-PT + bool cmut_technology; + bool harmonic_imaging_enabled; + bool spatial_compounding; + DopplerMode doppler_modes; + ElastographyMode elastography_mode; +}; + +struct UltrasoundBeamformingSpec { + double transmit_frequency_MHz; + double receive_frequency_MHz; // harmonic: 2× f₀ + double dynamic_focus_range_mm; + double apodization_window; // Hamming, Hanning, etc. + double grating_lobe_suppression_dB; + double doppler_prf_Hz; + double doppler_wall_filter_Hz_t; + double shear_wave_tracking_fps; +}; + +struct UltrasoundSystemSpec { + UltrasoundProbeSpec probe; + UltrasoundBeamformingSpec beamforming; + double depth_range_mm; + double frame_rate_fps; // 20–80 + double display_dynamic_range_dB; // 60–120 + double elastography_youngs_modulus_range_kPa; +}; + +struct MedicalImagingPerformance { + // MRI + double mri_snr_head_coil; + double mri_b0_homogeneity_ppm; + double mri_spatial_resolution_mm; + double mri_sar_W_per_kg; + double mri_acoustic_noise_dBA; + + // Ultrasound + double us_axial_resolution_mm; + double us_lateral_resolution_mm; + double us_penetration_depth_mm; + double us_doppler_velocity_max_m_per_s; + double us_shear_wave_speed_accuracy_pct; + + // CT (see section 1) + bool mri_meets_iec_60601_2_33; + bool us_meets_iec_60601_2_37; +}; + +MRISystemSpec design_mri_system(MRIFieldStrength field, int num_rx_channels, double target_snr = 100.0); +MRIPulseSequence design_mri_sequence(MRISequenceType type, double FOV_mm, double resolution_mm, double target_contrast); +UltrasoundSystemSpec design_ultrasound_system(UltrasoundProbeType probe_type, double freq_MHz, int elements); +MedicalImagingPerformance simulate_medical_imaging(const MRISystemSpec& mri, const CT_SystemSpec& ct, const UltrasoundSystemSpec& us); + +double calculate_sar(double sigma_tissue, double Efield_Vpm, double density); +double calculate_b_value(double G_mTpm, double delta_ms, double Delta_ms); +double calculate_doppler_shift(double f0_MHz, double v_cmps, double theta_deg, double c_mps = 1540.0); +double calculate_shear_wave_youngs_modulus(double cs_mps, double density_kgpm3 = 1000.0); + +} // namespace vde::medical_device +``` + +--- + +### 3. Nuclear Medicine (PET/SPECT) & Endoscopy + +**Priority**: P1 + +#### 3.1 PET Detector Ring, SPECT Gamma Camera, Endoscope + +``` +PET (Positron Emission Tomography): + Detection principle: + Positron-emitting radionuclide (e.g., F-18 FDG, t₁/₂=110 min) + emits β⁺ → annihilates with electron → two 511 keV γ-rays + emitted back-to-back (180°±0.25°) + + Detector ring: + Scintillator crystals: LSO (Lu₂SiO₅:Ce), LYSO, BGO + LSO: fast decay 40ns, light yield 30,000 photons/MeV + BGO: slower 300ns, higher stopping power for 511 keV + Crystal pixel size: 2–4 mm transaxial × 10–20 mm depth + Ring diameter: 70–90 cm + Axial FOV: 15–30 cm + + SiPM (Silicon Photomultiplier): + Replaces PMT: compact, MRI-compatible, higher PDE + Photon Detection Efficiency (PDE): 30–50% + Dark count: 50–500 kHz/mm² + Enables TOF-PET and PET/MRI integration + + TOF (Time-of-Flight) PET: + Measures time difference between 511 keV photon arrivals: + Δx = c × Δt / 2 + CRT (Coincidence Resolving Time): 200–400 ps → Δx ≈ 3–6 cm + SNR gain: SNR_TOF = SNR_nonTOF × √(D / (c × CRT)) + D = object diameter + TOF reconstruction: list-mode iterative with TOF kernel + + Coincidence timing window: 4.5–6 ns + Scatter fraction: 30–40% (3D mode), 15–25% (2D with septa) + Random correction: delayed coincidence window method + Attenuation correction: CT-based μ-map (511 keV → linear scaling) + Normalization: component-based (detector efficiency, geometry) + Dead time correction: paralyzable/non-paralyzable models + + SUV (Standardized Uptake Value): + SUV = (tissue_activity_Bq_per_mL × body_weight_g) / injected_dose_Bq + SUV_max, SUV_peak, SUV_mean + Normalization: body weight, lean body mass, body surface area + + NEMA NU 2 performance: + Spatial resolution: <4 mm FWHM at 1 cm from center + Sensitivity: 5–15 cps/kBq (3D) + NECR (Noise Equivalent Count Rate): peak at ~20–30 kBq/mL + Scatter fraction: measure + report + +SPECT (Single Photon Emission Computed Tomography): + NaI(Tl) crystal: thickness 3/8"–5/8" (9.5–15.9 mm) + PMT array: 55–99 tubes, Anger logic positioning + Collimator types: + LEHR (Low-Energy High-Resolution): Tc-99m (140 keV), 1.5 mm holes + LEAP (Low-Energy All-Purpose): bigger holes, higher sensitivity + LEUHR (Low-Energy Ultra-High-Resolution): for brain SPECT + MEGP (Medium-Energy General-Purpose): I-131 (364 keV) + Fan-beam / cone-beam: magnification, better sensitivity + Pinhole: thyroid, small organ + + Energy window: + Photopeak ±10% (140 keV ±14 keV for Tc-99m) + Scatter window: lower energy (120–126 keV) + Triple-energy window (TEW) scatter correction + + Detector rotation: + Step-and-shoot: stop at each angle, acquire + Continuous: acquisition during rotation + Angular sampling: 3°/step, 180° or 360° orbit (cardiac: 180°) + + Reconstruction: + FBP with ramp + Butterworth/Hanning filter + OSEM (Ordered Subsets Expectation Maximization): + Subsets: 4–10, Iterations: 2–8 + Attenuation correction: CT-based μ-map (if SPECT/CT) + Scatter correction: TEW, dual-energy window, Monte Carlo + +Endoscopy — Flexible GI Endoscope: + Optical system: + Light source: xenon or LED, transmitted via fiber bundle + Objective lens at distal tip: wide-angle, ≥140° FOV + CCD or CMOS sensor at distal tip (chip-on-tip) + Resolution: 400–2,000 k pixels + + Angulation control: + Up/Down: 180°/180° (gastroscope), 210°/90° (colonoscope) + Left/Right: 100°/100° + Control knobs with friction brakes + + Working channel (biopsy channel): + Diameter: 2.0, 2.8, 3.2, 3.7, 4.2 mm + Accessories: biopsy forceps, snare, injection needle, + clip, basket, balloon + Suction capability through working channel + + Water/Air nozzle: + Lens washing: water jet to clean objective + Insufflation: CO₂ (preferred) or air for lumen distension + + NBI (Narrow Band Imaging): + Optical filter selects 415 nm (blue) and 540 nm (green) + 415 nm: superficial capillaries (hemoglobin absorption peak) + 540 nm: deeper submucosal vessels + Enhances mucosal surface pattern and vascular structures + Useful for: early cancer detection (Barrett's esophagus, gastric, colonic) + + Scope diameters: 5–13 mm (ultraslim to therapeutic) + Working length: 600–1,680 mm + +Endoscopy — Rigid Laparoscope: + Hopkins rod-lens design: + Alternating glass rods + air spaces + Higher light transmission vs. conventional lens train + Resolution: 10–20 lp/mm + + Diameters: 2.7, 5, 10 mm + Viewing angle: 0° (forward), 30°, 45° (angled) + Length: 20–50 cm + + 3D stereo laparoscope: + Dual optical paths (left/right) on single shaft + Two CCD/CMOS sensors at proximal end + Stereo disparity → depth perception + + ICG (Indocyanine Green) NIR fluorescence: + Excitation: 807 nm (NIR laser/LED) + Emission: 830 nm, detected by NIR-sensitive sensor + ICG injected IV, binds to plasma proteins + Applications: perfusion assessment (anastomosis, flap), + lymph node mapping, bile duct identification + +Endoscopy — Capsule Endoscopy: + PillCam (Given Imaging / Medtronic): + Size: ~11×26 mm, weight ~5 g + Camera: 2–6 fps (adaptive frame rate) + Field of view: 156–172° + Illumination: 4–6 white LEDs + Wireless: 433 MHz, data transmitted to recorder belt + Battery life: 8–12 hours (enough for GI transit) + Images captured: ~50,000–60,000 per study + + Capsule localization: + RF signal strength (recorder array on abdomen) + Approximate: ±2–3 cm accuracy + + Applications: + Small bowel: obscure GI bleeding, Crohn's, tumors + Colon: PillCam COLON (dual-camera, wider angle) + Esophagus: PillCam ESO (double-ended camera) +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::medical_device { + +enum class ScintillatorCrystal { LSO, LYSO, BGO, NaI_Tl, GSO }; +enum class PET_DetectorTech { PMT_based, SiPM_Digital, SiPM_Analog }; +enum class SPECT_CollimatorType { LEHR, LEAP, LEUHR, MEGP, FanBeam, Pinhole }; +enum class EndoscopeType { Flexible_GI, Rigid_Laparoscope, Capsule_SmallBowel, Capsule_Colon }; +enum class NarrowBandFilter { NBI_415_540nm, FICE_Estimated, BLI_Laser, iScan }; + +struct PET_DetectorSpec { + ScintillatorCrystal crystal_material; + double crystal_pixel_size_mm; // 2–4 + double crystal_depth_mm; // 10–20 + PET_DetectorTech detector_tech; + double sipm_pde_pct; // 30–50 (if SiPM) + double ring_diameter_mm; // 700–900 + double axial_fov_mm; // 150–300 + double coincidence_window_ns; // 4.5–6 + double tof_timing_resolution_ps; // 200–400 + int number_of_detector_rings; + int detectors_per_ring; +}; + +struct PET_SystemSpec { + PET_DetectorSpec detector; + double spatial_resolution_fwhm_1cm_mm; // <4 + double sensitivity_cps_per_kBq; // 5–15 (3D) + double necr_peak_kcps; // at ~25 kBq/mL + double scatter_fraction_pct; + bool tof_enabled; + bool ct_attenuation_correction; + double ct_voltage_kVp; // 80–140 for mu-map +}; + +struct SPECT_DetectorSpec { + double crystal_thickness_inch; // 3/8, 1/2, 5/8 + int num_pmts; // 55–99 + SPECT_CollimatorType collimator; + double collimator_hole_diameter_mm; + double collimator_septal_thickness_mm; + double collimator_hole_length_mm; + double system_sensitivity_cps_per_MBq; + double system_resolution_fwhm_10cm_mm; +}; + +struct SPECT_SystemSpec { + SPECT_DetectorSpec detector; + int num_heads; // 1, 2, 3 + double energy_window_photopeak_pct; // ±10% for Tc-99m + double energy_window_scatter_keV; + double angular_step_deg; // 3° + double arc_deg; // 180 or 360 + bool ct_attenuation_correction; + std::string reconstruction; // FBP, OSEM + int osem_subsets, osem_iterations; +}; + +struct EndoscopeSpec { + EndoscopeType type; + double tip_diameter_mm; // 2.7–13 + double working_length_mm; // 600–1680 + double working_channel_diameter_mm; // 2.0–4.2 + double field_of_view_deg; // 140–172 + int image_pixels_k; + bool chip_on_tip; + double angulation_up_deg,angulation_down_deg; + double angulation_left_deg,angulation_right_deg; + + // Flexible endoscope + bool nbi_filter_available; + + // Rigid laparoscope + double viewing_angle_deg; // 0, 30, 45 + bool stereo_3d; + bool icg_nir_fluorescence; // 807 nm excitation + double icg_excitation_nm; + double icg_emission_nm; + + // Capsule + double capsule_fps; + double capsule_battery_hours; + double capsule_diameter_mm, capsule_length_mm; + double wireless_frequency_MHz; // 433 +}; + +struct NuclearMedicineSystemSpec { + PET_SystemSpec pet; + SPECT_SystemSpec spect; + bool is_pet_ct; // hybrid PET/CT + bool is_spect_ct; // hybrid SPECT/CT + bool is_pet_mr; // hybrid PET/MRI +}; + +struct EndoscopyPerformance { + double optical_resolution_lp_per_mm; + double image_quality_mtf_at_50; + double working_channel_pass_rate; + double capsule_image_quality_score; + double nbi_vascular_enhancement_ratio; // vessel-to-background ratio + bool icg_detection_threshold_nM; + double capsule_complete_exam_rate_pct; +}; + +PET_SystemSpec design_pet_system(int rings, double axial_fov_mm, bool tof = true, bool sipm = true); +SPECT_SystemSpec design_spect_system(int num_heads, SPECT_CollimatorType collimator, double crystal_inch = 0.375); +EndoscopeSpec design_endoscope(EndoscopeType type, double channel_mm, int pixels_k); +EndoscopyPerformance simulate_endoscopy(const EndoscopeSpec& spec); + +double calculate_suv(double tissue_activity_BqpmL, double body_weight_g, double injected_dose_Bq); +double calculate_pet_nerc(double true_rate, double scatter_rate, double random_rate); +double calculate_nbi_vessel_contrast(double mucosal_reflectance_415nm, double mucosal_reflectance_540nm, double background); + +} // namespace vde::medical_device +``` + +--- + +### 4. Surgical Robots & Energy Devices + +**Priority**: P1 + +#### 4.1 Surgical Robot Kinematics, Navigation, and Energy-Based Surgery + +``` +Surgical Robot Kinematics: + Serial 6-DOF arm: + DH parameters: θᵢ, dᵢ, aᵢ, αᵢ for each joint i=1..6 + Forward kinematics: T₀₆ = T₀₁ × T₁₂ × ... × T₅₆ + Position (x,y,z) + orientation (roll,pitch,yaw) + + EndoWrist (7-DOF for da Vinci): + Adds wrist DOF (pitch, yaw, roll) for instrument tip + Total 7 DOF including instrument shaft rotation + + Remote Center of Motion (RCM): + Constraint: instrument shaft passes through fixed point (trocar) + Reduces DOF from 6 to 4 (3 position of tip cannot be + independently set; constraint links tip to trocar point) + RCM error: <1 mm deviation from trocar center + + Inverse kinematics: + Given tip position p_desired and RCM constraint p_rcm: + θ_joint = IK(p_desired, p_rcm, tool_offset) + Analytical solution for common architectures + Numerical: Jacobian pseudo-inverse + null space optimization + + Jacobian J: ẋ = J(θ) × θ̇ + J⁺ = J^T × (J × J^T)^(−1) (Moore-Penrose pseudoinverse) + Null-space motion: θ̇_null = (I − J⁺×J) × θ̇₀ + → moves joints without moving tip (posture optimization) + + Haptic Feedback: + Force/torque sensor at instrument tip (strain gauge, 6-axis) + Force resolution: 0.01–0.1 N + Force range: 0–10 N (typical tissue interaction) + Bilateral control: + Master: F_master = K_f × (F_slave − F_environment) + Slave: x_slave_desired = K_p × (x_master − x_slave) + Transparency: Z_width = f_max × v_max (impedance range) + + Tremor Filtering: + Voluntary motion: 0–2 Hz + Physiological tremor: 6–12 Hz (peak at ~8 Hz) + Butterworth low-pass filter: + Cutoff frequency: 3–5 Hz + Order: 4th–6th order + H(s) = 1 / Π(1 + s²/(ω_c²) + √2×s/ω_c) for 4th order + Alternative: Savitzky-Golay smoothing, Kalman filter + + Master-slave control: + Position-position (symmetric): both sides track error + Position-force: master detects force, slave tracks position + 4-channel bilateral: both position and force both ways + +Navigation: + Optical tracker (NDI Polaris Vicra/Spectra): + Passive retroreflective marker spheres (11.5 mm Ø) + Active markers: infrared LEDs + Tracking volume: ~1–2 m³ + Accuracy: 0.25 mm RMS (volumetric) + Update rate: 20–60 Hz + + Reference frame registration: + Paired-point matching (fiducial): + Register CT/MRI coordinates {p_i_CT} to patient coordinates {p_i_patient} + Transform T = argmin_T Σ||T(p_i_CT) − p_i_patient||² + SVD-based solution (Arun's method) + FRE (Fiducial Registration Error): <1.0 mm + + Surface matching (ICP): + Digitize patient surface → match to segmented CT/MRI surface + Initial alignment + ICP iteration + TRE (Target Registration Error): 1.5–3.0 mm typical + + Coordinate transform chain: + T_patient_to_image = T_tracker_to_patient⁻¹ × + T_tracker_to_ref × T_ref_to_image + Navigation: real-time instrument position in image coordinates + +Electrosurgery (ESU): + Fundamental frequency: 400–500 kHz (above neuromuscular stimulation) + Waveforms: + Cut (pure sine): low duty cycle → vaporization, minimal hemostasis + Blend (modulated): on/off ratio → cutting + coagulation + Coag (fulguration): high voltage, low duty cycle → sparking, + surface desiccation + Desiccation (contact): low voltage, continuous → deep dehydration + + Power: 1–300 W (depending on mode and tissue) + Output impedance matching: auto-adaptive to tissue impedance + + Bipolar vessel sealing (LigaSure): + Tissue grasped between bipolar jaws + Impedance feedback: continuous monitoring during RF delivery + Tissue response: collagen + elastin denaturation → vessel wall fusion + Endpoint: impedance reaches threshold → auto-stop energy + Burst pressure of sealed vessel: >360 mmHg (3× systolic) + + REM (Return Electrode Monitoring): + Contact quality monitoring at patient return electrode + Split pad: two conductive areas, compare impedance + Alarm if contact inadequate → risk of alternate-site burn + +Ultrasonic Surgery: + Langevin transducer (55.5 kHz fundamental): + Piezoelectric stack (PZT rings) → bolt-clamped + Amplitude transformation: horn (booster + blade) + Tip displacement amplitude: 50–100 μm pk-pk + + Tissue effect: + Mechanical vibration → friction → heat → protein denaturation + Temperature range: 60–100°C (low vs. ESU 200–400°C) + Vessel sealing: ≤5 mm diameter vessels + Burst pressure: >200 mmHg for sealed vessels + + Transducer efficiency: + η = P_acoustic / P_electrical + Typical: 85–95% + +Surgical Lasers: + Ho:YAG (Holmium:YAG): 2100 nm + High water absorption → shallow penetration + Kidney stone fragmentation (photothermal → vapor bubble collapse) + Pulse energy: 0.2–6 J, pulse width: 150–800 μs + Repetition rate: 5–80 Hz + Retropulsion: stone movement away from fiber tip + Reduced by: long pulse mode (Moses technology) + + CO₂ laser: 10.6 μm + Extremely high water absorption, superficial cutting + Depth: 20–50 μm per pass + Continuous or pulsed + + Diode laser: 980/1470 nm + Moderate water absorption, good hemostasis + Fiber delivery: flexible, contact/non-contact +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::medical_device { + +enum class RobotKinematicType { Serial6DOF, EndoWrist7DOF, RCM_Constrained }; +enum class TrackerType { NDI_Polaris_Optical, EM_Electromagnetic, FiberOptic_Shape }; +enum class ESU_Mode { Cut_Pure, Blend, Coag_Fulguration, Desiccation, Bipolar_Seal }; +enum class LaserType { HoYAG_2100nm, CO2_10600nm, Diode_980nm, Diode_1470nm }; + +struct SurgicalRobotSpec { + RobotKinematicType type; + int num_dof; // 6, 7 + double link_lengths_mm[6]; + double joint_limits_deg_min[6]; + double joint_limits_deg_max[6]; + double rcm_error_max_mm; // <1 + double positioning_accuracy_rms_mm; // <1 + bool haptic_feedback; + double force_sensor_resolution_N; + double force_sensor_range_N; + double tremor_filter_cutoff_Hz; // 3–5 + int tremor_filter_order; // 4–6 + std::string control_mode; // position-position, position-force, 4ch bilateral +}; + +struct NavigationTrackerSpec { + TrackerType type; + double tracking_volume_m3; + double volumetric_accuracy_rms_mm; // 0.25 optical + double update_rate_Hz; // 20–60 + double marker_sphere_diameter_mm; // 11.5 passive + int max_tracked_tools; +}; + +struct RegistrationSpec { + std::string method; // paired-point, ICP surface + double target_registration_error_TRE_mm; // <1–3 + double fiducial_registration_error_FRE_mm; // <1 + std::string coordinate_transform; +}; + +struct SurgicalNavigationSpec { + NavigationTrackerSpec tracker; + RegistrationSpec registration; + SurgicalRobotSpec robot; + double navigation_accuracy_overall_mm; // <2 + bool real_time_instrument_display; +}; + +struct ESU_Spec { + double fundamental_frequency_kHz; // 400–500 + double max_power_W; // 1–300 + ESU_Mode supported_modes; + double cut_crest_factor; // ~1.4 pure cut + double coag_crest_factor; // 5–10 fulguration + bool bipolar_vessel_sealing; + double vessel_seal_burst_pressure_mmHg; // >360 + bool impedance_feedback_control; + bool rem_return_electrode_monitoring; + double rem_impedance_threshold_ohm; // alarm threshold +}; + +struct UltrasonicSurgerySpec { + double transducer_frequency_kHz; // 55.5 + double tip_amplitude_um; // 50–100 + double max_power_W; + double vessel_seal_diameter_max_mm; // 5 + double vessel_burst_pressure_mmHg; // >200 + double transducer_efficiency_pct; // 85–95 + bool adaptive_tissue_control; +}; + +struct LaserSurgerySpec { + LaserType type; + double wavelength_nm; + double max_power_W; + double pulse_energy_J; // Ho:YAG: 0.2–6 + double pulse_width_us; // 150–800 + double repetition_rate_Hz; // 5–80 + double fiber_core_diameter_um; // 200–550 + double tissue_penetration_depth_mm; // water absorption based +}; + +struct SurgicalRobotState { + double joint_angles_deg[6]; + double tool_tip_position_mm[3]; + double tool_tip_orientation_deg[3]; + double rcm_error_mm; + double force_sensor_reading_N[6]; + bool haptic_feedback_active; +}; + +struct SurgicalEnergyState { + double esu_power_actual_W; + double esu_impedance_actual_ohm; + double tissue_temperature_C; + double ultrasonic_amplitude_actual_um; + double laser_pulse_counter; +}; + +struct SurgicalSystemPerformance { + double robot_positioning_error_rms_mm; + double robot_rcm_error_mean_mm; + double navigation_tre_mm; + double esu_cut_quality_score; // tissue effect consistency + double vessel_seal_burst_pressure_mmHg; + double ultrasonic_transducer_efficiency_pct; + double laser_stone_fragmentation_rate_mm3_per_J; + bool meets_iec_60601_2_2; // HF surgical + bool meets_iec_60601_2_18; // endoscopic +}; + +SurgicalRobotSpec design_surgical_robot(RobotKinematicType type, double link_lengths[], int num_dof = 6); +SurgicalNavigationSpec design_surgical_navigation(TrackerType tracker, std::string reg_method); +ESU_Spec design_esu(double max_power_W, bool bipolar_sealing = true); +SurgicalSystemPerformance simulate_surgical_procedure(const SurgicalNavigationSpec& nav, const ESU_Spec& esu, const UltrasonicSurgerySpec& us, SurgicalRobotState& state); + +std::vector solve_inverse_kinematics_rcm(const double target[3], const double rcm[3], const double link_lengths[], int dof); +std::vector apply_tremor_filter(const std::vector& input_signal, double cutoff_Hz, double sample_rate_Hz, int order = 4); +double calculate_vessel_burst_pressure(double seal_energy_J, double tissue_thickness_mm, double collagen_content_pct); + +} // namespace vde::medical_device +``` + +--- + +### 5. Surgical Instruments & Implant Verification + +**Priority**: P1 + +#### 5.1 Sterilization, Instrument Design, Implant Scanning & Additive Manufacturing + +``` +Instrument Sterilization & Reprocessing: + Steam 134°C prevacuum: 18 min exposure (wrapped), 3 min unwrapped + EtO (Ethylene Oxide): 37–63°C, 2–6 h, aeration 8–48 h + Residual EtO limit: <4 mg (ISO 10993-7) + H₂O₂ plasma (STERRAD): 45–72 min cycle, ≤50°C + Gamma 25 kGy: recommended for single-use devices + + Washer-Disinfector (WD): + Cleaning: enzymatic detergent, 40–60°C, spray arms + Thermal disinfection: A₀ value + A₀ = Σ(Δt × 10^((T − 80) / 10)) + Min A₀ = 60 (non-critical), 600 (semi-critical), 3,000 (critical) + + Instrument inspection: + Visual under magnification (2.5–10×) + Function test: articulation, cutting edge sharpness, ratchet + Cleanliness test: protein residue (OPA test), ATP bioluminescence + +Implant Scanning & Design: + CT segmentation: + Threshold: bone >200 HU, soft tissue −100 to +100 HU + Region growing + morphological operations + 3D surface reconstruction: Marching Cubes algorithm + Isosurface at threshold value + + STL mesh processing: + Smoothing: Laplacian or Taubin smoothing + Decimation: reduce triangle count (target: 50k–500k triangles) + Hole filling: connect boundary edges + Mesh refinement: subdivision if needed + + Implant design from CT: + Hip cup: hemisphere diameter match to acetabular reamer size + Stem: canal fill ratio (proximal 80–90%, distal 70–90%) + Knee: distal femoral cut + posterior condylar cut planes + Plate: contour to bone surface, screw trajectory planning + +Additive Manufacturing (3D printing): + EBM (Electron Beam Melting) — Arcam: + Ti-6Al-4V ELI powder (45–105 μm) + Build chamber: vacuum (~10⁻³ mbar), preheated to 700–750°C + Beam power: 50–3,500 W, scan speed up to 8,000 m/s + Layer thickness: 50–70 μm + Residual stress: reduced by elevated build T + + Laser PBF (Powder Bed Fusion) / SLM: + Yb fiber laser, 200–1,000 W + Ar/N₂ atmosphere + Layer thickness: 20–50 μm + Higher resolution than EBM, smaller build volume + + Lattice structures: + Unit cell types: diamond, gyroid, rhombic dodecahedron + Pore size: 400–800 μm (optimal for bone ingrowth) + Porosity: 50–80% + Strut thickness: 100–500 μm + Designed via implicit surface equations (gyroid): + sin(x)cos(y) + sin(y)cos(z) + sin(z)cos(x) = t + + Post-processing: + Support removal, heat treatment (HIP hot isostatic pressing + for fatigue improvement: 920°C, 100 MPa Ar, 2h), + surface finishing (blasting, chemical etching), + cleaning + passivation per ASTM F86 + + Quality: + μCT for internal defect detection + Mechanical test coupons per build + Surface roughness Ra: as-built 25–50 μm, finished 3–10 μm +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::medical_device { + +enum class SterilizationMethod { Steam_134C, EtO, H2O2_Plasma_STERRAD, Gamma_25kGy }; +enum class InstrumentType { Reusable_Surgical, SingleUse, Implantable }; +enum class AdditiveMfgTech { EBM_Arcam, LaserPBF_SLM, DED_DirectEnergy }; +enum class LatticeUnitCell { Diamond, Gyroid, RhombicDodecahedron, Custom }; + +struct SterilizationSpec { + SterilizationMethod method; + double temperature_C; // 134 steam, 37–63 EtO, ≤50 plasma + double exposure_time_min; // 18 steam, 120–360 EtO, 45–72 plasma + double A0_value_target; // 60–3000 for WD + bool prevacuum; // steam + double eto_aeration_hours; // 8–48 + double gamma_dose_kGy; // 25 + std::string validation_biological_indicator; +}; + +struct InstrumentSpec { + InstrumentType type; + std::string material; // stainless 316L/17-4PH, Ti, CoCr + double max_reprocessing_cycles; // for reusable + bool sharp_edge_maintainable; + bool articulation_joint; + double min_tensile_strength_MPa; + bool passivated_per_astm_f86; +}; + +struct ImplantSegmentationSpec { + double bone_threshold_HU; // >200 + double soft_tissue_threshold_HU; // −100 to +100 + double marching_cubes_isovalue; + double smoothing_iterations; + double decimate_target_triangles; // 50k–500k +}; + +struct ImplantDesignSpec { + std::string implant_type; // hip_cup, stem, knee_femoral, plate, screw + std::string material; // Ti-6Al-4V ELI, CoCr, UHMWPE + double bone_canal_fill_ratio_proximal_pct; + double bone_canal_fill_ratio_distal_pct; + double coating_type; // HA plasma spray, porous Ti, trabecular + double coating_thickness_um; // 50–150 + double stem_neck_angle_deg; // 125–135 for hip + double stem_offset_mm; + AdditiveMfgTech additive_mfg; +}; + +struct LatticeSpec { + LatticeUnitCell unit_cell; + double pore_size_um; // 400–800 + double porosity_pct; // 50–80 + double strut_thickness_um; // 100–500 + double gyroid_equation_param_t; // iso-value + double elastic_modulus_MPa_target; // match bone: cortical 10–20GPa, trabecular 0.5–3GPa +}; + +struct AdditiveManufacturingSpec { + AdditiveMfgTech technology; + std::string powder_material; // Ti64 ELI, CoCr, 316L + double powder_size_min_um, powder_size_max_um; + double layer_thickness_um; // 20–70 + double laser_power_W; // 200–1,000 for PBF + double ebm_beam_power_W; // 50–3,500 for EBM + double build_chamber_preheat_C; // 700–750 EBM + double scan_speed_mm_per_s; + double hatch_spacing_um; + bool hip_treatment; // 920°C, 100MPa, 2h + double surface_roughness_Ra_target_um; // 3–10 after finishing +}; + +struct ImplantVerifyPerformance { + double bone_segmentation_dice_coefficient; // >0.95 + double implant_fit_accuracy_mm; // RMS fit to bone + double lattice_pore_size_mean_um; + double lattice_pore_size_cv_pct; // <10% + double lattice_porosity_pct; + double additive_part_density_pct; // >99.5% of wrought + double additive_surface_Ra_um; + bool fatigue_10M_cycles_iso_7206; // hip fatigue per ISO 7206 + bool biocompatibility_iso_10993; +}; + +ImplantDesignSpec design_implant_from_ct(const ImplantSegmentationSpec& seg, std::string implant_type); +LatticeSpec design_lattice(double target_porosity_pct, double target_elastic_modulus_GPa); +AdditiveManufacturingSpec design_am_process(AdditiveMfgTech tech, std::string material, double layer_um); +ImplantVerifyPerformance verify_implant_design(const ImplantDesignSpec& implant, const LatticeSpec& lattice); + +double calculate_A0_value(const std::vector& temps_C, const std::vector& intervals_sec); +double calculate_lattice_elastic_modulus(double solid_modulus_GPa, double porosity, LatticeUnitCell cell); + +} // namespace vde::medical_device +``` + +--- + +### 6. Active Implantable Medical Devices + +**Priority**: P1 + +#### 6.1 Pacemaker, ICD, Neurostimulator, Cochlear Implant + +``` +Pacemaker (IPG — Implantable Pulse Generator): + Titanium can: hermetically sealed by laser welding + Lithium-iodine (Li/I₂) battery: + Voltage: 2.8 V (nominal) + Capacity: 0.5–2.0 Ah (typical pacemaker) + Service life: 7–15 years + ERI (Elective Replacement Indicator): ~2.79 V + + Pacing modes (NBG code): DDD, VVI, AAI, DDDR, etc. + Pacing lead: + Tip electrode: steroid-eluting (dexamethasone acetate) → reduced inflammation + Fixation: active (screw-in helix) or passive (tines) + Conductor: MP35N or drawn filled tube (Ag core + MP35N jacket) + Insulation: silicone, polyurethane (Pellethane) + Connector: IS-1 (bipolar), IS-4 (quadripolar) + + Telemetry: MICS 402–405 MHz, Bluetooth Low Energy + Data: programmed parameters, diagnostics, electrogram (EGM) + + MRI conditional (MR Conditional): + Lead design: reduced heating (high-impedance conductor + wire, minimized lead loop area, filter at feedthrough) + Device: Hall sensor for magnet detection → asynchronous mode + Lead-tip heating at 1.5T and 3.0T: SAR-limited scan + Labeling per ISO/TS 10974 + +Implantable Cardioverter Defibrillator (ICD): + ICD can: larger than pacemaker, contains HV capacitor + battery + Battery: Li/SVO (lithium/silver vanadium oxide) or Li/MnO₂ + Higher current capability for charging HV capacitor + Service life: 5–10 years (shorter with frequent shocks) + + HV shocking circuit: + HV capacitor: 100–150 μF, charged to 700–800 V + Biphasic waveform (Phase 1 → Phase 2): + Phase 1: positive pulse, 3–6 ms duration + Tilt: (V_initial − V_final) / V_initial, typically 50% + Phase 2: reversed polarity, lower voltage, 2–4 ms + Delivered energy per shock: + E_shock = 0.5 × C × (V_initial² − V_final²) [J] + Maximum output: 35–41 J (stored), ~35 J delivered + Shock impedance Z_shock [Ω]: + Optimal: 35–60 Ω (coil electrode + tissue) + Z_shock too high → reduced current, lower success probability + + Detection algorithms: + VF detection: rate-based (>180–200 bpm), sudden onset + VT detection: rate-based + stability + morphology analysis + SVT-VT discriminators: onset, stability, QRS width, AV association + Detection time: 1–5 s for VF (for timely shock delivery) + + Lead system: + RV defibrillation coil (shocking electrode) + pace-sense tip + SVC coil (optional, in dual-coil system) + Active can: ICD can acts as shocking electrode (hot can) + DF-4 connector standard (single connector for pace-sense + HV) + +Neurostimulator (Spinal Cord / Deep Brain / Vagus Nerve): + SCS (Spinal Cord Stimulation): chronic pain management + Electrode array: 8–16 contacts, cylindrical or paddle lead + Pulse parameters: + Frequency: 30 Hz–10 kHz (HF-10 high-frequency SCS at 10 kHz) + Pulse width: 100–500 μs + Amplitude: 0.5–10 mA (paresthesia below perception at HF) + High-frequency (10 kHz) vs. tonic (40–60 Hz) stimulation + IPG placement: abdominal/posterior flank subcutaneous pocket + + DBS (Deep Brain Stimulation): Parkinson's, essential tremor, dystonia + Targeting: STN (subthalamic nucleus), GPi, VIM thalamus + DBS lead: 4 or 8 contacts, 1.27 mm diameter + Monopolar or bipolar stimulation configuration + Post-op MRI safety: head-only SAR, specific absorption rate limits + + VNS (Vagus Nerve Stimulation): epilepsy, depression + Helical electrode around left vagus nerve (avoids cardiac effects) + Duty cycle: 30 s ON / 5 min OFF (typical) + Autostimulation mode: heart-rate triggered seizure detection + + Rechargeable vs. primary cell IPG: + Rechargeable (Li-ion): 9–15 year service life, transcutaneous charging + Primary cell: 3–7 years, no charging needed + +Cochlear Implant: + External processor: BTE (behind-the-ear) speech processor + Microphone array: dual-mic directional beamforming + Speech coding strategy: ACE (Advanced Combination Encoder), CIS, SPEAK + + Transcutaneous link: + External transmitter coil (magnet retention) + Internal receiver-stimulator (hermetically sealed, titanium or ceramic) + Inductive power + data link at 5–49 MHz carrier + + Electrode array: + Number of electrodes: 12–22 active contacts + Insertion depth: 20–28 mm into scala tympani + Electrode spacing: 0.4–0.75 mm (basal-to-apical) + Modiolus-hugging (perimodiolar) vs. straight lateral wall + + Frequency-to-electrode mapping: + Tonotopic organization of cochlea: + Basal turn (high freq 2–20 kHz), Apical turn (low freq 100–1,000 Hz) + Bandpass filter bank (n filters for n electrodes): + f_c[k] computed by Greenwood function: + f = 165.4 × (10^(0.06 × x) − 1) + Where x = distance from apex [mm] (0–35 mm) + Each electrode stimulated with current proportional to + envelope amplitude in its assigned frequency band + + Stimulation parameters: + Biphasic current pulses: charge-balanced to avoid tissue damage + Pulse rate: 500–5,000 pps/channel (pulses per second) + Current amplitude: 10–1,750 μA + Compliance voltage: 8–10 V (sufficient for high impedances) + Electrode impedance: 2–15 kΩ (in saline / tissue) + + Audiological outcomes: + Speech perception test (CNC words, AzBio sentences) + Mapping: T-levels (threshold), C-levels (comfort) per electrode + Dynamic range: C-level − T-level = 20–60 CL (clinical units) + +Active Implant Performance Model: + Pacemaker longevity estimate: + t_service [years] = Battery_capacity_Ah / (I_avg_ipg_uA × 8760 / 1e6) + I_avg_ipg = I_quiescent + (I_pacing × %_pacing) + I_pacing = V_out × PW × freq / (Z_load × T_cardiac_cycle) + Where: + Z_load = lead-tissue impedance [Ω], typically 400–1200 Ω + + ICD shock energy delivery: + Defibrillation threshold (DFT) test: + V_DFT = lowest voltage achieving successful defibrillation + Safety margin: E_max / E_DFT ≥ 10 J (at least 10 J above DFT) + + Neurostimulator electrode impedance model: + R_access (spreading resistance): + R_s = ρ_tissue / (4 × r_electrode) [Ω] + Interface impedance (Helmholtz double-layer): + Z_int = R_ct / (1 + jω × R_ct × C_dl) + Where R_ct = charge transfer resistance, C_dl ≈ 10–100 μF/cm² + Total electrode impedance: Z_total = R_s + Z_int +``` + +#### 6.2 C++ API: Active Implantable Medical Devices + +```cpp +namespace vde::medical_device::active_implants { + +enum class PacingMode { DDD, DDI, VVI, VVIR, AAI, AAIR, DDDR, VOO, AOO, DOO, OVO }; +enum class LeadConnector { IS1_Bipolar, IS4_Quadripolar, DF4, DF1 }; +enum class NeurostimTarget { SCS_SpinalCord, DBS_STN, DBS_GPi, DBS_VIM, VNS_Vagus }; +enum class CochlearStrategy { ACE, CIS, SPEAK, FS4 }; +enum class BatteryType { Li_I2, Li_SVO, Li_MnO2, Li_Ion_Rechargeable }; + +struct PacemakerSpec { + PacingMode mode = PacingMode::DDD; + double lower_rate_bpm = 60.0; + double upper_tracking_rate_bpm = 130.0; + double pulse_amplitude_V = 2.5; + double pulse_width_ms = 0.4; + double sensitivity_mV = 2.0; // sensing threshold + double lead_impedance_ohm = 500.0; + BatteryType battery = BatteryType::Li_I2; + double battery_capacity_Ah = 1.2; + double quiescent_current_uA = 8.0; + bool mri_conditional = true; + double mri_max_sar_W_kg = 2.0; // per ISO/TS 10974 +}; + +struct ICDSpec { + PacingMode pacing_mode = PacingMode::VVI; + double pacing_rate_bpm = 40.0; // backup pacing + double vf_detection_rate_bpm = 200.0; + double vt_detection_rate_bpm = 150.0; + double detection_duration_sec = 2.5; // VF detection window + double shock_energy_J = 36.0; // delivered + double shock_impedance_ohm = 50.0; + double hv_capacitance_uF = 135.0; + double hv_voltage_V = 750.0; // charged voltage + double tilt_pct = 50.0; + bool atp_therapy = true; // anti-tachycardia pacing + double max_shocks_per_episode = 6; +}; + +struct NeurostimulatorSpec { + NeurostimTarget target; + int num_contacts = 8; + double frequency_Hz = 40.0; // tonic, or 10000 for HF-10 + double pulse_width_us = 200.0; + double amplitude_mA = 2.5; + double electrode_impedance_ohm = 800.0; + double tissue_impedivity_ohm_cm = 300.0; // ρ_tissue + double electrode_radius_mm = 0.7; + BatteryType battery = BatteryType::Li_Ion_Rechargeable; + double battery_capacity_mAh = 200.0; + bool mri_conditional = false; +}; + +struct CochlearImplantSpec { + CochlearStrategy strategy = CochlearStrategy::ACE; + int num_active_electrodes = 22; + double electrode_spacing_mm = 0.5; + double insertion_depth_mm = 25.0; + double pulse_rate_pps = 900.0; // per channel + double max_current_uA = 1750.0; + double compliance_voltage_V = 10.0; + double electrode_impedance_kohm = 5.0; + double carrier_frequency_MHz = 12.0; // RF link + double audio_bandwidth_low_Hz = 100.0; + double audio_bandwidth_high_Hz = 8000.0; + int num_bandpass_filters = 22; +}; + +struct ActiveImplantPerformance { + double pacemaker_longevity_years; // from battery model + double avg_ipg_current_uA; + double pacing_percentage_pct; // % paced beats + double icd_charging_time_sec; // HV cap charge time + double icd_delivered_energy_J; + double icd_dft_energy_J; // defibrillation threshold + double neurostim_battery_years; + double neurostim_electrode_impedance_model_ohm; + double cochlear_compliance_margin_V; // V_compliance − V_required + double cochlear_tonotopic_error_pct; // f_map error vs. Greenwood + double rf_link_efficiency_pct; + bool mri_conditional_compliant; +}; + +PacemakerSpec design_pacemaker(PacingMode mode, double target_longevity_years); +ICDSpec design_icd(double target_shock_energy_J, double safety_margin_J); +NeurostimulatorSpec design_neurostimulator(NeurostimTarget target, double frequency_Hz); +CochlearImplantSpec design_cochlear_implant(CochlearStrategy strategy, int num_electrodes); + +ActiveImplantPerformance simulate_pacemaker_battery(const PacemakerSpec& spec, double pacing_pct); +ActiveImplantPerformance simulate_icd_shock_delivery(const ICDSpec& spec, double shock_impedance_ohm); +ActiveImplantPerformance simulate_neurostimulator_impedance(const NeurostimulatorSpec& spec); +ActiveImplantPerformance simulate_cochlear_mapping(const CochlearImplantSpec& spec); + +double calculate_pacemaker_longevity(double batt_Ah, double i_avg_uA); +double calculate_shock_energy(double C_uF, double V_initial, double V_final); +double calculate_greenwood_frequency(double distance_from_apex_mm); +double calculate_electrode_spreading_resistance(double rho_tissue_ohm_cm, double r_electrode_cm); + +} // namespace vde::medical_device::active_implants +``` + +--- + +### 7. Orthopedic & Cardiovascular Implants + +**Priority**: P1 + +#### 7.1 Additive Manufacturing, Hip/Knee, Stent, Heart Valve + +``` +Additive Manufacturing (AM) for Orthopedic Implants: + Technologies: + EBM (Electron Beam Melting): GE Arcam, high temp preheat 700–1,000°C + Reduced residual stress, vacuum environment + Beam power: 3–6 kW, scan speed: 1,000–8,000 mm/s + Layer thickness: 50–100 μm + + SLM (Selective Laser Melting): EOS, Concept Laser, Renishaw + Laser power: 200–1,000 W, spot size: 50–200 μm + Inert atmosphere (Ar/N₂), O₂ < 0.1% + Layer thickness: 20–60 μm + + Lattice structures for osseointegration: + Unit cell types: + Gyroid (TPMS — Triply Periodic Minimal Surface): + Implicit surface: cos(x)sin(y) + cos(y)sin(z) + cos(z)sin(x) = 0 + Gyroid surface area / volume ratio: high + Advantages: smooth curvature, no stress concentrators, self-supporting + + Diamond (beam-based): + Nodes connected by cylindrical struts + Porosity controlled by strut diameter / unit cell size + + Rhombic dodecahedron, truncated cuboctahedron, etc. + + Pore size: 400–800 μm (optimal for bone ingrowth) + Porosity: 60–80% + Strut/wall thickness: 200–500 μm + Effective elastic modulus (Gibson-Ashby): + E_eff / E_solid = C × (ρ_eff/ρ_solid)^n + For bending-dominated: n ≈ 2, C ≈ 1 + For stretch-dominated: n ≈ 1, C ≈ 0.3 + Target: E_eff = 3–20 GPa (matching cancellous bone ~0.5–5 GPa, + cortical bone ~10–20 GPa, and Ti64 ~110 GPa) + + Mechanical properties: + Ti-6Al-4V ELI (Grade 23, extra low interstitial): + Yield strength: 900–1,000 MPa (wrought), 900–1,100 MPa (AM) + UTS: 950–1,050 MPa (wrought), 950–1,150 MPa (AM) + Elongation: >10% + Fatigue endurance (10⁷ cycles): ~500–600 MPa (wrought), + ~300–500 MPa (AM as-built), improved with HIP + surface finishing + Modulus: 110 GPa (vs. bone ~5–20 GPa → stress shielding) + + CoCr-Mo (ASTM F75): + Yield strength: 450–650 MPa, UTS: 650–900 MPa + Modulus: ~210 GPa + High wear resistance (bearing surfaces) + + Post-processing: + HIP (Hot Isostatic Pressing): 920°C, 100 MPa Ar, 2–4 hr + Closes internal porosity, improves fatigue life + Surface finishing: chemical etching, abrasive blasting + As-built Ra: 15–30 μm → finished Ra: 2–8 μm + +CT-to-Implant Workflow (Patient-Specific): + Segmentation: + Threshold-based bone segmentation (Hounsfield Units): + Cortical bone: 300–1,900 HU, Cancellous bone: 100–300 HU + Marching Cubes algorithm → 3D surface mesh + Surface smoothing (Laplacian, Taubin) + + Implant design from CT: + Anatomical fit: minimize RMS distance between implant surface + and bone surface in contact region + d_RMS = √[(1/N) × Σ(dᵢ²)] < 0.5 mm (target registration) + + Acetabular cup (hip): + Cup outer diameter: 44–70 mm (2 mm increments) + Cup abduction angle: 40° ± 10° + Cup anteversion: 15° ± 10° + Coverage: >70% of cup in contact with bone + + Femoral stem (hip): + Stem types: cemented (polished taper), cementless (porous-coated) + Sizing: proximal-medial curvature, neck angle, offset + Neck-shaft angle: 125–135° + Offset: 35–55 mm (lateralization) + + Mechanical verification: + Static strength: ISO 7206-4 (stem), ISO 7206-10 (modular head) + Fatigue (10⁷ cycles): ISO 7206-6 (stem neck region) + Fretting corrosion: taper junction (head-stem interface) + Wear testing (hip): ISO 14242, volumetric wear rate <30 mm³/10⁶ cycles + +Knee Implant Design: + Total Knee Arthroplasty (TKA): + Femoral component: CoCr-Mo, 5 standard sizes + Distal radius, posterior condyle radius, trochlear groove + J-curve sagittal profile: decreasing radius posteriorly + Tibial insert: UHMWPE (ultra-high molecular weight polyethylene) + Highly crosslinked (HXLPE) with vitamin E antioxidant + Thickness: 8–16 mm + Tibial baseplate: Ti-6Al-4V or CoCr-Mo + Patellar component: UHMWPE dome/oval, all-poly or metal-backed + + Alignment parameters: + Mechanical axis: hip center → ankle center + Valgus cut angle: 5–7° (distal femur) + Tibial slope: 0–5° posterior + Joint line restoration: ±5 mm from native + + Kinematics: + Cruciate-retaining (CR) vs. posterior-stabilized (PS) + Medial pivot: medial compartment highly congruent, lateral rolls back + Tibiofemoral contact stress: + σ_contact = F / A_contact + Typical area: 200–600 mm² (depends on conformity) + HXLPE contact stress limit: <30 MPa (to avoid delamination/pitting) + + Wear testing: + ISO 14243: knee wear simulator, 5×10⁶ cycles + Gravimetric wear rate: <10 mg/10⁶ cycles (HXLPE) + Surface damage: delamination, pitting, scratching assessment + +Cardiovascular Stent Design: + Coronary stent: + Material: 316L stainless steel, CoCr L-605, Pt-Cr alloy + Bioresorbable: PLLA (poly-L-lactic acid), Mg alloy + Strut thickness: 60–100 μm (thin-strut for reduced restenosis) + Stent diameter (expanded): 2.25–5.0 mm + Length: 8–38 mm + + Stent mechanics: + Radial strength / chronic outward force: + P_collapse > 0.3 bar (300 mmHg) + Recoil after deployment: + Recoil_pct = (D_balloon − D_stent_final) / D_balloon × 100 + Target recoil: <5% + Foreshortening: + Foreshortening_pct = (L_crimped − L_expanded) / L_crimped × 100 + Target: <5% for accurate deployment + + Drug-eluting stent (DES): + Polymer coating: biodegradable PLGA, durable fluoropolymer + Drug: sirolimus, everolimus, paclitaxel, zotarolimus + Drug release kinetics: + Burst release: 20–40% in first 24 hours + Sustained release: 80–100% over 30–90 days + Release profile: first-order or Higuchi diffusion model + + Fatigue analysis: + ISO 25539-2: pulsatile fatigue, 10⁷ cycles (400×10⁶ for peripheral) + Goodman diagram for stent fatigue safe region + Finite element: cyclic loading at 80–120 mmHg (diastole-systole) + +Cardiovascular Heart Valve: + Surgical valve: + Mechanical: pyrolytic carbon leaflets, titanium housing (Bjork-Shiley, St. Jude) + Bioprosthetic: bovine/porcine pericardium, glutaraldehyde crosslinked + + Transcatheter Aortic Valve (TAVR/TAVI): + Balloon-expandable (Sapien): CoCr frame, bovine pericardial leaflets + Self-expanding (CoreValve/Evolut): Nitinol frame, porcine pericardium + Delivery: transfemoral (14–18 Fr sheath), transapical, transaortic + Frame height: 15–30 mm, Annulus diameter: 18–29 mm + + Valve hemodynamics: + Effective Orifice Area (EOA): + EOA = (SV × 44.3) / (mean_ΔP)^0.5 [cm²] (Gorlin equation) + Where SV = stroke volume [mL], mean_ΔP = mean pressure gradient [mmHg] + + Geometric Orifice Area (GOA): + GOA = π × (D_internal/2)² [cm²] (circular idealization) + + Performance Index (PI): + PI = EOA / valve_label_size_area + Target PI > 0.85 (no prosthesis-patient mismatch) + + Regurgitation fraction: + RF_pct = V_regurgitant / V_forward × 100 + Target: RF < 10% (trivial/mild), < 5% (ideal) + + Durability testing: + ISO 5840: accelerated wear testing, 200×10⁶ cycles (AWT at 5–10 Hz) + Hydrodynamic testing: steady forward flow + pulsatile backflow + Leaflet calcification: simulated in vitro, von Kossa staining + +Orthopedic/Cardiovascular Implant Verification: + Sterilization: + EO (ethylene oxide): for heat-sensitive polymers + Gamma radiation: 25–40 kGy (UHMWPE crosslinking, potential oxidation) + Steam autoclave: 121°C, 15 min (metal only) + + Biocompatibility: + ISO 10993-1: biological evaluation + ISO 10993-5: cytotoxicity (elution test, agar overlay) + ISO 10993-10: sensitization, irritation + ISO 10993-11: systemic toxicity + + Packaging: + Double sterile barrier (inner tray + outer pouch) + Tyvek/Mylar pouch, sealed with validated process + Sterility assurance level (SAL): 10⁻⁶ +``` + +#### 7.2 C++ API: Orthopedic & Cardiovascular Implants + +```cpp +namespace vde::medical_device::implants_cardiovascular { + +enum class AdditiveMfgTech { EBM, SLM, DMLS, BinderJetting }; +enum class LatticeUnitCell { Gyroid, Diamond, RhombicDodecahedron, Cubic, OctetTruss }; +enum class ImplantMaterial { Ti64_ELI, CoCrMo_F75, SS316L, UHMWPE_HXLPE, Nitinol, PLLA }; +enum class HipStemType { Cemented_PolishedTaper, Cementless_PorousCoated }; +enum class KneeType { CR_CruciateRetaining, PS_PosteriorStabilized, MedialPivot }; +enum class StentType { BareMetal, DrugEluting, Bioresorbable }; +enum class HeartValveType { Mechanical_Bileaflet, Bioprosthetic_Surgical, TAVR_BalloonExpandable, TAVR_SelfExpanding }; +enum class SterilizationMethod { Gamma_25kGy, Gamma_40kGy, EO_Gas, Steam_Autoclave, EBeam }; + +struct OrthopedicImplantSpec { + AdditiveMfgTech am_tech = AdditiveMfgTech::EBM; + ImplantMaterial material = ImplantMaterial::Ti64_ELI; + LatticeUnitCell lattice_cell = LatticeUnitCell::Gyroid; + double target_porosity_pct = 70.0; // lattice + double pore_size_target_um = 600.0; // 400–800 μm + double strut_thickness_um = 300.0; + double target_elastic_modulus_GPa = 10.0; // match bone + bool hip_enabled = false; + bool hipec_enabled = true; // post-processing + double surface_Ra_target_um = 3.0; + // Hip-specific + HipStemType hip_stem_type = HipStemType::Cementless_PorousCoated; + double neck_shaft_angle_deg = 135.0; + double femoral_offset_mm = 42.0; + double cup_outer_diameter_mm = 54.0; + double cup_abduction_deg = 42.0; + double cup_anteversion_deg = 18.0; + // Knee-specific + KneeType knee_type = KneeType::CR_CruciateRetaining; + double tibial_insert_thickness_mm = 12.0; + double valgus_cut_deg = 6.0; +}; + +struct CardiovascularImplantSpec { + // Stent + StentType stent_type = StentType::DrugEluting; + ImplantMaterial stent_material = ImplantMaterial::CoCrMo_F75; + double strut_thickness_um = 80.0; + double stent_diameter_mm = 3.0; + double stent_length_mm = 18.0; + double target_recoil_pct = 3.0; + double target_foreshortening_pct = 3.0; + double radial_strength_bar = 0.4; + std::string drug_agent = "everolimus"; + double drug_load_ug_per_mm2 = 1.0; + double drug_release_30d_pct = 85.0; + // Heart Valve + HeartValveType valve_type = HeartValveType::TAVR_BalloonExpandable; + double annulus_diameter_mm = 23.0; + double target_eoa_cm2 = 1.8; + double target_mean_gradient_mmHg = 8.0; + double target_regurgitation_pct = 3.0; + int leaflets = 3; + ImplantMaterial leaflet_material = ImplantMaterial::UHMWPE_HXLPE; +}; + +struct PatientCTSpec { + std::string ct_dicom_dir; + double slice_thickness_mm = 0.625; + double cortical_hu_threshold = 300.0; + double cancellous_hu_threshold = 100.0; + int marching_cubes_isovalue = 120; +}; + +struct ImplantVerifyPerformance { + // CT fit + double bone_segmentation_dice = 0.96; + double implant_fit_rms_mm = 0.35; // <0.5 mm target + // Lattice + double lattice_porosity_pct = 0.0; + double lattice_pore_size_um = 0.0; + double lattice_modulus_GPa = 0.0; + double effective_modulus_GPa = 0.0; + // Fatigue + bool hip_fatigue_10M_ok = false; // ISO 7206 + bool knee_wear_5M_ok = false; // ISO 14243 + double wear_rate_mm3_per_Mcycle = 0.0; + // Stent + double stent_recoil_pct = 0.0; + double stent_foreshortening_pct = 0.0; + double stent_fatigue_safety_factor = 0.0; + double drug_elution_30d_pct = 0.0; + // Heart valve + double eoa_cm2 = 0.0; + double mean_gradient_mmHg = 0.0; + double regurgitation_pct = 0.0; + double pi_ratio = 0.0; // performance index + // Biocompatibility + bool cytotoxicity_pass = false; + bool sensitization_pass = false; + bool systemic_toxicity_pass = false; + // Sterilization + SterilizationMethod sterilization = SterilizationMethod::Gamma_25kGy; + bool sal_10E_minus6 = true; +}; + +OrthopedicImplantSpec design_orthopedic_implant(const PatientCTSpec& ct, std::string joint_type); +LatticeSpec design_lattice_for_bone_growth(LatticeUnitCell cell, double target_modulus_GPa, double target_porosity_pct); +CardiovascularImplantSpec design_stent(StentType type, double target_diameter_mm, double target_length_mm); +CardiovascularImplantSpec design_heart_valve(HeartValveType type, double annulus_diameter_mm); + +ImplantVerifyPerformance verify_implant_fit(const OrthopedicImplantSpec& implant, const PatientCTSpec& ct); +ImplantVerifyPerformance simulate_implant_fatigue(const OrthopedicImplantSpec& implant, int cycles); +ImplantVerifyPerformance simulate_stent_deployment(const CardiovascularImplantSpec& stent); +ImplantVerifyPerformance simulate_valve_hemodynamics(const CardiovascularImplantSpec& valve, double stroke_volume_mL, double heart_rate_bpm); +ImplantVerifyPerformance simulate_drug_elution(const CardiovascularImplantSpec& stent, double duration_days); + +double calculate_gibson_ashby_modulus(double E_solid_GPa, double relative_density, double exponent_n); +double calculate_gyroid_surface_area(double unit_cell_size_mm, double porosity); +double calculate_gorlin_eoa(double SV_mL, double systolic_ejection_period_sec, double mean_gradient_mmHg); +double calculate_stent_recoil(double D_balloon_mm, double D_stent_final_mm); +double calculate_A0_sterilization_value(const std::vector& temps_C, const std::vector& intervals_sec, double z_value_C = 10.0); + +} // namespace vde::medical_device::implants_cardiovascular +``` + +--- + +### 8. Acceptance Criteria + +1. **Diagnostic Imaging AC**: X-ray tube heat unit capacity, CT dose indices (CTDIvol, DLP), MRI SAR limits (≤2 W/kg whole-body, ≤3.2 W/kg head), ultrasound MI (<1.9) and TI limits, PET SUV quantification accuracy (±10%), and DICOM tag conformance per PS3.3 Part 3 must be validated against clinical reference systems. + +2. **Image Reconstruction AC**: CT iterative reconstruction (IR/DLIR) algorithm must demonstrate CNR improvement ≥20% over FBP at same dose; MRI parallel imaging (SENSE/GRAPPA) g-factor map must produce SNR loss ≤√R × 0.8 at R=2; ultrasound beamforming SNR improvement ≥8 dB over single-element per channel. + +3. **Surgical Robot AC**: RCM constraint holding accuracy ≤0.5 mm at end-effector tip under rated payload; tremor filtering to reduce physiological tremor (8–12 Hz) power by ≥90% (20 dB); collision detection via current observer with response time <50 ms. + +4. **Energy Device AC**: ESU power delivery accuracy ±10% of setpoint across 50–500 Ω load impedance range, crest factor validation for CUT vs. COAG modes; ultrasonic transducer impedance analysis detecting cracked blade or loose stack within ±2% of Bode plot reference; Ho:YAG laser pulse energy validation ±2.5% of setpoint. + +5. **Surgical Instrument AC**: Instrument tracking accuracy sub-mm (≤0.3 mm RMS) in calibrated measurement volume 500×500×500 mm; RF ablation temperature mapping to within ±2°C of fiber optic probe reference; implant verification for serial number OCR accuracy ≥99.9%. + +6. **Active Implant AC**: Pacemaker longevity estimate accuracy ±10% of bench test at 37°C; ICD shock delivery energy accuracy ±2 J of programmed setpoint; neurostimulator electrode impedance model fit within ±15% of in-vivo measurement; cochlear implant tonotopic mapping error <5% vs. Greenwood function across 22 electrodes. + +7. **Orthopedic & Cardiovascular AC**: Additively manufactured lattice porosity within ±3% of design target; implant-to-CT fit RMS <0.5 mm; stent recoil <5% and foreshortening <5% in bench deployment test; heart valve EOA within ±0.2 cm² of predicted, regurgitation fraction <5% in steady-flow test. + +8. **Regulatory Documentation AC**: All medical device verification outputs must be traceable to applicable regulatory standards (ISO 13485 design controls, IEC 60601-series safety, IEC 62304 software lifecycle, ISO 14971 risk management) with full design history file (DHF) documentation traceability and UDI (Unique Device Identification) labeling per FDA 21 CFR 830 and EU MDR 2017/745 Annex VI. + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|----------|-------|-----------| +| IEC 60601-1 Ed. 3.2 | Medical electrical equipment — General requirements for basic safety and essential performance | Overall safety for all diagnostic and surgical equipment | +| IEC 60601-1-2 Ed. 4.1 | Collateral standard: Electromagnetic disturbances | EMC/EMI for medical devices in clinical environment | +| IEC 60601-2-44 | Particular requirements: CT scanners | CT system design and safety requirements | +| IEC 60601-2-33 | Particular requirements: MR equipment | MRI magnet, gradient, RF safety limits | +| IEC 60601-2-37 | Particular requirements: ultrasonic medical equipment | Ultrasound MI, TI display and safety limits | +| IEC 60601-2-2 | Particular requirements: HF surgical equipment | ESU output power, crest factor, patient circuit isolation | +| IEC 60601-2-46 | Particular requirements: operating tables | Surgical table coordinate frame and safety | +| IEC 62304 | Medical device software — Software life cycle processes | Software safety classification (A/B/C), software development lifecycle | +| ISO 14971 | Medical devices — Application of risk management | Risk analysis, FMEA, benefit-risk for all device categories | +| ISO 13485 | Medical devices — Quality management systems | QMS requirements for regulatory compliance, design controls | +| ISO 10993 series | Biological evaluation of medical devices | Biocompatibility: cytotoxicity, sensitization, irritation, systemic toxicity | +| ISO 11135 | Sterilization of health-care products — Ethylene oxide | EO sterilization validation | +| ISO 11137 | Sterilization of health care products — Radiation | Gamma/e-beam sterilization validation, dose substantiation | +| ISO 17665 | Sterilization of health care products — Moist heat | Steam sterilization, SAL 10⁻⁶ | +| ISO 7206 series | Implants for surgery — Partial and total hip joint prostheses | Hip stem fatigue, modular head pull-off, neck strength | +| ISO 14243 series | Implants for surgery — Wear of total knee-joint prostheses | Knee wear testing, gravimetric measurement | +| ISO 25539-2 | Cardiovascular implants — Endovascular devices — Vascular stents | Stent fatigue, radial strength, deployment accuracy | +| ISO 5840 series | Cardiovascular implants — Cardiac valve prostheses | Heart valve hydrodynamic and durability testing | +| ISO/TS 10974 | Assessment of the safety of MR scanning for patients with active implants | Pacemaker/ICD/neurostimulator MRI conditional testing | +| ASTM F75 | Standard specification for cobalt-chromium-molybdenum alloy castings | CoCr-Mo for orthopedic implants | +| ASTM F136 | Standard specification for Ti-6Al-4V ELI alloy | Titanium alloy for surgical implants | +| ASTM F648 | Standard specification for UHMWPE powder and fabricated form | Polyethylene for orthopedic bearing surfaces | +| ISO 19227 | Implants for surgery — Cleanliness of orthopedic implants | Particulate and biological contamination limits | +| DICOM PS3.3 | Digital Imaging and Communications in Medicine — Information Object Definitions | CT, MR, US, PET, SPECT, XA image IOD definitions | +| DICOM PS3.16 | DICOM — Content Mapping Resource | DICOM structured reporting templates | +| AAMI TIR 28 | Product adoption and process equivalence for ethylene oxide sterilization | EO sterilization parametric release | +| FDA 21 CFR 830 | Unique Device Identification | UDI labeling requirements | +| EU MDR 2017/745 Annex VI | UDI system | EU UDI, Basic UDI-DI assignment | + +--- + +## Benchmarks + +| Target | Class | Characteristic | +|--------|-------|----------------| +| Canon / Toshiba Aquilion ONE / Genesis | CT scanner | 0.5 mm isotropic, 16 cm detector coverage, DLIR-AiCE, whole-organ perfusion | +| Siemens Healthineers SOMATOM Force / Naeotom Alpha | CT scanner | Dual-source, photon-counting CT (CdTe), 66 ms temporal resolution | +| GE HealthCare Revolution Apex / Revolution Ascend | CT scanner | 256-slice, Gemstone detector, TrueFidelity DLIR, 0.23 s rotation | +| Siemens Healthineers MAGNETOM Terra / Cima.X | MRI | 7T, 3T, compressed sensing, simultaneous multi-slice, 80/200 mT/m | +| GE SIGNA Premier / Architect | MRI | 3T AIR coil, DL Recon, HyperSense, AIR Touch | +| Philips MR 7700 / Ingenia Elition | MRI | 3T, dStream digital broadband, Compressed SENSE, multi-nuclei | +| Philips EPIQ Elite / Affiniti | Ultrasound | PureWave, xMATRIX, shear wave elastography, cardiac 3D TEE | +| GE Logiq E10 / Voluson E10 | Ultrasound | XDclear, shear wave, B-Flow, HDlive rendering | +| Siemens ACUSON Sequoia / Juniper | Ultrasound | InTune, BioAcoustic, Origin deep abdominal | +| Intuitive da Vinci Xi / SP | Surgical robot | 7 DOF EndoWrist, Firefly ICG fluorescence, dual-console, single-port SP | +| Medtronic Hugo RAS | Surgical robot | Modular open-console, wristed instruments, cloud-based case recording | +| Johnson & Johnson Ottava (Verb Surgical) | Surgical robot | Table-integrated, miniaturized instruments | +| Medtronic Valleylab FT10 / Ligasure Exact | ESU & vessel sealing | TissueFect sensing, LigaSure impedance feedback | +| Ethicon Megadyne / Enseal | ESU & vessel sealing | Mega Power, Enseal intelligent tissue sealing | +| Medtronic StealthStation S8 | Surgical navigation | EM + optical tracking fusion, sub-mm accuracy | +| Brainlab Curve / Loop-X | Surgical navigation | Robotic cone-beam CT, multi-modality image fusion | +| Zimmer Biomet ROSA | Surgical robot | Knee/hip/spine robotic assist, haptic boundary | +| Stryker Mako | Surgical robot | CT-based planning, robotic-arm assisted hip/knee | +| Medtronic Micra / Azure | Pacemaker / ICD | Leadless pacemaker, MR conditional, Bluetooth telemetry | +| Abbott Gallant / Aveir | Pacemaker / ICD | Bluetooth, MRI conditional, leadless dual-chamber | +| Boston Scientific S-ICD EMBLEM MRI | ICD | Subcutaneous ICD, no transvenous leads | +| Medtronic Intellis / Vanta | Neurostimulator (SCS) | HF-10 therapy, AdaptiveStim, rechargeable | +| Abbott Proclaim XR | Neurostimulator (SCS) | BurstDR, DRG stimulation, primary cell | +| Cochlear Nucleus 7 / Kanso 2 | Cochlear implant | 22 electrodes, ACE strategy, direct streaming | +| Med-El Synchrony 2 / Sonnet 2 | Cochlear implant | 12 channels, MRI 3T, EAS (electro-acoustic) | +| Advanced Bionics Marvel / Naida CI | Cochlear implant | 16 channels, ClearVoice, T-Mic | +| Stryker Trident / Accolade | Hip implant | Porous-coated, Tritanium, cementless | +| Zimmer Biomet G7 / Taperloc | Hip implant | Vitamin E HXLPE, micro-textured | +| DePuy Synthes Attune / Sigma | Knee implant | Attune GRADIUS curve, rotating platform | +| Abbott Xience / XIENCE Sierra | Drug-eluting stent | CoCr, everolimus, thin-strut (81 μm) | +| Boston Scientific Synergy / Eluvia | Drug-eluting stent | Bioabsorbable polymer, everolimus/paclitaxel | +| Medtronic Onyx / Resolute Onyx | Drug-eluting stent | Pt-Cr core, zotarolimus, thin-strut (74 μm) | +| Edwards SAPIEN 3 Ultra / RESILIA | TAVR heart valve | Balloon-expandable, RESILIA anti-calcification tissue | +| Medtronic Evolut FX PRO+ | TAVR heart valve | Self-expanding Nitinol, porcine pericardium, recapturable | + +--- + +## C++ API Namespace Summary + +```cpp +// Diagnostic Imaging +namespace vde::medical_device::diagnostic_imaging { } +// enums: XRayMode, CTDetectorType, CTReconAlgorithm, MRIMagnetType, MRISequence, +// USProbeType, USImagingMode, PETDetectorMaterial, SPECTCollimator, +// EndoImagingMode, EndoInsertionRoute +// structs: XRayTubeSpec, XRayGenSpec, CTScannerSpec, CTReconSpec, CTDosePerformance, +// MRIMagnetSpec, MRIGradientSpec, MRISequenceSpec, MRIImagePerformance, +// USProbeSpec, USBeamformingSpec, USImagePerformance, PETScannerSpec, +// PETReconSpec, SPECTScannerSpec, EndoscopeSpec, EndoIlluminationSpec +// factories: design_xray_tube, design_ct_scanner, design_mri_magnet, design_mri_sequence, +// design_us_probe, design_pet_scanner, design_spect_collimator, design_endoscope +// simulators: simulate_ct_dose, simulate_ct_recon, simulate_mri_sar, simulate_mri_gfactor, +// simulate_us_beam_former, simulate_us_hemodynamics, simulate_pet_quantification, +// simulate_gamma_camera, simulate_endoscope_illumination +// calculators: calculate_heat_unit_hu, calculate_ct_hounsfield, calculate_ctdi_vol, +// calculate_larmor_frequency, calculate_gfactor, calculate_sar_w_kg, +// calculate_shear_wave_speed, calculate_doppler_shift, calculate_suv, +// calculate_dice_coefficient, calculate_nbi_contrast + +// Surgical Systems +namespace vde::medical_device::surgical_systems { } +// enums: RobotArchitecture, EnergyModality, InstrumentType +// structs: SurgicalRobotSpec, SurgicalRobotPerform, ESUGenSpec, ESULoadSpec, +// UltrasonicTransducerSpec, LaserSurgicalSpec, InstrumentTrackingSpec, +// TissueAblationSpec, ImplantVerifySpec +// factories: design_rcm_robot, design_esu_generator, design_ultrasonic_handpiece, +// design_surgical_laser, design_instrument_tracker +// simulators: simulate_rcm_kinematics, simulate_tremor_filter, simulate_esu_output_waveform, +// simulate_ultrasonic_displacement, simulate_laser_ablation, simulate_rf_ablation +// calculators: calculate_jacobian, calculate_rcm_error, calculate_esu_crest_factor, +// calculate_ultrasonic_impedance_lrm, calculate_laser_fluence, +// calculate_laser_peak_power, calculate_arrhenius_damage + +// Active Implants +namespace vde::medical_device::active_implants { } +// enums: PacingMode, LeadConnector, NeurostimTarget, CochlearStrategy, BatteryType +// structs: PacemakerSpec, ICDSpec, NeurostimulatorSpec, CochlearImplantSpec, +// ActiveImplantPerformance +// factories: design_pacemaker, design_icd, design_neurostimulator, design_cochlear_implant +// simulators: simulate_pacemaker_battery, simulate_icd_shock_delivery, +// simulate_neurostimulator_impedance, simulate_cochlear_mapping +// calculators: calculate_pacemaker_longevity, calculate_shock_energy, +// calculate_greenwood_frequency, calculate_electrode_spreading_resistance + +// Orthopedic & Cardiovascular Implants +namespace vde::medical_device::implants_cardiovascular { } +// enums: AdditiveMfgTech, LatticeUnitCell, ImplantMaterial, HipStemType, KneeType, +// StentType, HeartValveType, SterilizationMethod +// structs: OrthopedicImplantSpec, CardiovascularImplantSpec, PatientCTSpec, +// ImplantVerifyPerformance +// factories: design_orthopedic_implant, design_lattice_for_bone_growth, design_stent, +// design_heart_valve +// simulators: verify_implant_fit, simulate_implant_fatigue, simulate_stent_deployment, +// simulate_valve_hemodynamics, simulate_drug_elution +// calculators: calculate_gibson_ashby_modulus, calculate_gyroid_surface_area, +// calculate_gorlin_eoa, calculate_stent_recoil, calculate_A0_sterilization_value +``` \ No newline at end of file diff --git a/docs/feedback/VDE-1144.md b/docs/feedback/VDE-1144.md new file mode 100644 index 000000000..eacb27b15 --- /dev/null +++ b/docs/feedback/VDE-1144.md @@ -0,0 +1,3063 @@ +# VDE-1144: Automotive Assembly Equipment Engine Requirements (汽车装配设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign AutomotiveAssemblyEngine — BIW body-in-white welding line design (geo-station / respot / framing), welding technology (resistance spot RSW / laser / MAG-MIG arc / projection), mechanical joining (self-pierce riveting SPR / flow drill screw FDS / clinching / structural adhesive), powertrain engine assembly (short block / cylinder head / piston / crankshaft), xEV electric drive & battery assembly (stator winding / rotor magnet / battery module stacking / pack sealing / fuel cell stack compression), DC tightening & process control (torque-angle monitoring / nutrunner strategies), final assembly (chassis marriage / cockpit module / wheel alignment / fluid fill), end-of-line test (EOL roller dynamometer / ADAS calibration / water leak / NVH audit) +**Module**: `vde/automotive_assembly/biw_welding.h`, `vde/automotive_assembly/joining.h`, `vde/automotive_assembly/powertrain.h`, `vde/automotive_assembly/xev_electric_drive.h`, `vde/automotive_assembly/tightening_control.h`, `vde/automotive_assembly/final_assembly.h`, `vde/automotive_assembly/eol_test.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Automotive / Assembly / BIW / Welding / Joining / Powertrain / xEV / Tightening / Final Assembly / EOL + +--- + +## Background + +Automotive assembly represents the culmination of the entire vehicle manufacturing value chain, where thousands of stamped sheet metal panels, cast/forged/machined powertrain components, electrical/electronic modules, interior trim, and chassis subsystems are integrated into a finished vehicle through a highly orchestrated sequence of operations spanning Body-in-White (BIW), Paint, Powertrain, and Final Assembly shops. The modern automotive assembly plant produces a new vehicle every 45–90 seconds (Jobs Per Hour, JPH, typically 30–75 JPH), with line balancing to distribute work content evenly across stations, takt time constraints, and flexible manufacturing to accommodate multiple vehicle platforms on the same line. + +Body-in-White (BIW) is the structural skeleton of the vehicle before painting, comprising 300–500 stamped steel and aluminum sheet metal parts joined by 3,000–6,000 resistance spot welds (RSW), 20–80 meters of laser/MAG arc welding, 50–200 self-pierce rivets (SPR), and 30–100 meters of structural adhesive beads. The BIW line is organized into sub-assembly cells (floor pan, body sides, roof, closures/doors/hood/decklid) feeding into the main framing station where geometry is set. The framing (geo-station) uses precision fixtures with clamping and locating pins to establish the vehicle's dimensional integrity within ±0.7 mm tolerance across critical datums. After framing, respot stations add reinforcement welds, followed by hemming of door/hood inner-outer panels, and application of anti-flutter adhesive and sealers. + +The joining technology landscape has diversified dramatically with the introduction of multi-material body structures (steel + aluminum + CFRP + magnesium). Traditional resistance spot welding (RSW) with Medium-Frequency Direct Current (MFDC, 1,000 Hz inverter) dominates steel-on-steel joints, achieving 4–8 kA welding current, 2–8 kN electrode force, and weld time of 100–400 ms per spot. Aluminum spot welding requires higher current (15–25 kA) and shorter weld times (50–150 ms) due to higher electrical conductivity. Laser welding (fiber/disc laser, 2–8 kW, keyhole mode) provides continuous seams with minimal heat distortion. Mechanical joining technologies—Self-Pierce Riveting (SPR) with 30–60 kN setting force, Flow Drill Screwing (FDS) with 2,000–6,000 rpm spindle speed, and clinching—are essential for joining dissimilar materials (Al-to-steel, Al-to-CFRP). Structural adhesives (1K epoxy heat-cured in paint oven, 2K acrylic/PUR fast-cure) provide continuous bond lines with 15–30 MPa lap shear strength and are applied by robotic dispensing with bead diameter control. + +Powertrain engine assembly covers internal combustion engine (ICE) assembly from short block (crankcase, crankshaft, connecting rods, pistons, bearing caps) through cylinder head sub-assembly (valves, valve springs, camshafts, timing chain/belt), to final engine hot/cold test. Critical operations include: piston ring gap measurement (0.15–0.50 mm), bearing clearance measurement (plastigage/air gauge, 0.02–0.07 mm), cylinder head bolt tightening (torque-to-yield TTY, angle-controlled 90°+90°), and camshaft timing (±1° crankshaft angle). Leak testing (air decay method, <5 sccm at 0.5–2 bar) and cold test (motoring at 200–500 rpm, torque signature analysis) verify assembly integrity before hot test. + +xEV (electrified vehicle) assembly presents fundamentally different requirements: electric drive unit (EDU) assembly covers hairpin stator winding (rectangular copper wire, laser welding of 100–200 termination points), permanent magnet rotor assembly (magnet insertion with polarity check, rotor balancing to G2.5 at 15,000 rpm), and gearbox/reducer assembly. Traction battery pack assembly involves: module stacking (prismatic/pouch/cylindrical cells, end-plate compression), cell-to-cell interconnection (laser/ultrasonic wire bonding, busbar laser welding), module-to-pack assembly, thermal management (liquid cooling cold plate, thermal interface material TIM dispensing), battery management system (BMS) harness/PCB integration, and pack sealing (IP67/IP6K9K, helium leak test <1×10⁻⁷ mbar·L/s). Fuel cell stack assembly (for FCEV) requires precise compression of 300–400 bipolar plates + MEAs (membrane electrode assemblies) with uniform pressure distribution. + +Tightening and process control is critical across all assembly operations, with DC electric nutrunners (transducerized, torque + angle monitoring) replacing pneumatic impact wrenches for precision joints. Tightening strategies span: torque control (T), torque control with angle monitoring (TA), angle control with torque monitoring (AT), and yield-point detection (gradient method). Process capability Cpk ≥1.67 is required for safety-critical joints (chassis, steering, brakes, seat belts). Statistical Process Control (SPC) monitors tightening curves in real-time; abnormal torque-angle signatures (cross-threading, bottoming, embrittlement) trigger immediate NOK rejection. + +Final assembly covers: chassis marriage (body drop to powertrain + suspension + subframe, automatic guided vehicle AGV synchronization at ±2 mm), cockpit module insertion (robotic loading through door opening, 10–15 connector couplings), windshield/backlight glazing (robotic PUR dispensing + vision-guided placement ±0.5 mm), fluid fill (brake fluid vacuum fill, coolant vacuum fill, AC refrigerant R-1234yf charge ±5 g, fuel fill), wheel alignment (toe/camber/caster laser measurement, ±0.05°), and headlamp aiming. + +End-of-Line (EOL) test validates every vehicle before shipment: roller dynamometer (AVL/MAHA, acceleration/braking/ABS/ESP test at 0–120 km/h), ADAS calibration (front camera + radar + LiDAR calibration targets at defined distances), water leak test (high-pressure shower 5–15 bar, 360° coverage, 3–8 min cycle), NVH audit (rolling road, microphone array, squeak-and-rattle detection), electrical function test (OBD-II, all ECUs, bus communication), and surface quality inspection (LED tunnel, automated optical inspection AOI, paint defect classification). + +Leading equipment and technology providers include: KUKA (robots, linear units, pulse welding), ABB (robots, SpotPack, ArcPack, FlexLoader), FANUC (robots, servo weld guns, iRVision), COMAU (robots, VersaRoll hemming, SmartDrive), ThyssenKrupp (assembly lines, test stands), Dürr (paint, final assembly, filling), Atlas Copco (DC nutrunners, Power Focus, Tensor, SQS3), Bosch Rexroth (tightening systems, Nexo, TS), Festo (pneumatics, servo presses, gantries), AVL / MAHA / HORIBA (chassis dyno / EOL test), Jenoptik / ProCam / Isra Vision (ADAS calibration / surface inspection), Ingersoll Rand / Desoutter / Stöger (tightening), TOX Pressotechnik / Böllhoff / Atlas Copco Henrob (SPR, FDS, clinching), TRUMPF / IPG Photonics / Coherent (laser welding), ESAB / Fronius / Lincoln Electric (arc welding). + +VDE currently lacks: +- BIW assembly line design (framing station geometry, clamping/locating pin layout, respot station distribution, takt time / JPH calculation, multi-model flexible manufacturing tooling changeover, hemming roller/table force, sealer bead profile) +- Welding process engineering (RSW welding lobe diagram, dynamic resistance curve, electrode cap wear rate, laser welding keyhole stability, MAG/MIG wire feed / voltage / travel speed) +- Mechanical joining design (SPR setting force, die geometry, FDS torque-speed profile, clinching button diameter, structural adhesive bead width/height, open time / cure time) +- Powertrain ICE assembly (piston ring end gap, bearing clearance, cylinder head TTY bolt torque-angle, timing drive correlation, leak test pressure decay rate, cold test torque signature) +- xEV electric drive and battery assembly (hairpin forming/bending/insertion, laser welding parameter window, rotor magnet polarity, battery module compression force, helium leak test, electrical isolation HiPot/IR test, formation cycling) +- DC tightening and process control (torque-angle curve analysis, joint classification A/B/C per VDI 2862, process capability Cpk/Cmk, dynamic torque vs. residual torque correlation, rundown strategy parameters) +- Final assembly (chassis marriage docking accuracy, cockpit module robotic insertion force, glazing bead profile, fluid fill vacuum level / leak-up rate, wheel alignment adjustment range, headlamp cutoff) +- EOL test (chassis dyno speed/torque verification, ADAS target alignment, water leak detection threshold, NVH dB(A)/sones limit, OBD diagnostic trouble code DTC scan, surface defect classification AI) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native automotive assembly equipment engine. + +--- + +## Detailed Requirements + +### 1. BIW Welding Line Design — Framing, Respot, Hemming, Sealer + +**Priority**: P1 + +#### 1.1 Geo-Station / Framing / Respot / Hemming / Flexible Manufacturing Systems + +``` +BIW assembly line architecture: + The BIW shop is typically organized as a series of sub-assembly + cells feeding the main framing line: + + Sub-assembly cells (parallel, pre-build): + ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ + │ Floor Pan │ │ Body Sides │ │ Closures │ + │ (front/mid/ │ │ (LH + RH, │ │ (doors, │ + │ rear pan) │ │ inner+outer│ │ hood, deck)│ + └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ + │ │ │ + └─────────────────┼──────────────────┘ + ▼ + ┌─────────────────┐ + │ Framing Station │ ← Main geo-station + │ (geometry set) │ Dimensional control + └────────┬────────┘ datum scheme + │ + ▼ + ┌─────────────────┐ + │ Respot Stations │ ← Add reinforcement welds + │ (typically 2–4 │ (redundant for crash) + │ respot cells) │ + └────────┬────────┘ + │ + ▼ + ┌─────────────────┐ + │ Finishing Line │ ← Stud welding, bracket + │ (fender/D-pillar│ attachment, MIG brazing, + │ roof/hood set) │ sealer, inspection + └─────────────────┘ + +Framing Station (Geo-Station): + The framing station is the most critical station in BIW because + it sets the geometric relationship (position + orientation) of all + major sub-assemblies relative to each other. The vehicle's entire + dimensional quality depends on this station. + + Framing fixture design: + Each sub-assembly is located by the 3-2-1 principle or N-2-1 + (for compliant sheet metal) locating scheme: + + 3-2-1 Locating Principle: + Primary datum A: 3 points define a plane (z-constraint: + pitch, roll, translation z) + Secondary datum B: 2 points define a line (y-constraint: + yaw, translation y) + Tertiary datum C: 1 point (x-constraint: translation x) + → Total: 6 DOF constrained (rigid body) + + N-2-1 (over-constrained) for compliant sheet metal: + Primary datum: N ≥ 3 points on plane (prevents sag) + Secondary datum: 2 points + Tertiary datum: 1 point + → Prevents gravity-induced deformation of thin panels + + Locating pin design: + Round pin + diamond pin pattern (2-pin location): + Round pin at master hole: constrains x and y + Diamond pin at slave hole: constrains rotation only + (absorbs hole-to-hole tolerance in one direction) + Pin diameter tolerance: hole Ø − 0.05 mm to hole Ø − 0.15 mm + Pin engagement depth: 5–10 mm (sufficient for repeatable location) + + Clamping: + Clamp force: 300–1,000 N per clamp (pneumatic or hydraulic) + Clamp sequence: locate first, then clamp (avoid forcing) + Clamp positions: near locating pins to avoid panel distortion + Clamp types: swing clamp, hook clamp, toggle clamp, magnetic + + Framing station configuration types: + Gate-type (traditional): + Side gates (LH + RH) swing in with body side tooling + Floor pan on shuttle/geometric pallet (geo-pallet) + Roof / header tooling descends from top + All tooling converges simultaneously → geometry locked + Typical gate weight: 2–8 tonnes per side + + Robotic framing (geo-pallet + robots): + Geo-pallet (precision transport pallet) carries floor pan + Robots (with grippers) pick body sides, roof from racks + Robots present parts to geo-pallet → laser vision guided + Advantages: flexible (model change by program), compact + + Framing station geometry accuracy: + Part-to-part gap: 0 ± 0.5 mm (before welding) + Part-to-part flush: 0 ± 0.5 mm + Dimensional variation: ±0.7 mm at critical datums + (6-sigma, Cp ≥ 1.33) + +Respot Station: + After framing station sets geometry with spot welds at critical + datum locations (~10–20% of total welds), respot stations add + the remaining reinforcement welds for structural integrity. + + Respot station configuration: + Typically 2–4 cells after framing + Each cell with 4–8 robots (LH + RH sides) + Weld count per respot cell: 200–600 spots + Takt time per cell: ≤ framing station takt time + + Weld distribution planning: + Total weld count N_total = 3,000–6,000 for full BIW + Framing station: N_frame ≈ 300–600 (10% for geometry) + Respot stations: N_respot = N_total − N_frame (90% for strength) + + Weld pitch (spacing between adjacent spot welds): + Steel: 25–60 mm (typically 30–45 mm) + Aluminum: 20–40 mm + Minimum edge distance: 8–12 mm from sheet edge + + Multi-model production: + Flexible tooling: servo-driven adjustable locators + Batch size: as low as 1 (mass customization) + Model changeover time: <30 s (automatic, no manual setup) + Commonization: shared geo-pallet, model-specific grippers + RFID tag on carrier → PLC reads model → fixture auto-adjusts + +Hemming: + Hemming joins outer panel to inner panel at door, hood, decklid, + and fender openings. The outer panel flange is folded (hemmed) + over the inner panel edge, creating a smooth, safe edge. + + Hemming process sequence: + Stage 1 — Pre-hem: flange bent to ~45° + Pre-hem angle: 30–50° (typically 45°) + Pre-hem die angle matches + Stage 2 — Final hem: flange flattened to ~0° + Final hem angle: 0–2° (slight springback) + Hem thickness = 2 × t_outer + t_inner + adhesive gap + + Hemming methods: + Table-top hemming: + Hemming bed (lower die) + hemming tool (upper die) + Hydraulic press: 100–300 tonnes + Fast cycle time: 5–10 s per edge + Suited for: high-volume, dedicated model + + Roller hemming (robotic): + Hemming roller on robot, follows panel contour + Roller force: 1,500–3,500 N + Roller diameter: 30–60 mm + Feed rate: 200–500 mm/s + Multiple passes: pre-hem roller → final hem roller + Advantages: flexible (different models with same robot), + lower investment (no dedicated press/die) + Disadvantage: slower cycle time (20–40 s per edge) + + Robot-guided table-top: + Robot loads panel into hemming table → table hem → robot unloads + Combines flexibility of robot + speed of table hemming + + Hem quality parameters: + Hem flange radius (outer): <1.5 mm (no sharp edge) + Hem gap (between inner and outer at hem fold): <0.3 mm + Hem waviness (along length): <0.3 mm peak-to-peak + Hem roll-in (curvature of outer panel at hem edge): <0.5 mm + No cracks, no splits in hem (visual + dye penetrant inspection) + +Sealer Application: + Sealers (PVC, butyl, epoxy) applied between panels for: + Anti-flutter (hood, door outer-to-inner) + Anti-corrosion (hem flange edge, joint sealing) + NVH damping + Structural (body side to roof joint) + + Sealer application methods: + Robotic dispensing with precision nozzle: + Bead diameter: 1–5 mm (controlled by nozzle Ø + flow rate) + Bead positioning accuracy: ±0.5 mm + Flow rate control: gear pump or progressive cavity pump + Material: 1K or 2K (meter-mix at nozzle) + Temperature control: 20–40°C (viscosity-dependent) + + Sealer bead geometry: + Trapezoidal or triangular cross-section + After hemming: sealer fills hem cavity, prevents water ingress + Squeeze-out after hem: 0.5–2 mm beyond hem edge (trim later) + + Swirl / spray sealer: + For large area coverage (floor pan seams, wheel arch): + Swirl pattern: 10–30 mm diameter, overlapping swirls + Coverage: 100% (no pinholes for water-tightness) + +Flexible Manufacturing System (FMS) for BIW: + Layout types: + Linear (in-line): stations arranged sequentially + Ring / loop: carriers circulate on oval track + Matrix / cell: cells arranged in matrix, AGV moves body + + Takt time calculation: + T_takt [s] = Planned_production_time_per_shift / Required_output_per_shift + Example: 27,000 s / 450 vehicles = 60 s/vehicle (60 JPH) + + Number of parallel stations N for operation taking t_op: + N = ceil(t_op / T_takt) + + Carrier / conveyor systems: + Roller bed: friction or powered roller + Skid / pallet: body mounted on skid, conveyed on roller + Overhead EMS (Electric Monorail System): body suspended + AGV (Automated Guided Vehicle): free navigation, magnetic/optical + Shuttle: high-speed linear transfer (0.5–2 m/s) + + Buffer capacity planning: + Between sub-sections: 1–3 buffer positions (decouple stoppages) + Buffer accumulation: conveyor length / pitch + Buffer strategy: FIFO (first-in-first-out), bypass for rework +``` + +#### 1.2 C++ API: BIW Welding Line Design + +```cpp +namespace vde::automotive_assembly::biw_welding { + +enum class LocatingScheme { ThreeTwoOne, NTwoOne_OverConstrained }; +enum class ClampType { SwingClamp, HookClamp, ToggleClamp, MagneticClamp, VacuumCup }; +enum class FramingType { GateType, RoboticGeoPallet, Hybrid }; +enum class HemmingMethod { TableTop, RollerHemming_Robotic, RobotGuidedTableTop }; +enum class SealerType { AntiFlutter_PVC, AntiCorrosion_PVC, Butyl, Structural_Epoxy, NVH_Damping }; +enum class ConveyorType { RollerBed, SkidPallet, OverheadEMS, AGV_Magnetic, ShuttleLinear, FrictionRoller }; +enum class ProductionLayout { Linear_Inline, RingLoop, MatrixCell }; + +struct FixtureSpec { + LocatingScheme scheme = LocatingScheme::ThreeTwoOne; + int N_primary_locators = 3; // N points on primary datum + int N_secondary_locators = 2; // secondary datum points + bool diamond_pin_slave = true; // round + diamond pin pattern + double pin_diameter_mm = 12.0; + double pin_diameter_tolerance_mm = 0.05; // hole Ø − tolerance + double pin_engagement_depth_mm = 8.0; + double clamp_force_N = 500.0; // per clamp + int num_clamps = 8; + ClampType clamp_type = ClampType::SwingClamp; + std::string clamp_sequence_csv; // e.g., "1,2,3,5,4,6,7,8" +}; + +struct FramingStationSpec { + FramingType type = FramingType::GateType; + int num_sub_assemblies = 4; // floor, LH side, RH side, roof + double target_dimensional_tolerance_mm = 0.7; + double target_gap_mm = 0.5; // part-to-part gap + double target_flush_mm = 0.5; + double cycle_time_s = 60.0; + FixtureSpec fixture_floor_pan; + FixtureSpec fixture_body_side_lh; + FixtureSpec fixture_body_side_rh; + FixtureSpec fixture_roof; + double gate_weight_tonne = 5.0; // per side gate + int num_robots = 0; // for robotic framing + bool laser_vision_guidance = false; + std::set compatible_models; // multi-model capability + double model_changeover_time_s = 25.0; +}; + +struct RespotStationSpec { + int num_cells = 3; // respot cells after framing + int robots_per_cell = 6; + int welds_per_cell = 400; + int total_respot_welds = 1200; + double weld_pitch_mm = 40.0; // spacing between spots + double edge_distance_mm = 10.0; + double cycle_time_s = 58.0; + std::map robots_per_cell_side; // {"LH":3, "RH":3} +}; + +struct HemmingSpec { + HemmingMethod method = HemmingMethod::RollerHemming_Robotic; + double outer_panel_thickness_mm = 0.7; + double inner_panel_thickness_mm = 0.7; + double pre_hem_angle_deg = 45.0; + double final_hem_angle_deg = 1.5; + double flange_length_mm = 8.0; // pre-hem flange + double hem_thickness_target_mm = 2.3; // 2×t_outer + t_inner + gap + // Table-top hem + double press_force_tonne = 200.0; + double table_cycle_time_s = 8.0; + // Roller hemming + double roller_force_N = 2500.0; + double roller_diameter_mm = 45.0; + double roller_feed_rate_mm_s = 350.0; + int num_roller_passes = 2; // pre-hem + final + // Quality + double max_flange_radius_mm = 1.5; + double max_hem_gap_mm = 0.3; + double max_hem_waviness_mm = 0.3; + double max_roll_in_mm = 0.5; +}; + +struct SealerApplicationSpec { + SealerType type = SealerType::AntiFlutter_PVC; + double bead_diameter_mm = 3.0; + double bead_position_accuracy_mm = 0.5; + double flow_rate_ml_s = 2.0; // dispensing rate + double robot_speed_mm_s = 300.0; // TCP speed during dispensing + double material_temp_C = 25.0; + double viscosity_Pa_s = 50.0; // at application temp + double pot_life_min = 30.0; // 2K material working time + // Swirl mode + bool swirl_mode = false; + double swirl_diameter_mm = 20.0; + double swirl_pitch_mm = 15.0; // overlap between swirls + // Quality + double bead_height_mm = 2.0; + double bead_width_mm = 4.0; + double squeeze_out_after_hem_mm = 1.5; +}; + +struct FMSLayoutSpec { + ProductionLayout layout = ProductionLayout::Linear_Inline; + double takt_time_s = 60.0; + int jobs_per_hour = 60; + int num_stations = 45; + ConveyorType conveyor = ConveyorType::SkidPallet; + double conveyor_speed_m_s = 0.3; + double skid_pitch_mm = 5000.0; // distance between carriers + int buffer_positions_between_sections = 2; + double agv_speed_m_s = 1.0; + double agv_positioning_accuracy_mm = 2.0; + int num_agvs = 8; + std::set vehicle_models; + bool random_sequence_capable = true; // any model in any order +}; + +struct BIWLinePerformance { + double actual_jph = 0.0; + double achieved_takt_s = 0.0; + double framing_dimensional_cpk = 0.0; // Cp on critical datums + double part_gap_mean_mm = 0.0; + double part_gap_sigma_mm = 0.0; + double part_flush_mean_mm = 0.0; + double part_flush_sigma_mm = 0.0; + double model_changeover_time_s = 0.0; + double line_uptime_pct = 0.0; // OEE availability + double hem_crack_count_per_1000 = 0.0; + double sealer_coverage_pct = 0.0; + int completed_welds = 0; + int missing_weld_count = 0; +}; + +FixtureSpec design_fixture_3_2_1(int N_primary, double panel_thickness_mm, bool over_constrained); +FixtureSpec design_locating_pins(double hole_diameter_mm, double hole_tolerance_mm); +FramingStationSpec design_framing_station(FramingType type, double takt_time_s, const std::set& models); +RespotStationSpec design_respot_stations(int total_welds, int welds_per_robot, double takt_time_s); +HemmingSpec design_hemming_process(HemmingMethod method, double outer_t_mm, double inner_t_mm); +SealerApplicationSpec design_sealer_bead(SealerType type, double bead_dia_mm, double robot_speed_mm_s); +FMSLayoutSpec design_fms_layout(ProductionLayout layout, double takt_s, int num_models); + +BIWLinePerformance simulate_biw_line_throughput(const FMSLayoutSpec& fms, const FramingStationSpec& frame, + const RespotStationSpec& respot); +BIWLinePerformance simulate_framing_geometry(const FramingStationSpec& frame, int num_cycles); +BIWLinePerformance simulate_hemming_quality(const HemmingSpec& hem, std::string panel_type); +BIWLinePerformance simulate_sealer_application(const SealerApplicationSpec& sealer, double bead_length_mm); + +double calculate_takt_time(double planned_production_sec, int required_units); +int calculate_parallel_stations(double operation_time_s, double takt_s); +double calculate_hem_thickness(double t_outer_mm, double t_inner_mm, double adhesive_gap_mm); +double calculate_weld_pitch_min(double sheet_thickness_mm, std::string material); +double calculate_buffer_capacity(int stations_upstream, int stations_downstream, double mtbf_s, double mttr_s); + +} // namespace vde::automotive_assembly::biw_welding +``` + +--- + +### 2. Welding Processes — RSW, Laser, MAG/MIG Arc, Projection + +**Priority**: P1 + +#### 2.1 Resistance Spot Welding (DC/MFDC), Laser Welding, Arc Welding, Projection Welding + +``` +Resistance Spot Welding (RSW) — Steel: + RSW joins overlapping sheet metal by passing high electric + current through copper electrodes pressing on the sheets. + Joule heating melts the interface to form a weld nugget. + + RSW power system evolution: + AC (50/60 Hz, older): transformer at line frequency, + heavy, poor power factor + MFDC (Medium Frequency Direct Current, 1,000 Hz): + Inverter → rectifier → DC output + Benefits: lighter transformer, power factor ~0.95, + closed-loop current regulation, reduced electrode wear + Servo weld gun: servo motor replaces pneumatic cylinder + for electrode force control → programmable force profile + + MFDC RSW process parameters (steel, 2 × 0.7 mm): + Welding current I_w: 6–12 kA (RMS) + Electrode force F_e: 2–5 kN + Weld time t_w: 100–400 ms (10–40 cycles at 50 Hz AC equivalent) + Squeeze time t_sq: 200–600 ms (force build-up before current) + Hold time t_h: 200–600 ms (force maintained for solidification) + Electrode tip diameter: 5–8 mm (for sheet thickness 0.6–2.0 mm) + + Weld nugget formation — Joule heating: + Q = I_w² × R_total × t_w [J] + Where: + R_total = R_contact + R_bulk_sheets + R_contact + R_contact ≈ 50–200 μΩ (highest resistance, most heat) + R_bulk ≈ 10–50 μΩ (per sheet) + Dynamic resistance curve: + Phase 1 (t = 0–20 ms): R falls (asperity softening, contact area ↑) + Phase 2 (t = 20–100 ms): R rises (bulk resistivity ↑ with temp) + Phase 3 (t = 100+ ms): R levels or falls (melting, nugget growth) + + Weld lobe (process window): + Current (I_w) vs. time (t_w) diagram: + Lower bound: minimum nugget diameter (4×√t for steel, 5×√t for Al) + I_min for acceptable tensile shear strength + Upper bound: expulsion limit (molten metal ejection) + I_max before surface flash and electrode sticking + Acceptable weld zone width: ΔI ≈ 1.5–3.0 kA for steel + + Weld lobe width (current range for acceptable welds): + ΔI = I_expulsion − I_min_nugget [kA] + Target: ΔI ≥ 1.5 kA (robust process) + Lobe narrows with: coating (Zn → lower melting point), + electrode wear, poor fit-up + + Electrode cap life management: + Cap wear mechanisms: alloying (Zn from galvanized coating), + deformation (mushrooming), oxidation + Typical cap life: 500–2,000 welds per cap (galvanized steel), + 2,000–5,000 (bare steel), 200–500 (aluminum) + Cap dressing: tip dressing cutter restores dome profile + Dressing frequency: every 100–300 welds (programmable) + Stepper function: current increases incrementally to compensate + for increasing tip diameter (maintains current density) + + RSW quality metrics: + Nugget diameter d_n [mm]: + d_n ≥ 4 × √t (for steel, t = single sheet thickness) + d_n ≥ 5 × √t (for aluminum) + Tensile shear strength (TSS): + F_TSS > specified minimum per AWS D8.9 / ISO 18278-1 + Cross-tension strength (CTS): + F_CTS > specified minimum + No expulsion, no cracks, no porosity in nugget cross-section + Indentation depth: <20% of single sheet thickness + Electrode sticking: must release cleanly after hold + +Laser Welding — Automotive BIW: + Laser sources: fiber laser (Yb-doped, 1,070 nm, wall-plug efficiency >35%), + disc laser (Yb:YAG), diode laser + + Keyhole welding mode (deep penetration): + Laser power P_L: 2–8 kW for automotive steel (0.6–2.0 mm) + Welding speed v_w: 3–8 m/min (butt/edge joint), 2–5 m/min (lap/fillet) + Focal spot diameter d_f: 0.2–0.6 mm (fiber delivery, 100–300 μm fiber) + Assist gas: Ar, He, N₂ at 10–20 L/min (shielding + plasma suppression) + + Keyhole formation threshold: + I_P_threshold > 10^6 W/cm² (intensity at focal spot) + P_L / (π × d_f² / 4) > 10^6 W/cm² + + Joint configurations: + Remote laser welding (scanner): galvo mirror, 500–1,200 mm working distance + Laser brazing: CuSi₃ or CuAl8 filler wire, roof-to-body-side joint + Laser-arc hybrid: laser + MAG, bridge gaps up to 1.5 mm + + Laser weld quality: + Weld penetration: 80–120% of top sheet (full penetration lap joint) + Porosity: <2% by X-ray / CT + Humping / undercut: not permitted (class C per ISO 13919-1) + Spatter: <5 particles per 100 mm weld length + Weld bead width: 1.0–2.5 mm (depending on sheet thickness) + Heat affected zone (HAZ) width: <2 mm + +MAG/MIG Arc Welding: + MAG (Metal Active Gas): CO₂ or Ar/CO₂ mix for steel + MIG (Metal Inert Gas): Ar for aluminum / stainless + + Process parameters: + Wire feed speed (WFS): 3–15 m/min (sets weld current) + Voltage U: 18–35 V (adjusts arc length) + Travel speed (TS): 30–80 cm/min + Shielding gas flow: 12–20 L/min + CTWD (Contact Tip to Work Distance): 12–20 mm + + Weld current relationship to WFS: + I ≈ k × WFS (k depends on wire diameter) + For 1.0 mm wire: I ≈ 40–60 A per m/min WFS + + Heat input: + Q = (60 × U × I) / (1000 × TS) [kJ/cm] + Typical: 2–8 kJ/cm for automotive thin sheet + Q too high → burn-through, too low → lack of fusion + + Deposition rate: + ṁ = (π × d_wire² / 4) × WFS × ρ_wire [kg/hr] + For 1.0 mm steel wire at 10 m/min: ~3.7 kg/hr + + Transfer modes: + Short-circuit (dip transfer): low current, thin sheet, positional + Spray transfer: high current, flat position, smooth bead + Pulsed spray: one droplet per pulse, reduced spatter, all-position + CMT (Cold Metal Transfer): controlled wire retraction, ultra-low + heat input, ideal for thin sheet + dissimilar metal + + Arc welding quality: + Visual: no cracks, no lack of fusion, no undercut >0.5 mm + Penetration: full joint penetration (FJP) or specified partial + Fillet weld leg length: specified by design, ±1 mm + Reinforcement: 0–1.5 mm above base metal + Spatter adhesion: no spatter on class-A (visible) surfaces + Porosity: <1% by X-ray for structural welds + +Projection Welding: + Weld nuts, studs, brackets with embossed projections onto sheet metal + Projection concentrates current → localized heating → collapse → weld + + Process: + Projection height: 0.5–2.0 mm + Projection number: 3–4 per nut (triangular/square pattern) + Welding current: 8–20 kA (depends on projection area) + Electrode force: 1–5 kN (higher than spot weld) + Weld time: 50–200 ms + Projection collapse: initial height → 0 (full collapse for weld) + + Quality: + Torque test: weld nut withstands specified torque without fracture + Push-out test: bracket withstands specified force without weld failure + Nugget formation: visible on cross-section after projection collapse +``` + +#### 2.2 C++ API: Welding Processes + +```cpp +namespace vde::automotive_assembly::welding_processes { + +enum class RSWPowerType { AC_50Hz, MFDC_1000Hz, CapacitorDischarge }; +enum class ElectrodeCapMaterial { CuCrZr, CuCoBe, CuW, RWMA_Class2 }; +enum class LaserType { Fiber_1070nm, Disc_1030nm, Diode_800_980nm, CO2_10600nm }; +enum class ArcTransferMode { ShortCircuit, Spray, PulsedSpray, CMT, PulseMultiControl }; +enum class ShieldingGas { CO2_100pct, ArCO2_80_20, ArCO2_92_8, Ar_100pct, ArHe_70_30 }; +enum class WeldJointType { LapJoint, ButtJoint, EdgeJoint, FilletTJoint, CoachJoint }; + +struct RSWSpec { + double current_kA = 8.0; // welding current + double electrode_force_kn = 3.0; + double weld_time_ms = 200.0; // current on time + double squeeze_time_ms = 300.0; + double hold_time_ms = 300.0; + double electrode_tip_diameter_mm = 6.0; + ElectrodeCapMaterial cap_material = ElectrodeCapMaterial::CuCrZr; + RSWPowerType power_type = RSWPowerType::MFDC_1000Hz; + double sheet_thickness_top_mm = 0.7; + double sheet_thickness_bottom_mm = 0.7; + std::string material_grade_top = "DP600"; // dual-phase steel + std::string material_grade_bottom = "DP600"; + std::string coating = "GI_Zn_60g"; // galvanized + int num_sheets = 2; // 2 or 3 sheet stack + double target_nugget_diameter_mm = 4.5; // ≥4√t for steel + int dressing_interval_welds = 250; + double stepper_current_increment_kA = 0.1; // per step + int stepper_interval_welds = 50; +}; + +struct LaserWeldSpec { + LaserType type = LaserType::Fiber_1070nm; + double power_kW = 4.0; + double welding_speed_m_min = 5.0; + double focal_diameter_um = 300.0; // spot size + double fiber_diameter_um = 200.0; + double working_distance_mm = 800.0; + std::string joint_config = "lap_joint"; + std::string assist_gas = "Ar"; + double gas_flow_L_min = 15.0; + double sheet_thickness_top_mm = 0.7; + double sheet_thickness_bottom_mm = 1.2; + std::string material_1 = "22MnB5"; // hot-stamped boron steel + std::string material_2 = "22MnB5"; + bool remote_scanner = true; + double weld_length_mm = 25.0; // per stitch + int num_stitches_per_part = 8; + double max_gap_mm = 0.15; // allowable fit-up gap +}; + +struct ArcWeldSpec { + ArcTransferMode transfer_mode = ArcTransferMode::PulsedSpray; + ShieldingGas gas = ShieldingGas::ArCO2_92_8; + double wire_diameter_mm = 1.0; + double wire_feed_speed_m_min = 8.0; + double voltage_V = 24.0; + double travel_speed_cm_min = 50.0; + double gas_flow_L_min = 16.0; + double ctwd_mm = 15.0; // contact tip to work distance + std::string filler_wire = "ER70S-6"; + WeldJointType joint_type = WeldJointType::FilletTJoint; + double fillet_leg_length_mm = 4.0; + double sheet_thickness_mm = 2.0; + bool CMT_mode = false; + double weld_length_mm = 120.0; + double heat_input_target_kJ_cm = 4.0; +}; + +struct ProjectionWeldSpec { + std::string part_type = "M8_weld_nut"; + int num_projections = 3; + double projection_height_mm = 1.0; + double welding_current_kA = 14.0; + double electrode_force_kn = 3.5; + double weld_time_ms = 120.0; + double squeeze_time_ms = 400.0; + double pushout_force_min_kN = 8.0; + double torque_min_Nm = 25.0; +}; + +struct WeldQualityResult { + // RSW + double actual_nugget_diameter_mm = 0.0; + double tensile_shear_strength_kN = 0.0; + double cross_tension_strength_kN = 0.0; + double indentation_depth_pct = 0.0; // % of sheet thickness + bool expulsion_occurred = false; + int weld_count_since_dressing = 0; + double dynamic_resistance_peak_uOhm = 0.0; + // Laser + double laser_penetration_mm = 0.0; + double laser_porosity_pct = 0.0; + int laser_spatter_count_per_100mm = 0; + // Arc + double arc_heat_input_kJ_cm = 0.0; + double fillet_leg_actual_mm = 0.0; + double weld_reinforcement_mm = 0.0; + // Projection + double projection_collapse_mm = 0.0; + double pushout_force_actual_kN = 0.0; + // Common + bool visual_pass = true; + bool no_cracks = true; + bool fusion_complete = true; +}; + +RSWSpec design_rsw_parameters(double total_thickness_mm, std::string material_grade, std::string coating); +RSWSpec design_rsw_lobe(RSWPowerType power, double t_top_mm, double t_bottom_mm); +LaserWeldSpec design_laser_weld(LaserType type, double total_thickness_mm, std::string material); +LaserWeldSpec design_laser_brazing(double power_kW, std::string filler_wire); +ArcWeldSpec design_arc_weld(ArcTransferMode mode, double wire_dia_mm, double fillet_leg_mm); +ArcWeldSpec design_cmt_weld(double wire_dia_mm, double sheet_t_mm, std::string material); +ProjectionWeldSpec design_projection_weld(std::string nut_bolt_size, double sheet_t_mm); + +WeldQualityResult simulate_rsw_nugget(const RSWSpec& spec, int weld_number_in_cap_life); +WeldQualityResult simulate_laser_weld(const LaserWeldSpec& spec, double fitup_gap_mm); +WeldQualityResult simulate_arc_weld(const ArcWeldSpec& spec); +WeldQualityResult simulate_projection_weld(const ProjectionWeldSpec& spec); + +double calculate_rsw_heat_input(double I_kA, double R_uOhm, double t_ms); +double calculate_rsw_nugget_diameter_min(double sheet_thickness_mm, std::string material); +double calculate_laser_intensity(double power_kW, double spot_diameter_um); +double calculate_arc_heat_input(double U_V, double I_A, double travel_speed_cm_min); +double calculate_arc_deposition_rate(double wire_dia_mm, double wfs_m_min, double density_kg_m3); + +} // namespace vde::automotive_assembly::welding_processes +``` + +--- + +### 3. Mechanical Joining — SPR, FDS, Clinching, Blind Rivet, Structural Adhesive + +**Priority**: P1 + +#### 3.1 Self-Pierce Riveting, Flow Drill Screw, Clinching, Blind Rivet, Structural Adhesive + +``` +Self-Pierce Riveting (SPR): + SPR joins two or more sheets by driving a semi-tubular rivet + through the top sheet(s) into the bottom sheet without + pre-drilling. The rivet pierces the top sheet and flares into the + bottom sheet, forming a mechanical interlock. + + SPR process: + Setting cycle: + 1. Clamp: clamping ring descends, holds sheets + 2. Punch: punch pushes rivet → pierces top sheet + 3. Flare: rivet tail contacts die → flares outward into bottom sheet + 4. Release: clamping ring + punch retract + + SPR setting parameters: + Setting force F_set: 30–60 kN (varies with material/thickness) + Setting speed: 100–300 mm/s + Rivet hardness: 280–480 HV (depends on material being joined) + Steel rivet (boron steel, hardened to ~480 HV) for aluminum sheets + Aluminum rivet for aluminum-only stacks (lower hardness) + Rivet dimensions: + Length: 3–8 mm (depends on total stack thickness) + Body diameter: 3–5 mm + Head diameter: 5–8 mm + Die geometry: + Die cavity shape: flat, cone, pip (controls rivet flare) + Die depth: controls degree of flaring + Die diameter: 6–10 mm (larger than rivet body) + + SPR joint design rules: + Bottom sheet: must be ductile (elongation >10%) for flaring + Aluminum: excellent bottom sheet + Steel: high-strength steel >800 MPa difficult as bottom sheet + Stack sequence critical: + Thick-to-thin: thick top, thin bottom (standard) + Thin-to-thick: requires careful parameter tuning + Three sheets: middle sheet must be pierceable + Total stack thickness: 1.5–7.0 mm (typical SPR range) + Minimum edge distance: 6–8 mm from rivet center + Minimum rivet-to-rivet pitch: 15–25 mm + + SPR joint quality metrics: + Interlock distance d_interlock [mm]: + Radial distance between rivet tail flare and rivet body wall + Minimum: 0.2–0.4 mm (depends on sheet thickness) + Target: as large as possible without rivet leg cracking + Head height h_head [mm]: + Rivet head flush or below top sheet surface + Target: 0 to −0.3 mm (slightly below surface) + Bottom sheet thickness at rivet tip t_bottom_min [mm]: + Remaining material below rivet < 0.2 mm = risk of cracking + Target: >0.2 mm remaining (no breakthrough) + No cracks in rivet legs (visual inspection) + No cracking of bottom sheet (dye penetrant) + Cross-section verification: 1 per setup, 1 per 1,000 joints + + SPR setting force curve analysis: + Force vs. displacement stages: + Stage 1 (clamping): force rises as clamp ring contacts + Stage 2 (piercing): sharp force increase as rivet pierces top sheet + Stage 3 (flaring): force plateaus as rivet tail expands into die + Stage 4 (bottoming): force spikes as rivet reaches die bottom + Monitoring: force-displacement envelope → detect anomalies + Low force in piercing → missing rivet, soft material + High force spike → wrong stack, hard material, double rivet + +Flow Drill Screw (FDS): + FDS joins sheets by rotating a self-tapping screw at high speed, + generating frictional heat to soften the material, then driving + the screw through to form threads in the softened material. + + FDS process sequence: + 1. Approach: screw tip contacts top sheet at low force + 2. Friction heating: high RPM (2,000–6,000 rpm), low axial force + Tip temperature reaches 400–600°C (steel/aluminum softening) + 3. Penetration: screw penetrates through all sheets + 4. Thread forming: RPM reduces, axial force increases + Threads formed in thermally softened material + 5. Tightening: screw head seats on top sheet, torque cutoff + + FDS parameters: + Spindle speed: 2,000–6,000 rpm (heating phase), + 500–2,000 rpm (forming phase) + Axial force: 0.5–2.0 kN (heating), 2.0–5.0 kN (forming) + Screw dimensions: + M4, M5, M6 (metric), length: 12–30 mm + Through-hole clearance in top sheet: none (self-piercing) + + FDS joint design: + Suitable for: aluminum-to-steel, aluminum-to-aluminum, + steel-to-aluminum (with care), CFRP (reinforced polymer) + Total stack thickness: 1.5–10 mm + Pre-hole: sometimes required for hard materials (e.g., boron steel) + Minimum edge distance: 8–12 mm + + FDS quality: + Screw head flush or slightly recessed (0 to −0.5 mm) + No spinning / stripped threads + Torque verification: residual torque > specified minimum + Cross-section: thread engagement in bottom sheet >2 full threads + +Clinching (Press Joining): + Clinching joins sheets by local plastic deformation without + consumables (no rivet, no screw). A punch pushes material into + a die cavity, forming an interlocking button. + + Clinching variants: + Round (TOX®) clinching: + Round punch + round die with sliding lamellae + Opening lamellae allow material flow → interlock + Button diameter: 6–12 mm + + Rectangular clinching: + Rectangular punch, higher strength than round + Suited for: unidirectional load (shear) + + Clinching parameters: + Punch diameter: 4–8 mm + Punch force: 15–50 kN + Die depth: 2–4 mm + Die anvil: fixed or movable lamellae + + Clinching quality: + Button diameter D_btn: 6–12 mm (≥ punch Ø) + Neck thickness t_n [mm]: minimum material thickness at interlock + t_n ≥ 0.3 × t_bottom (minimum residual thickness, prevents tear) + Bottom thickness t_b [mm]: remaining material under punch + t_b ≥ 0.2 mm (no breakthrough) + Interlock distance: radial overlap between sheets + Visual: no cracks in neck or bottom + + Clinching limitations: + Maximum total stack: ~6 mm (round), ~10 mm (rectangular) + Hard materials (>600 MPa): difficult, limited ductility + Sheet elongation requirement: >12% for bottom sheet + One-side access: punch side → die side (two-side access required) + +Blind Rivet: + Blind rivet (pop rivet) joins sheets from one side only, used + where access to both sides is impossible (closed sections). + + Blind rivet types: + Standard: aluminum body + steel mandrel + Structural: Monobolt, Huck (high strength, swaged collar) + Multi-grip: compensates for variable stack thickness + Hemlok: special head for thin sheet (large bearing area) + + Setting process: + 1. Rivet inserted into pre-drilled/punched hole + 2. Setting tool pulls mandrel → body expands on blind side + 3. Mandrel breaks at break-notch at specified tensile load + 4. Mandrel head retained in set rivet (sealed or lost mandrel) + + Blind rivet quality: + Mandrel break load: within specified range + Rivet body expansion: filling hole completely + No damage to sheets (no cracking around hole) + Mandrel head retained (no rattling) + +Structural Adhesive Bonding: + Adhesives provide continuous bond lines between panels, improving + stiffness, crash energy absorption, fatigue life, and NVH. + + Adhesive types in BIW: + 1K Epoxy (heat-cured): + Curing: 160–200°C, 15–30 min (paint bake oven) + Lap shear strength: 20–35 MPa (steel) + Excellent: adhesion, corrosion resistance, durability + Limitation: requires paint bake for cure, wash-off risk before cure + + 2K Acrylic / PUR (fast-cure / room-temp cure): + Working time (pot life): 2–20 min + Cure time: 10–60 min at room temp, faster with heat + Lap shear: 15–25 MPa + Advantage: strength before paint bake (no wash-off) + + Rubber-based (anti-flutter): + Low modulus, vibration damping between outer-inner panel + Lap shear: 1–5 MPa (system is stiff enough without adhesive) + Function: NVH damping, not structural + + Adhesive application: + Robotic dispensing: + Bead diameter: 1.5–5 mm (closed-loop flow control) + Bead geometry: triangular or trapezoidal, wider at base + Robot TCP speed: 100–600 mm/s + Swirl spraying: for large area coverage + + Adhesive bond line: + Width: 8–20 mm (after clamping/hemming squeeze-out) + Bond line thickness: 0.2–1.0 mm (controlled by spacer beads, + glass beads in adhesive, 0.2–0.3 mm diameter) + + Adhesive joint strength: + Lap shear joint: + τ = F / (w × L) [MPa] + Where: w = bond width, L = bond overlap length + Failure mode: cohesive (within adhesive) preferred over + adhesive (interface) failure + + Mixed joint (adhesive + SPR / RSW): + Synergy: adhesive loads continuous, mechanical fastener + loads discrete points + Weld-bonding / rivet-bonding: adhesive applied first, + then welding/riveting through uncured adhesive + + Quality control: + Bead presence detection: vision system (before hemming/closing) + Bead geometry: laser line profile sensor (width × height) + Cure monitoring: DSC (differential scanning calorimetry) for + degree of cure, glass transition temperature T_g + Destructive test: lap shear coupons (1 per shift), peel test + Wash-off resistance: bead integrity after pre-treatment + (degreasing, phosphating/Zn-phosphate, e-coat dip) +``` + +#### 3.2 C++ API: Mechanical Joining + +```cpp +namespace vde::automotive_assembly::mechanical_joining { + +enum class SPRRivetMaterial { BoronSteel_480HV, StainlessSteel, Aluminum_6061 }; +enum class SPRDieType { FlatBottom, ConeCavity, PipDie, FlatWithRing }; +enum class FDSMaterial { CarbonSteel_ZincPlate, StainlessSteel_A2, StainlessSteel_A4 }; +enum class ClinchingType { Round_TOX, Rectangular, OpenDie }; +enum class BlindRivetType { Standard_Alum, Structural_Huck, MultiGrip, Hemlok }; +enum class AdhesiveType { Epoxy_1K_HeatCure, Acrylic_2K, PUR_2K, Rubber_AntiFlutter }; +enum class AdhesiveFailureMode { Cohesive, Adhesive_Interface, SubstrateFailure, Mixed }; + +struct SPRSpec { + double setting_force_kN = 40.0; + double setting_speed_mm_s = 200.0; + SPRRivetMaterial rivet_material = SPRRivetMaterial::BoronSteel_480HV; + double rivet_length_mm = 5.0; + double rivet_body_diameter_mm = 3.3; + double rivet_head_diameter_mm = 5.3; + SPRDieType die_type = SPRDieType::ConeCavity; + double die_diameter_mm = 8.0; + double die_depth_mm = 1.6; + int num_sheets = 2; + double sheet_top_thickness_mm = 1.5; + double sheet_bottom_thickness_mm = 2.0; + std::string material_top = "AA5754"; + std::string material_bottom = "AA5182"; + std::string stack_orientation = "thick_to_thin"; // or "thin_to_thick" + double min_edge_distance_mm = 7.0; + double min_rivet_pitch_mm = 20.0; +}; + +struct FDSSpec { + double spindle_rpm_heating = 4000.0; + double spindle_rpm_forming = 1500.0; + double axial_force_heating_kN = 1.0; + double axial_force_forming_kN = 3.5; + std::string screw_size = "M5"; + double screw_length_mm = 22.0; + FDSMaterial screw_material = FDSMaterial::CarbonSteel_ZincPlate; + double sheet_top_thickness_mm = 2.0; + double sheet_bottom_thickness_mm = 1.5; + std::string material_top = "AA6016"; + std::string material_bottom = "DP800"; + bool pre_hole_required = false; + double pre_hole_diameter_mm = 0.0; + double min_edge_distance_mm = 10.0; +}; + +struct ClinchingSpec { + ClinchingType type = ClinchingType::Round_TOX; + double punch_diameter_mm = 6.0; + double punch_force_kN = 30.0; + double die_depth_mm = 2.8; + bool movable_lamellae = true; // for round clinch + int num_sheets = 2; + double sheet_top_thickness_mm = 0.7; + double sheet_bottom_thickness_mm = 1.5; + std::string material_top = "DC06"; + std::string material_bottom = "DP600"; + double min_edge_distance_mm = 8.0; +}; + +struct BlindRivetSpec { + BlindRivetType type = BlindRivetType::Standard_Alum; + double rivet_diameter_mm = 4.8; + double rivet_grip_range_min_mm = 2.0; + double rivet_grip_range_max_mm = 6.0; + double mandrel_break_load_N = 2500.0; + double hole_diameter_mm = 5.0; + int num_sheets = 2; + double total_stack_thickness_mm = 4.0; +}; + +struct AdhesiveBondSpec { + AdhesiveType type = AdhesiveType::Epoxy_1K_HeatCure; + double bead_diameter_mm = 3.0; + double bead_width_after_squeeze_mm = 12.0; + double bond_line_thickness_mm = 0.3; + double spacer_bead_diameter_um = 250.0; // in adhesive + double lap_shear_target_MPa = 25.0; + double cure_temperature_C = 180.0; + double cure_time_min = 25.0; + double pot_life_min = 8.0; // for 2K + double viscosity_Pa_s = 80.0; + double robot_dispense_speed_mm_s = 400.0; + bool bead_vision_inspection = true; + bool laser_profile_inspection = true; +}; + +struct MechanicalJointQuality { + // SPR + double spr_interlock_distance_mm = 0.0; + double spr_head_height_mm = 0.0; // negative = below surface + double spr_bottom_thickness_mm = 0.0; // remaining under rivet + bool spr_rivet_cracked = false; + bool spr_bottom_cracked = false; + std::vector spr_force_displacement_curve; + // FDS + double fds_head_position_mm = 0.0; // negative = recessed + double fds_installed_torque_Nm = 0.0; + double fds_residual_torque_Nm = 0.0; + int fds_thread_engagement = 0; // full threads in bottom + // Clinching + double clinch_button_diameter_mm = 0.0; + double clinch_neck_thickness_mm = 0.0; + double clinch_bottom_thickness_mm = 0.0; + bool clinch_cracked = false; + // Blind rivet + double mandrel_break_load_actual_N = 0.0; + bool mandrel_retained = true; + // Adhesive + double lap_shear_actual_MPa = 0.0; + AdhesiveFailureMode failure_mode = AdhesiveFailureMode::Cohesive; + double degree_of_cure_pct = 0.0; + double glass_transition_Tg_C = 0.0; + bool bead_present = true; + double bead_width_measured_mm = 0.0; + double bead_height_measured_mm = 0.0; + // Common + bool visual_pass = true; + bool cross_section_pass = true; +}; + +SPRSpec design_spr_joint(double total_thickness_mm, std::string mat_top, std::string mat_bottom); +SPRSpec design_spr_die(SPRDieType die_type, double rivet_body_dia_mm, std::string bottom_material); +FDSSpec design_fds_joint(std::string screw_size, double total_thickness_mm, std::string mat_bottom); +ClinchingSpec design_clinch_joint(ClinchingType type, double total_thickness_mm, std::string mat_bottom); +BlindRivetSpec design_blind_rivet(double stack_thickness_mm, bool structural_required); +AdhesiveBondSpec design_adhesive_bond(AdhesiveType type, double lap_shear_target_MPa, double bond_line_thickness_mm); + +MechanicalJointQuality simulate_spr_setting(const SPRSpec& spec); +MechanicalJointQuality simulate_fds_installation(const FDSSpec& spec); +MechanicalJointQuality simulate_clinching(const ClinchingSpec& spec); +MechanicalJointQuality simulate_blind_rivet_setting(const BlindRivetSpec& spec); +MechanicalJointQuality simulate_adhesive_cure(const AdhesiveBondSpec& spec, double actual_cure_temp_C, double actual_cure_time_min); + +double calculate_spr_interlock_min(double total_thickness_mm); +double calculate_spr_button_force(const MechanicalJointQuality& quality, std::string material); +double calculate_adhesive_lap_shear_strength(const AdhesiveBondSpec& spec, double overlap_length_mm, double bond_width_mm); +double calculate_blind_rivet_shear_strength(double rivet_dia_mm, std::string rivet_material, std::string sheet_material); + +} // namespace vde::automotive_assembly::mechanical_joining +``` + +--- + +### 4. Powertrain Engine Assembly — Short Block, Cylinder Head, Piston, Crankshaft + +**Priority**: P1 + +#### 4.1 ICE Assembly: Short Block, Cylinder Head Sub-Assembly, Piston-Ring-Crankshaft, Timing, Leak Test, Cold Test + +``` +Internal Combustion Engine (ICE) Assembly: + Engine assembly line typically structured in sequential + build-up stations, often on palletized conveyor (overhead + or floor-mounted) with automated and manual operations. + +Engine Assembly Process Flow: + ┌──────────────────────────────────────────────────────────────┐ + │ 1. Short Block Assembly │ + │ Cleaned crankcase (block) arrives from machining line │ + │ → Install main bearing shells (upper + lower halves) │ + │ → Lay crankshaft into main bearing saddles │ + │ → Install main bearing caps → tighten TTY bolts │ + │ → Check crankshaft end float (axial clearance) │ + │ → Install piston + connecting rod assemblies (pre-built) │ + │ → Tighten connecting rod bolts (TTY or reusable) │ + │ → Check connecting rod side clearance │ + │ → Install rear main seal, front cover / oil pump │ + └──────────────────────────────────────────────────────────────┘ + ┌──────────────────────────────────────────────────────────────┐ + │ 2. Cylinder Head Sub-Assembly (parallel line) │ + │ → Press-fit valve stem seals / valve guides │ + │ → Insert valves, install valve springs + retainers │ + │ → Install hydraulic lash adjusters / cam followers │ + │ → Install camshaft(s) → tighten bearing caps │ + │ → Set camshaft timing (chain/belt sprockets) │ + │ → Install timing chain/belt + tensioner + guides │ + │ → Check valve lash (mechanical) or HLA preload │ + └──────────────────────────────────────────────────────────────┘ + ┌──────────────────────────────────────────────────────────────┐ + │ 3. Head-to-Block Marriage │ + │ → Place multi-layer steel (MLS) head gasket on block │ + │ → Lower cylinder head assembly onto block via lift assist │ + │ → Install cylinder head bolts → TTY angle-tighten │ + │ → Install timing cover, oil pan (with RTV sealant) │ + └──────────────────────────────────────────────────────────────┘ + ┌──────────────────────────────────────────────────────────────┐ + │ 4. Front-End Accessory Drive (FEAD) & Intake/Exhaust │ + │ → Install harmonic damper / crank pulley │ + │ → Install water pump, alternator, AC compressor │ + │ → Route serpentine belt → auto-tensioner │ + │ → Install intake manifold, fuel rail + injectors │ + │ → Install exhaust manifold / turbocharger │ + └──────────────────────────────────────────────────────────────┘ + ┌──────────────────────────────────────────────────────────────┐ + │ 5. Leak Test & Cold Test │ + └──────────────────────────────────────────────────────────────┘ + +Short Block — Bearing Clearance: + Main bearing clearance (crankshaft journal to bearing): + Measurement methods: + Plastigage: plastic filament compressed between + journal and bearing → width indicates clearance + Air gauge: pneumatic non-contact, resolution 0.1 μm + Dial bore gauge + micrometer: direct dimensional + Clearance specification: + c_bearing = D_bearing − d_journal [mm] + Typical: 0.020–0.060 mm (passenger car), + 0.040–0.080 mm (heavy-duty/diesel) + Target: within specified range, all journals within 0.010 mm + + Bearing crush height (for proper bore seating): + Protrusion of bearing shell above housing bore parting face + Target: 0.025–0.075 mm (ensures radial pressure for heat transfer) + + Connecting rod bearing clearance: + Same measurement principle as main bearing + Clearance: 0.020–0.055 mm + Side clearance (connecting rod big-end lateral float on crank pin): + c_side = width_journal − width_rod_big_end [mm] + Target: 0.10–0.35 mm + +Piston & Ring Assembly: + Piston pin (wrist pin) fit: + Press-fit in connecting rod small end (interference) + Floating pin in piston (clearance, retained by circlips) + Pin bore clearance: 0.005–0.015 mm + + Piston ring end gap measurement: + Ring inserted into cylinder bore (square, using piston to push): + End gap g_ring [mm]: + Top compression ring: 0.15–0.40 mm + Second compression ring: 0.20–0.50 mm + Oil control ring: 0.15–0.60 mm + Per 0.1 mm bore diameter increase: end gap ↑ ~0.03 mm + + Ring side clearance (ring in piston groove): + Axial gap between ring and groove land: + Target: 0.03–0.08 mm (compression), 0.02–0.06 mm (oil control) + Excessive → ring flutter, blow-by; too tight → ring sticking + + Piston-to-bore clearance: + c_piston = D_bore − D_piston_skirt [mm] + Measured at piston skirt (perpendicular to pin axis) + For aluminum piston in cast iron block: 0.02–0.06 mm + For aluminum piston in aluminum block: 0.01–0.04 mm (coated skirt) + +Cylinder Head Bolt Tightening — Torque-to-Yield (TTY): + TTY bolts are designed to be tightened beyond elastic limit into + plastic deformation region, providing consistent clamp load. + + Tightening sequence: + Stage 1 — Snug torque: all bolts to 20–30 Nm (seating) + Stage 2 — Torque step: all bolts to specified torque (e.g., 40 Nm) + Stage 3 — Angle 1: all bolts turned 90° (elastic-plastic transition) + Stage 4 — Angle 2: all bolts turned additional 90° (yield region) + Tightening pattern: spiral from center outward (minimizes distortion) + + Clamp load from TTY bolt: + F_clamp = σ_y × A_stress [N] + Where σ_y = bolt yield strength [MPa], + A_stress = stress area (smaller than nominal area for threads) + For M12 class 10.9: F_clamp ≈ 60–80 kN + + Friction scatter: + Torque-to-preload relationship: + T = K × F × d + K = 0.15–0.25 (nut factor, varies with lubrication/friction) + Angle-controlled method eliminates K dependence after threshold + torque is reached → clamp load variation reduced to ±15% (vs. + ±35% for torque-only) + +Camshaft Timing: + Camshaft-to-crankshaft phasing: + Timing chain tensioner (hydraulic or spring-loaded) + Camshaft sprocket keyed or friction-washer (variable valve timing VVT) + + Timing verification: + Dial indicator on #1 cylinder intake valve: + Valve opening point relative to TDC (top dead center) + Typical: intake opens 10–30° BTDC, closes 40–60° ABDC + Crankshaft protractor / encoder resolution: 0.1° + Timing error: ±1° crankshaft angle (acceptable) + >3° off → engine runs but poor performance / emissions + +Engine Leak Test: + Air decay method (pressure decay test): + Engine sealed (plugs in all openings), pressurized to 0.5–2 bar + + Pressure decay rate: + ΔP/Δt = (P_initial − P_final) / t_test [mbar/s or sccm] + + Leak rate conversion: + Q_leak = (V_volume × ΔP) / (P_atm × t_test) [sccm] + Where V_volume = internal volume of sealed engine [cm³] + + Acceptance criteria: + Passenger car engine: <5–10 sccm at 0.5 bar + Heavy-duty diesel: <20 sccm at 1 bar + Individual cylinder leakage: <15–20% (leak-down test at TDC) + + Defect localization: + Listen for hissing: intake (intake valve), exhaust (exhaust valve), + oil filler cap (rings), radiator (head gasket to coolant) + +Engine Cold Test: + Cold test: engine motored by electric drive (no combustion) at + 200–500 rpm, measuring torque signature and vibrations. + + Cold test measurements: + Motoring torque vs. crank angle: + T(θ) = T_friction + T_compression(θ) + T_inertia + Compression peaks: compression stroke of each cylinder + Torque variation between cylinders: <10% (balanced) + + Vibration (accelerometer on block): + Frequency analysis → detect assembly defects: + Low-order (0.5×, 1×, 2× engine order): imbalance, + bearing defect, piston slap + High-frequency: timing chain rattle, valve train noise + + Oil pressure build-up: + At 200 rpm cranking: oil pressure >0.3 bar within 5 s + Indicates: oil pump priming, no major internal leak + + Accept/reject criteria: + Torque signature within ±3σ of golden engine reference + No abnormal vibration peaks exceeding threshold + Oil pressure rises within time limit + No metal-to-metal noise (acoustic emission sensor) +``` + +#### 4.2 C++ API: Powertrain Engine Assembly + +```cpp +namespace vde::automotive_assembly::powertrain_ice { + +enum class BearingClearanceMethod { Plastigage, AirGauge, DialBoreGauge }; +enum class BoltTighteningStrategy { TorqueOnly, TorqueAngle_TTY, AngleYieldPoint }; +enum class LeakTestMethod { AirDecay, HeliumSniffer, VacuumDecay, UnderwaterBubble }; +enum class ColdTestParameter { TorqueSignature, VibrationSpectrum, OilPressure, AcousticEmission }; + +struct BearingClearanceSpec { + BearingClearanceMethod method = BearingClearanceMethod::AirGauge; + double journal_diameter_mm = 54.0; // crankshaft journal + double bearing_bore_diameter_mm = 54.035; + double clearance_min_mm = 0.025; + double clearance_max_mm = 0.055; + double bearing_crush_height_mm = 0.05; + double bearing_crush_target_mm = 0.04; // protrusion at parting line + double side_clearance_min_mm = 0.10; // conrod side clearance +}; + +struct PistonRingSpec { + double cylinder_bore_diameter_mm = 86.0; + double ring_end_gap_top_min_mm = 0.20; + double ring_end_gap_top_max_mm = 0.35; + double ring_end_gap_2nd_min_mm = 0.25; + double ring_end_gap_2nd_max_mm = 0.45; + double ring_end_gap_oil_min_mm = 0.20; + double ring_end_gap_oil_max_mm = 0.55; + double ring_side_clearance_mm = 0.05; + double piston_skirt_clearance_mm = 0.04; + double piston_pin_clearance_mm = 0.010; +}; + +struct CylinderHeadBoltSpec { + std::string bolt_size = "M12"; + double bolt_strength_class_MPa = 1040.0; // class 10.9 + double bolt_stress_area_mm2 = 84.3; // M12×1.75 + double snug_torque_Nm = 25.0; + double torque_step_Nm = 40.0; + double angle_step_1_deg = 90.0; + double angle_step_2_deg = 90.0; + bool tty = true; // torque-to-yield + double tty_clamp_force_kN = 70.0; + double nut_factor_K = 0.20; + int num_bolts = 10; + std::vector tightening_sequence; // spiral from center out + double target_bolt_stretch_mm = 0.6; // ultrasonic measurement +}; + +struct CamshaftTimingSpec { + int num_camshafts = 2; // DOHC + double intake_open_BTDC_deg = 15.0; + double intake_close_ABDC_deg = 50.0; + double exhaust_open_BBDC_deg = 45.0; + double exhaust_close_ATDC_deg = 15.0; + bool vvt_intake = true; // variable valve timing + bool vvt_exhaust = false; + std::string timing_drive_type = "chain"; // chain or belt + double timing_tolerance_deg = 1.0; // ±1° acceptable + double chain_tensioner_preload_N = 120.0; +}; + +struct EngineLeakTestSpec { + LeakTestMethod method = LeakTestMethod::AirDecay; + double test_pressure_bar = 0.5; + double test_duration_s = 30.0; + double stabilization_time_s = 10.0; // pressure settle before test + double internal_volume_cm3 = 5000.0; + double leak_rate_max_sccm = 8.0; + double cylinder_leakage_max_pct = 18.0; // leak-down per cylinder +}; + +struct EngineColdTestSpec { + double motoring_speed_rpm = 250.0; + double ramp_up_time_s = 3.0; + double steady_state_time_s = 10.0; + double torque_sampling_rate_Hz = 1000.0; + double vibration_fmax_Hz = 5000.0; + int num_accelerometer_channels = 4; + double oil_pressure_min_bar = 0.3; + double oil_pressure_rise_time_s = 5.0; + std::string golden_engine_reference_file; // baseline torque signature + double torque_variation_max_pct = 10.0; // cylinder-to-cylinder +}; + +struct EngineAssemblyPerformance { + double main_bearing_clearance_actual_mm = 0.0; + double conrod_bearing_clearance_actual_mm = 0.0; + double crankshaft_end_float_mm = 0.0; + double ring_end_gap_actual_mm = 0.0; + double piston_clearance_actual_mm = 0.0; + double head_bolt_clamp_force_actual_kN = 0.0; + double bolt_angle_deviation_deg = 0.0; // from specification + double cam_timing_error_deg = 0.0; + bool leak_test_pass = false; + double leak_rate_actual_sccm = 0.0; + bool cold_test_pass = false; + double cold_test_torque_variation_pct = 0.0; + double cold_test_max_vibration_g = 0.0; + bool oil_pressure_ok = false; +}; + +BearingClearanceSpec design_bearing_clearance(double journal_dia_mm, std::string engine_type); +PistonRingSpec design_piston_ring_gap(double bore_dia_mm, std::string piston_material, std::string ring_type); +CylinderHeadBoltSpec design_head_bolt_tty(std::string bolt_size, double target_clamp_kN); +CamshaftTimingSpec design_camshaft_timing(double intake_open_deg, double exhaust_open_deg, bool vvt); +EngineLeakTestSpec design_engine_leak_test(double internal_volume_cm3, double max_leak_sccm); +EngineColdTestSpec design_engine_cold_test(double motoring_rpm, std::string golden_ref_path); + +EngineAssemblyPerformance simulate_bearing_assembly(const BearingClearanceSpec& spec); +EngineAssemblyPerformance simulate_piston_ring_install(const PistonRingSpec& spec); +EngineAssemblyPerformance simulate_head_bolt_tightening(const CylinderHeadBoltSpec& spec); +EngineAssemblyPerformance simulate_cam_timing_check(const CamshaftTimingSpec& spec); +EngineAssemblyPerformance simulate_engine_leak_test(const EngineLeakTestSpec& spec); +EngineAssemblyPerformance simulate_engine_cold_test(const EngineColdTestSpec& spec); + +double calculate_bearing_clearance(double bore_dia_mm, double journal_dia_mm); +double calculate_piston_ring_end_gap(double bore_dia_mm, double thermal_expansion_coeff); +double calculate_tty_clamp_force(double yield_strength_MPa, double stress_area_mm2); +double calculate_leak_rate_sccm(double volume_cm3, double dp_mbar, double dt_s); +double calculate_cold_test_torque_variation(const std::vector& torque_peaks_Nm); + +} // namespace vde::automotive_assembly::powertrain_ice +``` + +--- + +### 5. xEV Electric Drive & Battery Assembly + +**Priority**: P1 + +#### 5.1 Stator Winding, Rotor Magnet, Battery Module, Pack Sealing, Fuel Cell Stack + +``` +Electric Drive Unit (EDU) — Hairpin Stator: + Hairpin stator technology uses rectangular copper wire (hairpin + shape) inserted into stator slots, replacing traditional round + wire winding for higher slot fill factor. + + Hairpin manufacturing sequence: + 1. Wire forming: rectangular copper wire (enamel-insulated, class H + 180–200°C) cut to length, stripped at ends, bent into U-shape + 2. Hairpin insertion: axially inserted into stator slots from one + end (insertion side); 2–4 conductors per slot + 3. Twist: hairpin legs twisted (bent) at opposite end (welding side) + to bring adjacent conductor ends together + 4. Laser welding: twisted ends laser-welded to form electrical + connections (100–200 weld points per stator) + 5. Insulation: welding-side impregnated with epoxy (trickle or + dip), cured to secure windings and provide insulation + + Hairpin design parameters: + Wire cross-section: 2.0 × 3.5 mm to 3.0 × 5.0 mm (rectangular) + Wire insulation: 0.06–0.12 mm enamel thickness + Slot fill factor η_fill: + η_fill = A_copper / A_slot ≥ 0.65 (hairpin) vs. 0.45 (round wire) + Higher η_fill → lower resistance → higher efficiency + + Slot liner insulation: Nomex or polyester film, 0.15–0.30 mm + Phase-to-phase insulation: Nomex paper between phase groups + Groundwall insulation: slot liner + impregnation resin + + Hairpin quality verification: + Surge test (impulse winding test): + High-voltage impulse applied, damped oscillation observed + Winding defect detection: turn-to-turn short, phase-to-phase + short, ground fault + Pass criterion: oscillation waveform matches golden sample (±5%) + + DC resistance measurement per phase: + R_phase [mΩ]: typically 5–30 mΩ depending on design + Phase-to-phase balance: <2% difference (indicates symmetry) + + Partial discharge (PD) test: + Inception voltage PDIV > 1.5 × operating voltage + Extinction voltage PDEV > 1.2 × operating voltage + + HiPot (High Potential) test: + Phase-to-ground: 2 × U_nom + 1,000 V for 1 s (typical 1.5–3 kV) + Acceptance: leakage current < specified limit, no breakdown + +Permanent Magnet Rotor: + Rotor assembly sequence: + 1. Lamination stacking: electrical steel (0.25–0.35 mm Si-steel) + laminations stacked with skew (step-skew or continuous skew + to reduce cogging torque) + 2. Magnet insertion: NdFeB (neodymium-iron-boron) permanent + magnets inserted into lamination pockets + Magnet grades: N38EH–N48UH (high temp, >180°C operating) + Magnet coating: Ni-Cu-Ni or epoxy for corrosion resistance + 3. Magnet fixation: epoxy adhesive or mechanical retention + (spring clip, dovetail), cured at elevated temp + 4. Rotor shaft press-fit: interference fit to shaft + 5. Balancing: two-plane dynamic balancing, G2.5 at max speed + + Magnet polarity verification: + Hall sensor or flux probe scans rotor circumference + Polarity sequence: N-S-N-S alternating + Flux density B at rotor surface: + B_airgap ≈ 0.6–1.0 T (fundamental component) + Detection: missing magnet, reversed polarity, weak magnet + Acceptance: all poles within ±5% flux density tolerance + + Rotor balancing: + Two-plane dynamic balancing: + Unbalance U = m × r [g·mm] + Balancing quality grade G: + G = e × ω [mm/s], where e = U/m [μm], ω = angular velocity + Target: G2.5 at 15,000 rpm → e ≈ 1.6 μm + Correction: add/remove weight at two correction planes + + Rotor inspection: + Rotor runout: <0.03 mm TIR (total indicated runout) + Lamination stacking factor: >97% + Magnet retention force: > 5× centrifugal force at max speed + +Traction Battery Pack Assembly: + Cell types and module construction: + Prismatic cells: aluminum housing, stacked in module + Pouch cells: laminated film, stacked or folded + Cylindrical cells (18650, 21700, 4680): arranged in honeycomb + + Module assembly: + 1. Cell testing: OCV (open circuit voltage), AC IR (internal + resistance, 1 kHz), visual inspection + 2. Cell sorting: group cells by capacity and IR within ±1% for + each module (ensures balanced performance) + 3. Module stacking: cells assembled with compression pads + (foam between cells for thermal expansion), end plates, + and tension straps/bands + 4. Compression force: + F_compression = P_cell × A_cell [N] + Typical compression pressure P_cell: 3–15 psi (0.2–1.0 bar) + for pouch cells; 0.5–2.0 kN per prismatic cell + Monitor: load cell during compression, relaxes over life + 5. Cell interconnection: + Wire bonding: ultrasonic Al or Cu wire, 200–500 μm diameter + Busbar welding: laser-welded Al or Cu busbars + Resistance welding: tab-to-busbar connection + + Module electrical test: + OCV: voltage within ±0.1 V of nominal (e.g., 3.65 V/cell for NMC) + AC IR: 0.5–3 mΩ per cell (depends on capacity and chemistry) + DC IR: measured by pulse current (HPPC method) + R_DC = ΔV / ΔI [mΩ] (10 s pulse) + HiPot: 2 × U_system + 1,000 V (module-to-ground) + Insulation resistance (IR): >100 MΩ at 500 V DC + + Pack assembly: + 1. Tray/baseplate: aluminum or steel, welded or cast + 2. Thermal management: liquid-cooled cold plate (aluminum, brazed + or FSW friction stir welded), glycol-water coolant + TIM (Thermal Interface Material): gap filler pad (2–5 W/mK) + or dispensable gap filler (robotic dispensing) + 3. Module mounting: bolted to cold plate with controlled torque + 4. Busbar interconnection: module-to-module series connection + via laser-welded busbars (Al or Cu, 2–5 mm thick) + 5. BMS integration: PCB, current sensor (shunt or Hall), + contactors, fuses, service disconnect + 6. Harness routing: cell voltage sense wires (CVS), thermistor + temperature sensor harness + 7. Lid sealing: FIPG (Formed-In-Place Gasket) or O-ring, + bolted with controlled torque sequence + + Pack sealing test (IP67 / IP6K9K): + Helium leak test: + Helium tracer gas injected into pack at 0.1 bar above ambient + Sniffer probe scans seal perimeter + Leak rate limit: <1 × 10⁻⁵ mbar·L/s (transport), + <1 × 10⁻⁷ mbar·L/s (service life) + + Pressure decay test (alternative): + Pack pressurized to 0.1–0.3 bar above ambient + ΔP monitored over 30–60 s + Acceptance: ΔP < threshold (depends on pack internal volume) + + Pack electrical test (EOL): + Total pack voltage: Σ modules voltage, within ±1% of expected + Total pack IR: Σ modules + busbar + contactor resistance + Isolation resistance: >500 Ω/V (UN ECE R100 requirement) + HiPot: 2 × U_max + 1,000 V for 1 s + BMS communication: CAN read/write, all sensors responding + Contactor function: open/close verified (coil current + aux contact) + Manual service disconnect (MSD): interlock loop verified + + Formation (initial charge/discharge cycle): + First charge: CC-CV (constant current → constant voltage) + Charge rate: 0.1–0.3C (formation is slow to build SEI layer) + SEI (Solid Electrolyte Interface) formation: critical for life + Degassing: after formation, pouch cells punctured to release gas, + re-sealed (if pouch type) + Capacity verification: 1C discharge capacity within ±2% of rated + Aging: high-temperature aging (40–60°C, 48–168 hr), OCV decay + monitoring to detect micro-shorts + +Fuel Cell Stack Assembly: + PEM (Proton Exchange Membrane) fuel cell stack: + Stack components: + Bipolar plates (BPP): graphite composite or stamped stainless + steel (316L, 0.1 mm thick, coated with carbon or gold) + MEA (Membrane Electrode Assembly): proton exchange membrane + (Nafion, 15–30 μm) + catalyst layers (Pt/C, 0.1–0.4 mg/cm²) + + gas diffusion layers (GDL, carbon paper/cloth) + Sealing gasket: silicone or EPDM, screen-printed or dispensed + + Stack assembly sequence: + 1. Repeat unit stacking: BPP → gasket → MEA → gasket → BPP... + Typically 200–400 cells for automotive stack (100–150 kW) + 2. End plate + current collector + insulation plate + 3. Compression: hydraulic press or tie-rod tightening + + Compression requirements: + Uniform contact pressure across active area: + P_contact = 1.0–2.0 MPa (typical) + Force per cell: F_cell = P_contact × A_active [N] + Active area A_active: 250–400 cm² per cell (automotive) + Total compression force: F_total = N_cells × F_cell [kN] + For 350 cells × 300 cm² × 1.5 MPa ≈ 15,750 kN (1,575 tonnes) + + Compression uniformity: + Pressure-sensitive film (Fuji Prescale): verify distribution + End plate deflection: <0.1 mm under full compression + Tie-rod tightening: hydraulic tensioner or torque-controlled, + cross-pattern sequence + + Compression displacement control: + ΔL_stack = N_cells × ΔL_per_cell + Monitor: stack height during compression + Target displacement correlates with GDL compression of 15–25% + + Stack leak test: + Individual cell leak: pressure decay on anode/cathode/coolant + External (to atmosphere) leak rate: <100 sccm at 1 barg + Crossover leak (H₂ to air side): <10 sccm at 0.5 bar ΔP + Coolant leak: <5 sccm at 1 bar + + Stack performance test: + Polarization curve (V vs. current density): + V(i) = E_rev − η_act − η_ohm − η_conc + Where E_rev ≈ 1.23 V (reversible), η = overpotential losses + Cell voltage uniformity: ±20 mV at rated current + H₂ utilization: >99% (recirculation) +``` + +#### 5.2 C++ API: xEV Electric Drive & Battery Assembly + +```cpp +namespace vde::automotive_assembly::xev_electric_drive { + +enum class HairpinWireShape { Rectangular_2x3_5, Rectangular_2_5x4, Rectangular_3x5 }; +enum class MagnetGrade { N38EH, N40UH, N45UH, N48UH, N52 }; +enum class CellFormFactor { Prismatic_Al, Pouch_Laminated, Cylindrical_18650, Cylindrical_21700, Cylindrical_4680 }; +enum class CellChemistry { NMC622, NMC811, LFP, NCA, LMFP }; +enum class PackSealingMethod { HeliumLeakTest, PressureDecay, BubbleTest }; +enum class FCBipolarPlateMaterial { Graphite_Composite, Stamped_StainlessSteel_316L, Titanium }; +enum class WindingTestType { SurgeTest, DCR_Measurement, PartialDischarge, HiPot, Inductance }; + +struct HairpinStatorSpec { + HairpinWireShape wire_shape = HairpinWireShape::Rectangular_2x3_5; + double wire_width_mm = 2.0; + double wire_height_mm = 3.5; + double enamel_thickness_um = 80.0; + int num_slots = 72; + int num_poles = 8; + int conductors_per_slot = 4; + double slot_fill_factor_target = 0.68; + double phase_resistance_mOhm = 12.0; + double phase_resistance_balance_pct = 1.5; + // Welding + int num_weld_points = 144; + double laser_power_kW = 1.5; + double weld_speed_mm_s = 100.0; + // Testing + double surge_test_voltage_V = 2500.0; + double hipot_voltage_V = 3000.0; + double partial_discharge_pdiv_V = 1500.0; + double insulation_resistance_MOhm = 100.0; +}; + +struct PMRotorSpec { + MagnetGrade grade = MagnetGrade::N42UH; + int num_poles = 8; + int num_magnets_per_pole = 1; + double magnet_br_T = 1.30; // remanence + double magnet_hcj_kA_m = 2000.0; // coercivity + double magnet_coating = 15.0; // Ni-Cu-Ni thickness um + double airgap_mm = 0.8; + double lamination_thickness_mm = 0.30; // Si-steel + double lamination_stacking_factor = 0.97; + double balancing_grade = 2.5; // G2.5 at max speed + double max_speed_rpm = 15000.0; + double max_unbalance_g_mm = 3.0; // per plane + double flux_density_target_T = 0.85; // at airgap surface + double flux_tolerance_pct = 5.0; + double magnet_retention_safety_factor = 5.0; +}; + +struct BatteryModuleSpec { + CellFormFactor form_factor = CellFormFactor::Pouch_Laminated; + CellChemistry chemistry = CellChemistry::NMC811; + int cells_per_module = 12; + double cell_nominal_voltage_V = 3.65; + double cell_capacity_Ah = 60.0; + double cell_ac_ir_mOhm = 1.2; // internal resistance 1kHz + double cell_matching_tolerance_pct = 1.0; // capacity and IR matching + double compression_pressure_bar = 0.5; // pouch cell stack + double compression_force_kN = 2.5; // end plate compression + std::string interconnection_type = "laser_busbar"; + double busbar_thickness_mm = 2.0; + double busbar_material = 0.0; // 0=Al, 1=Cu + double hipot_voltage_V = 2500.0; + double insulation_resistance_MOhm = 200.0; +}; + +struct BatteryPackSpec { + int num_modules = 12; + double total_voltage_V = 400.0; + double total_capacity_kWh = 75.0; + std::string thermal_system = "liquid_glycol"; + double cold_plate_thickness_mm = 2.0; + double tim_conductivity_W_mK = 3.5; + double tim_thickness_mm = 2.0; + // Sealing + PackSealingMethod sealing_test = PackSealingMethod::HeliumLeakTest; + double helium_leak_rate_max_mbar_L_s = 1.0e-6; + double pressure_decay_test_bar = 0.2; + double pressure_decay_limit_mbar = 3.0; + double pressure_decay_duration_s = 45.0; + // Electrical test + double pack_isolation_resistance_Ohm_per_V = 500.0; // >500 Ω/V per UN R100 + double pack_hipot_voltage_V = 3500.0; + // Formation + double formation_charge_rate_C = 0.2; + double formation_cutoff_voltage_V = 4.2; + double degassing_vacuum_mbar = 50.0; + double aging_temp_C = 45.0; + double aging_duration_hr = 72.0; + double aging_ocv_drop_max_mV = 5.0; // micro-short detection +}; + +struct FuelCellStackSpec { + FCBipolarPlateMaterial bpp_material = FCBipolarPlateMaterial::Stamped_StainlessSteel_316L; + int num_cells = 350; + double active_area_cm2 = 300.0; + double membrane_thickness_um = 18.0; // Nafion + double pt_loading_mg_cm2 = 0.3; // total Pt loading + double gdl_thickness_um = 200.0; + double gdl_compression_target_pct = 20.0; // GDL compression + double contact_pressure_MPa = 1.5; + double compression_force_per_cell_kN = 45.0; + double total_compression_force_kN = 1575.0; + int num_tie_rods = 8; + double tie_rod_torque_Nm = 200.0; + double tie_rod_sequence_deg = 180.0; // cross-pattern + double end_plate_deflection_max_mm = 0.1; + double stack_height_target_mm = 600.0; + // Leak test + double external_leak_limit_sccm = 100.0; // at 1 barg + double crossover_leak_limit_sccm = 5.0; // H₂ crossover + double coolant_leak_limit_sccm = 3.0; + // Performance + double cell_voltage_uniformity_mV = 20.0; // at rated current + double h2_utilization_pct = 99.0; + double rated_power_kW = 120.0; +}; + +struct xEVAssemblyPerformance { + // Stator + double phase_resistance_actual_mOhm = 0.0; + double phase_resistance_imbalance_pct = 0.0; + bool surge_test_pass = false; + bool hipot_pass = false; + int weld_defect_count = 0; + // Rotor + double flux_density_variation_pct = 0.0; + int polarity_errors = 0; + double residual_unbalance_g_mm = 0.0; + bool balancing_pass = false; + // Battery module + double module_ocv_V = 0.0; + double module_ac_ir_mOhm = 0.0; + double cell_voltage_spread_mV = 0.0; + bool module_hipot_pass = false; + // Battery pack + double pack_isolation_MOhm = 0.0; + bool pack_sealing_pass = false; + double helium_leak_actual_mbar_L_s = 0.0; + bool formation_capacity_pass = false; + double capacity_actual_kWh = 0.0; + // Fuel cell stack + double stack_height_actual_mm = 0.0; + double compression_uniformity_cv_pct = 0.0; + bool stack_leak_test_pass = false; + double cell_voltage_spread_mV = 0.0; +}; + +HairpinStatorSpec design_hairpin_stator(int num_slots, int num_poles, double slot_fill_target); +PMRotorSpec design_pm_rotor(int num_poles, MagnetGrade grade, double max_speed_rpm); +BatteryModuleSpec design_battery_module(CellFormFactor form, CellChemistry chem, int cells, double capacity_Ah); +BatteryPackSpec design_battery_pack(int num_modules, double total_kWh, PackSealingMethod seal); +FuelCellStackSpec design_fuel_cell_stack(int num_cells, double active_area_cm2, double rated_kW); + +xEVAssemblyPerformance simulate_hairpin_winding(const HairpinStatorSpec& spec); +xEVAssemblyPerformance simulate_hairpin_laser_welding(const HairpinStatorSpec& spec); +xEVAssemblyPerformance simulate_rotor_magnet_assembly(const PMRotorSpec& spec); +xEVAssemblyPerformance simulate_rotor_balancing(const PMRotorSpec& spec); +xEVAssemblyPerformance simulate_module_stacking(const BatteryModuleSpec& spec); +xEVAssemblyPerformance simulate_module_electrical_test(const BatteryModuleSpec& spec); +xEVAssemblyPerformance simulate_pack_sealing_test(const BatteryPackSpec& spec); +xEVAssemblyPerformance simulate_pack_formation(const BatteryPackSpec& spec); +xEVAssemblyPerformance simulate_fc_stack_compression(const FuelCellStackSpec& spec); +xEVAssemblyPerformance simulate_fc_stack_leak_test(const FuelCellStackSpec& spec); + +double calculate_slot_fill_factor(double copper_area_mm2, double slot_area_mm2); +double calculate_centrifugal_force(double mass_kg, double radius_m, double rpm); +double calculate_cell_compression_force(double pressure_bar, double cell_area_mm2); +double calculate_pack_isolation_resistance(const std::vector& module_ir_MOhm); +double calculate_fc_gdl_compression(double initial_thickness_um, double compression_pct); + +} // namespace vde::automotive_assembly::xev_electric_drive +``` + +--- + +### 6. Tightening & Process Control + +**Priority**: P1 + +#### 6.1 Torque-Angle Monitoring, DC Nutrunners, Tightening Strategies, SPC + +``` +DC Electric Nutrunners (Transducerized): + Modern automotive assembly uses DC electric nutrunners with + built-in torque and angle transducers for precision fastening. + Pneumatic impact wrenches are largely replaced due to poor + accuracy (±30%) and inability to monitor angle. + + Transducer types: + Torque transducer: strain gauge on output shaft + Accuracy: ±0.5% of reading (Class A per ISO 5393) + Range: 1–1,000 Nm depending on tool size + Angle transducer: encoder (magnetic or optical) + Resolution: 0.1–1° per pulse + Multi-turn: absolute encoder for total angle tracking + + Nutrunner types: + Handheld: pistol-grip, angle-head, inline + Fixtured: multi-spindle (2–20 spindles synchronized) + Right-angle: for limited-access joints (suspension, subframe) + +Tightening Strategies: + Torque Control (T): + Target torque T_target reached → tool stops + Advantages: simple, fast + Disadvantages: 70–90% of torque lost to friction (only + 10–30% creates clamp load), ±25–35% clamp load scatter + Use: non-critical joints, Class C per VDI 2862 + + Torque Control with Angle Monitoring (TA): + Torque T_target reached, angle α measured and verified + against window α_min to α_max + If α_outside window → reject (e.g., cross-thread, bottoming) + Use: joints requiring torque verification + defect detection + + Angle Control with Torque Monitoring (AT): + Snug torque T_threshold (seating) → angle Δα applied from + threshold → tool stops when Δα reached + Final torque T_final measured and verified against window + Advantages: clamp load variation ±15% (eliminates friction + effect after seating) + Use: critical joints (cylinder head, conrod, flywheel, chassis), + Class A per VDI 2862 + + Yield-Point Detection (Gradient Method): + Torque gradient dT/dα monitored continuously during tightening + In elastic region: dT/dα ≈ constant (bolt stretches linearly) + At yield point: dT/dα drops to ~50% of elastic gradient + (plastic deformation begins) + Tool stops at detected yield point + Advantages: maximum clamp load, bolt utilization to yield + Use: TTY (torque-to-yield) bolts, production-critical joints + +Torque-Angle Curve Analysis: + Monitoring window approach: + ┌──────────────────────────────────┐ + │ Torque │ + │ ▲ ┌──────────┐ │ + │ │ ╱ ╲ │ ← Upper limit + │ │ ╱ ╲ │ + │ │ ────╱────────────────╲──── │ ← Target + │ │ ╱ OK zone ╲ │ + │ │──╱────────────────────────╲──│ ← Lower limit + │ │ ╱ ╲ │ + │ └────────────────────────────────► Angle + └──────────────────────────────────┘ + + Window definition (per joint): + Snug torque T_s: 2–5 Nm (typical, above run-down friction) + Threshold torque T_th: 10–30 Nm (start of angle measurement) + Final angle window: α_min to α_max (e.g., 180–210°) + Final torque window: T_min to T_max (e.g., 40–60 Nm) + + Defect signatures: + No angle (α ≈ 0): stripped thread + Low angle (α < α_min): wrong bolt (too short), bottoming + High angle (α > α_max): missing washer, soft joint, cross-thread + Low torque finish: bolt yield, joint relaxation + High torque finish: thread damage, high friction + + SPC (Statistical Process Control) for tightening: + Cpk (Process Capability Index): + Cpk = min[(USL − μ)/3σ, (μ − LSL)/3σ] + Target: Cpk ≥ 1.67 for safety-critical (Class A) + Cpk ≥ 1.33 for functional (Class B) + Tracking: X-bar-R chart (subgroup mean and range) + + Cmk (Machine Capability Index): + Cmk = min[(USL − μ)/3σ, (μ − LSL)/3σ] + Evaluated during tool qualification (50 consecutive rundowns) + Target: Cmk ≥ 1.67 (machine alone, before process variation) + + Torque vs. residual torque correlation: + Dynamic torque (T_dyn): measured during tightening (nutrunner) + Residual torque (T_res): measured after tightening (breakaway + torque, click wrench in loosening direction) + T_res / T_dyn ratio: 0.8–1.2 (indicates joint relaxation) + Ratio <0.8: significant embedment relaxation + Ratio >1.2: stick-slip, adhesive thread locking + +Joint Classification per VDI 2862: + Class A: safety-critical, failure → personal injury + Examples: steering, brakes, wheel bolts, seat belts, tow hitch + Requirements: AT (angle-controlled), Cpk ≥ 1.67, + 100% monitoring, SPC continuous, traceable to VIN + + Class B: functional, failure → vehicle breakdown + Examples: engine mounts, subframe, suspension arm, driveshaft + Requirements: TA (torque-angle monitored), Cpk ≥ 1.33, + 100% monitoring + + Class C: non-critical, failure → inconvenience (rattle, leak) + Examples: trim panels, covers, brackets, heat shields + Requirements: T (torque only), Cpk ≥ 1.0, + sample monitoring acceptable + + Additional requirements: + Error-proofing (Poka-Yoke): + Tool interlock with line PLC → NOK joint prevents + conveyor index (station cannot release) + NOK marking: marking pen or RFID tag on failed joint + Traceability: + Each tightening result stored with: timestamp, VIN, + station ID, tool ID, torque trace (T vs. α), + strategy parameters, result (OK/NOK) + Data retention: vehicle life + 15 years (product liability) + Redundancy: + Critical joints: two independent torque transducers + (cross-check within ±5%) + +Tightening Tool Management: + Tool calibration: + Torque calibration: certified torque transducer (ISO 6789, + accuracy class 1 or better) + Calibration interval: 6–12 months or 50,000–250,000 cycles + In-line check: daily capability test (Cmk warm-up check + with 25 rundowns on test joint) + Joint simulator: hydraulic or spring-loaded test joint + simulating actual joint stiffness + + Tool capabilities: + Speed control: programmable RPM (free speed, rundown speed, + final speed) + Multi-stage strategies: + Stage 1: High-speed rundown (1,000–3,000 rpm) → fast cycle + Stage 2: Low-speed seating (50–200 rpm) → precise threshold + Stage 3: Angle-controlled tightening (10–50 rpm) → accuracy + Synchronization: multi-spindle tools coordinate start/stop + to avoid cross-talk between adjacent bolts +``` + +#### 6.2 C++ API: Tightening & Process Control + +```cpp +namespace vde::automotive_assembly::tightening_control { + +enum class TighteningStrategy { TorqueOnly_T, TorqueAngle_TA, AngleTorque_AT, YieldPoint_Gradient }; +enum class JointClass { Class_A_SafetyCritical, Class_B_Functional, Class_C_NonCritical }; +enum class NutrunnerType { Handheld_PistolGrip, Fixtured_MultiSpindle, RightAngle_LimitedAccess }; +enum class ToolVerification { Inline_Capability_Test, Calibration_Certificate, JointSimulator }; + +struct TighteningSpec { + TighteningStrategy strategy = TighteningStrategy::AngleTorque_AT; + JointClass joint_class = JointClass::Class_A_SafetyCritical; + NutrunnerType tool_type = NutrunnerType::Fixtured_MultiSpindle; + // Torque-only + double target_torque_Nm = 45.0; + double torque_tolerance_Nm = 4.5; // ±10% + // Angle-controlled + double snug_torque_Nm = 5.0; // seating before threshold + double threshold_torque_Nm = 15.0; // start of angle measurement + double target_angle_deg = 180.0; // AT: angle from threshold + double angle_window_min_deg = 170.0; + double angle_window_max_deg = 195.0; + double final_torque_min_Nm = 38.0; // AT: torque verification + double final_torque_max_Nm = 52.0; + // Yield-point + double gradient_slope_delta_pct = 50.0; // slope drop at yield + // Multi-stage + double rundown_speed_rpm = 2000.0; + double seating_speed_rpm = 100.0; + double final_speed_rpm = 30.0; + // Quality requirements + double cpk_target = 1.67; + double cmk_target = 1.67; + double residual_torque_ratio_min = 0.85; + double residual_torque_ratio_max = 1.15; + // Error-proofing + bool reject_station_lock = true; // PLC interlock on NOK + bool nok_marking = true; // mark NOK joint + bool trace_to_vin = true; // store result with VIN + // Redundancy + bool dual_transducer_cross_check = false; // for Class A + double cross_check_tolerance_pct = 5.0; +}; + +struct TighteningResult { + double final_torque_Nm = 0.0; + double final_angle_deg = 0.0; // from threshold + double threshold_torque_Nm = 0.0; + double gradient_at_yield_Nm_deg = 0.0; + bool yield_detected = false; + bool torque_ok = false; + bool angle_ok = false; + bool gradient_ok = false; + bool overall_ok = false; + std::vector torque_curve; // T vs. α raw data + std::vector angle_curve; + double residual_torque_Nm = 0.0; // post-tighten breakaway + double residual_ratio = 0.0; + std::string defect_signature = "none"; // "cross_thread","bottoming","strip","reuse" + std::string timestamp; + std::string vin; + int station_id = 0; + int tool_id = 0; + double rundown_time_s = 0.0; +}; + +struct ToolCalibrationSpec { + double last_calibration_date_days = 0.0; // days since last cal + double calibration_interval_days = 270.0; // ~9 months + int calibration_interval_cycles = 100000; + int cycles_since_calibration = 0; + double torque_accuracy_pct = 0.5; // Class A per ISO 5393 + double angle_resolution_deg = 0.1; + double daily_cmk_target = 1.67; + int daily_test_rundowns = 25; +}; + +struct SPCResult { + double cpk_actual = 0.0; + double cp_actual = 0.0; + double mean_torque_Nm = 0.0; + double sigma_torque_Nm = 0.0; + double mean_angle_deg = 0.0; + double sigma_angle_deg = 0.0; + bool cpk_pass = false; + bool cmk_pass = false; + std::vector xbar_chart_data; // subgroup means + std::vector r_chart_data; // subgroup ranges + bool trend_warning = false; // 7 points same side of mean + bool out_of_control = false; // beyond control limits +}; + +TighteningSpec design_tightening_strategy(TighteningStrategy strat, JointClass cls, double target_Nm); +TighteningSpec design_at_joint(double threshold_Nm, double angle_deg, double torque_min_Nm, double torque_max_Nm); +TighteningSpec design_yield_point_joint(std::string bolt_size, double yield_strength_MPa); +TighteningSpec design_multi_spindle_sync(int num_spindles, double target_Nm_per_spindle); + +TighteningResult simulate_tightening_rundown(const TighteningSpec& spec); +SPCResult simulate_spc_analysis(const std::vector& results, const TighteningSpec& spec); +TighteningResult simulate_residual_torque_check(const TighteningResult& dyn_result, const TighteningSpec& spec); +SPCResult simulate_cmk_evaluation(const TighteningSpec& spec, int num_rundowns = 50); + +double calculate_cpk(double usl, double lsl, double mean, double sigma); +double calculate_cmk(double usl, double lsl, double mean, double sigma); +double calculate_clamp_load_from_torque(double T_Nm, double K, double d_mm); +double calculate_yield_slope_max(const std::vector& torque, const std::vector& angle); +std::string classify_defect_signature(double angle_deg, double torque_Nm, const TighteningSpec& spec); + +} // namespace vde::automotive_assembly::tightening_control +``` + +--- + +### 7. Final Assembly — Chassis Marriage, Cockpit Module, Glazing, Fluid Fill, Wheel Alignment + +**Priority**: P1 + +#### 7.1 Body-to-Chassis Marriage, Cockpit Insertion, Glazing PUR Application, Fluid Fill Vacuum + +``` +Chassis Marriage (Body Drop / Marriage Station): + This is the point where the painted body (from Paint shop) is + married to the powertrain + suspension + subframe assembly + (chassis pallet), creating a rolling vehicle for the first time. + + Marriage station configuration: + Overhead carrier: painted body suspended or supported from above + Chassis pallet: AGV or floor conveyor carrying powertrain + + front/rear suspension + subframe + exhaust + fuel tank + + brake lines + + Marriage sequence: + 1. Body descends (lift/lower from overhead) at controlled speed + 2. Chassis pallet positioned under body by AGV + 3. Body lowered onto chassis pallet, locating pins engage + 4. Bolts inserted: subframe-to-body mounting bolts (4–8 bolts) + typically M12–M14 + 5. All bolts tightened to specified torque (AT strategy, + Cpk ≥1.67 for Class A) + + Docking accuracy: + Body-to-chassis positioning: + X (fore-aft): ± 2 mm (AGV positioning + body centering) + Y (cross-car): ± 2 mm + Z (vertical): ± 3 mm (body lift control) + Locating pins: 2 round pins on pallet → 2 holes on body + Engagement: tapered lead-in, 5–8 mm engagement + Vision guidance: camera on AGV tracks fiducial on body + for fine positioning correction + + Marriage torque sequence: + Multi-spindle tool tightens all subframe bolts simultaneously + Cross-pattern sequence ensures even clamp load distribution + Torque verification: 100% monitoring, traceable to VIN + +Cockpit Module Assembly: + Cockpit module (instrument panel + cross-car beam + HVAC + steering + column + airbag + wiring harness + center console) is pre-assembled + offline and inserted into vehicle through door opening. + + Cockpit insertion: + Robotic loading: 6-axis robot with custom gripper + Insertion path: through front door opening (door not yet installed) + Clearance: 10–20 mm per side between cockpit and door opening + Insertion speed: 100–300 mm/s (slow near engagement) + + Docking: + Locating: 2 locating pins on body → 2 bushings on cockpit beam + Bolting: 4–6 bolts (M8–M10) at A-pillar + floor tunnel + Tightening: DC nutrunner with AT strategy, 20–40 Nm + + Connector coupling: + Electrical: 5–10 multi-pin connectors (body harness ↔ cockpit) + Push-to-connect with CPA (Connector Position Assurance) clip + HVAC: refrigerant lines (quick-connect, O-ring seal) + Heater core hoses (spring clamp, robotic) + Steering: intermediate shaft to steering rack pinion + Spline engagement + pinch bolt (25–35 Nm) + Brake: brake booster vacuum line, brake pedal switch connector + + Cockpit quality checks: + Gap & flush to door opening: 2–4 mm gap, ±1 mm flush + IP-to-A-pillar gap consistency: ±1 mm + Connector full-seat verification: electrical continuity test + Steering wheel centering: ±3° (final adjustment at wheel alignment) + +Windshield & Backlight Glazing: + Glass bonding to body using polyurethane (PUR) adhesive. + + Glazing process: + 1. Glass preparation: + Clean with primer/activator (applied robotically) + Ceramic frit band (black border) on glass perimeter + UV blocker in frit protects PUR from sunlight degradation + 2. PUR dispensing: + 1K moisture-cure PUR (most common): + Viscosity: 30–80 Pa·s at application temp (heated to 40–60°C) + Open time: 10–30 min before skin formation + Robotic dispensing: + Triangular bead profile: ~12 mm wide base, 8–10 mm high + Bead positioned: 5–10 mm from glass edge + Continuous bead: no gaps, no skips + Bead volume control: gear pump with closed-loop flow meter + 3. Glass placement: + Robot with vacuum suction cups picks glass + Vision system locates body opening (camera + laser) + Glass placed into body opening: + Positioning accuracy: ±0.5 mm (all edges) + Press-in: robot pushes glass to compress PUR bead + Target PUR compression: 30–50% of bead height + 4. Setting / cure: + PUR cures by moisture absorption from air + Initial handling strength: 1–3 hours (depending on humidity) + Full cure: 24–72 hours + Accelerated cure: humidified booth (50–70% RH, 25–35°C) + + Glazing quality: + PUR bead height after compression: 4–6 mm + PUR width after compression: 15–20 mm + No voids, no skips (continuous seal) + Water leak test: high-pressure spray, no ingress + Glass flushness to body: ±1 mm + Urethane squeeze-out: 1–3 mm inside (acceptable, trim later) + +Fluid Fill: + Vehicle fluids filled on assembly line with vacuum-fill and + precise metering to avoid air entrapment and ensure correct levels. + + Brake fluid fill: + Fluid: DOT 4 (glycol-ether based, dry boiling point >230°C) + Vacuum-fill process: + 1. Vacuum applied to brake system (master cylinder reservoir): + Vacuum level: −0.8 to −0.95 bar (near-total evacuation) + Hold time: 10–30 s (boils moisture, removes air) + 2. Vacuum leak-up test: + ΔP in 10 s: <10 mbar (no leaks in system) + If leak-up > threshold → reject (leak in brake line/caliper) + 3. Brake fluid injected under vacuum: + Fill volume: 0.5–1.0 L (depends on system size) + Fill pressure: 0.5–2 bar (pushes fluid into evacuated system) + 4. Bleeding: automated ABS/ESP bleed cycle + ABS modulator valves cycled (10–20 cycles) → purges trapped air + Pedal feel test: firm pedal, no sponginess + + Coolant fill: + Coolant: 50/50 ethylene glycol + deionized water + Vacuum-fill process: + 1. Vacuum −0.7 to −0.9 bar, hold 15–30 s + 2. Leak test: <20 mbar in 10 s + 3. Fill under vacuum: coolant drawn into evacuated system + Fill volume: 5–12 L (engine + radiator + heater core) + 4. Degas: engine run, heater on max, thermostat open + Top-up reservoir as needed + + AC refrigerant fill: + Refrigerant: R-1234yf (GWP <1, replacing R-134a with GWP 1,430) + Charging station: + 1. Evacuation: vacuum <1 mbar, hold 5–10 min (removes moisture) + 2. Vacuum decay test: <0.5 mbar rise in 2 min (no leak, dry) + 3. Refrigerant charge: precision mass flow meter + Charge amount: 450–750 g (depends on system) + Accuracy: ±5 g + 4. UV leak detector dye: injected with refrigerant (∼5 mL) + 5. Performance check: + A/C on max cold, blower high, recirc + Center vent temp: <8°C within 2 min (at 25°C ambient) + High/low side pressures within spec + + Fuel fill: + First fill at assembly plant: 5–15 L (enough for EOL test + + transport, not full tank for weight reduction) + Fuel fill volume recorded for EOL test fuel consumption calc + + Windshield washer fluid: + Fill volume: 3–5 L, pre-mixed (not concentrate) + +Wheel Alignment: + Precision alignment of all four wheels to specification using + laser-based alignment system. + + Alignment parameters (passenger car): + Front: + Toe: 0°00' ± 0°05' (toe-in) per wheel (≈ 0 ± 1 mm) + Camber: −0°30' ± 0°30' (slight negative for cornering) + Caster: 4°00' ± 0°30' (positive, steering self-centering) + + Rear: + Toe: 0°10' ± 0°05' (toe-in for stability) + Camber: −1°00' ± 0°30' + + Cross-values (left vs. right difference): + Cross-camber: <0°30' (prevents pull) + Cross-caster: <0°30' + Total toe: front 0°00' ± 0°10', rear 0°20' ± 0°10' + Thrust angle: 0°00' ± 0°05' (rear axle to vehicle centerline) + + Alignment measurement: + Laser head mounted on each wheel (4-head or 8-head system) + Measures: toe, camber, caster (by steering sweep ±20°) + Resolution: 0.01° (0.6 arc-minute) + Accuracy: ±0.02° + Steering wheel level: electronic level on steering wheel, + centering within ±3° + + Adjustment: + Front toe: tie-rod end (rack-and-pinion) + Rear toe: eccentric cam bolt or adjustable link + Front camber: slotted strut-to-knuckle bolts or eccentric bolt + Rear camber: adjustable upper/lower control arm + Caster: not field-adjustable on most vehicles (set by design) + + Headlamp aiming: + After alignment, headlamps aimed per FMVSS 108 / ECE R48 + Headlamp tester: optical box at 3–7 m distance + Low beam cutoff: 0.5–1.0% below horizontal (European), + at specified height + Adjustment screws: vertical + horizontal aiming + Automatic leveling: tested by weight simulation or ride height sensor +``` + +#### 7.2 C++ API: Final Assembly + +```cpp +namespace vde::automotive_assembly::final_assembly { + +enum class CockpitInsertionMethod { RobotWithGripper, ManualAssist, AGVPresented }; +enum class GlazingPURType { OneK_MoistureCure, TwoK_FastCure, PUR_HotMelt }; +enum class FluidType { BrakeFluid_DOT4, Coolant_50_50, AC_Refrigerant_R1234yf, WasherFluid, Fuel_Gasoline }; +enum class AlignmentParameter { Toe_Front, Camber_Front, Caster_Front, Toe_Rear, Camber_Rear, ThrustAngle }; + +struct ChassisMarriageSpec { + double descent_speed_mm_s = 50.0; + double positioning_accuracy_x_mm = 2.0; + double positioning_accuracy_y_mm = 2.0; + double positioning_accuracy_z_mm = 3.0; + double locating_pin_diameter_mm = 14.0; + double locating_pin_engagement_mm = 7.0; + bool vision_guidance = true; + double vision_tolerance_mm = 1.0; + int num_subframe_bolts = 6; + double subframe_bolt_torque_Nm = 90.0; // M12 class 10.9 + TighteningStrategy bolt_strategy = TighteningStrategy::AngleTorque_AT; + double cycle_time_s = 55.0; +}; + +struct CockpitModuleSpec { + CockpitInsertionMethod method = CockpitInsertionMethod::RobotWithGripper; + double door_opening_clearance_mm = 15.0; // per side + double insertion_speed_mm_s = 200.0; + double docking_speed_mm_s = 50.0; // slow near engagement + int num_locating_pins = 2; + int num_mounting_bolts = 5; + double bolt_torque_Nm = 30.0; // M8 + int num_electrical_connectors = 8; + bool hvac_quick_connect = true; + double steering_pinch_bolt_torque_Nm = 30.0; + // Quality + double gap_to_door_mm = 3.0; + double flush_to_door_mm = 1.0; + double steering_wheel_center_deg = 3.0; +}; + +struct GlazingSpec { + GlazingPURType pur_type = GlazingPURType::OneK_MoistureCure; + double pur_bead_width_mm = 12.0; + double pur_bead_height_mm = 9.0; + double pur_bead_edge_distance_mm = 8.0; + double pur_viscosity_Pa_s = 50.0; + double pur_application_temp_C = 50.0; + double pur_compression_pct = 40.0; // of bead height after placement + double glass_placement_accuracy_mm = 0.5; + double glass_flushness_tolerance_mm = 1.0; + double open_time_min = 20.0; + double initial_handling_strength_hr = 2.0; + double full_cure_hr = 48.0; + bool uv_blocker_frit = true; // ceramic frit band +}; + +struct FluidFillSpec { + // Brake + double brake_vacuum_level_bar = 0.9; // absolute vacuum + double brake_vacuum_hold_s = 20.0; + double brake_leak_up_max_mbar = 10.0; // in 10 s + double brake_fill_volume_L = 0.8; + double brake_fill_pressure_bar = 1.5; + int abs_bleed_cycles = 15; + // Coolant + double coolant_vacuum_level_bar = 0.8; + double coolant_leak_max_mbar = 20.0; + double coolant_fill_volume_L = 8.0; + // AC + double ac_vacuum_level_mbar = 0.5; // deep vacuum + double ac_vacuum_hold_min = 7.0; + double ac_vacuum_rise_max_mbar = 0.5; // in 2 min + double ac_refrigerant_charge_g = 550.0; + double ac_charge_accuracy_g = 5.0; + double ac_center_vent_temp_max_C = 8.0; // at 25°C ambient + // Fuel + double fuel_first_fill_L = 10.0; + // Washer + double washer_fill_L = 4.0; +}; + +struct WheelAlignmentSpec { + // Front + double front_toe_deg = 0.083; // 0°05′ toe-in per wheel + double front_toe_tolerance_deg = 0.083; + double front_camber_deg = -0.5; + double front_camber_tolerance_deg = 0.5; + double front_caster_deg = 4.0; + double front_caster_tolerance_deg = 0.5; + // Rear + double rear_toe_deg = 0.167; // 0°10′ toe-in + double rear_toe_tolerance_deg = 0.083; + double rear_camber_deg = -1.0; + double rear_camber_tolerance_deg = 0.5; + // Cross and total + double cross_camber_max_deg = 0.5; + double cross_caster_max_deg = 0.5; + double total_toe_front_deg = 0.167; + double thrust_angle_max_deg = 0.083; + double steering_wheel_center_deg = 3.0; + // Headlamp + double headlamp_low_beam_dip_pct = 0.75; // 0.75% below horizontal + double headlamp_cutoff_tolerance_mm = 20.0; // at 10 m +}; + +struct FinalAssemblyPerformance { + // Chassis marriage + double body_dock_error_x_mm = 0.0; + double body_dock_error_y_mm = 0.0; + double subframe_bolt_torque_mean_Nm = 0.0; + bool marriage_complete = false; + // Cockpit + double cockpit_insertion_force_N = 0.0; + double cockpit_gap_mean_mm = 0.0; + int cockpit_connector_faults = 0; + // Glazing + double pur_bead_continuity_pct = 0.0; // 100% = no gaps + double pur_bead_height_after_mm = 0.0; + double glass_position_error_mm = 0.0; + bool water_leak_test_pass = false; + // Fluids + bool brake_vacuum_leak_pass = false; + double brake_fill_actual_L = 0.0; + bool brake_pedal_firm = false; + bool coolant_vacuum_leak_pass = false; + double ac_charge_actual_g = 0.0; + double ac_vent_temp_actual_C = 0.0; + // Wheel alignment + double front_toe_actual_deg = 0.0; + double front_camber_actual_deg = 0.0; + double rear_toe_actual_deg = 0.0; + double rear_camber_actual_deg = 0.0; + double thrust_angle_actual_deg = 0.0; + bool alignment_pass = false; + bool headlamp_aim_pass = false; +}; + +ChassisMarriageSpec design_chassis_marriage(double vehicle_mass_kg, double takt_s); +CockpitModuleSpec design_cockpit_insertion(double door_opening_width_mm, double cockpit_width_mm); +GlazingSpec design_glazing_process(GlazingPURType pur, double glass_perimeter_mm); +FluidFillSpec design_brake_fluid_fill(double system_volume_L, bool abs); +FluidFillSpec design_ac_charge(double system_volume_L, double refrigerant_type); +WheelAlignmentSpec design_wheel_alignment(std::string vehicle_platform, std::string suspension_type); + +FinalAssemblyPerformance simulate_marriage_docking(const ChassisMarriageSpec& spec); +FinalAssemblyPerformance simulate_cockpit_loading(const CockpitModuleSpec& spec); +FinalAssemblyPerformance simulate_pur_dispensing(const GlazingSpec& spec, double bead_length_mm); +FinalAssemblyPerformance simulate_glass_placement(const GlazingSpec& spec); +FinalAssemblyPerformance simulate_fluid_vacuum_fill(const FluidFillSpec& spec, FluidType fluid); +FinalAssemblyPerformance simulate_wheel_alignment(const WheelAlignmentSpec& spec); + +double calculate_vacuum_leak_rate(double dp_mbar, double dt_s, double volume_L); +double calculate_pur_bead_volume(double width_mm, double height_mm, double length_mm); +double calculate_alignment_thrust_angle(double rear_toe_left_deg, double rear_toe_right_deg); +double calculate_headlamp_cutoff_height(double dip_pct, double headlamp_height_mm, double distance_m); + +} // namespace vde::automotive_assembly::final_assembly +``` + +--- + +### 8. End-of-Line Test — Chassis Dynamometer, ADAS Calibration, Water Leak, NVH Audit + +**Priority**: P1 + +#### 8.1 EOL Roller Test, ADAS Target Calibration, Leak Test, NVH, Electrical, Surface + +``` +Chassis Roller Dynamometer (EOL Dyno): + EOL dyno tests every vehicle's powertrain and safety systems + on rollers before shipment, typically 2–5 minutes per vehicle. + + Dyno configuration: + Rolls: 2WD (front or rear) or 4WD (twin-roller per axle) + Roll diameter: 48–72 inches (1.2–1.8 m), simulation of road + Roll surface: coated with high-friction material + Motoring + absorbing capability (AC motor/generator) + + Test sequence: + 1. Vehicle driven onto rolls, driver assist guides positioning + 2. Wheel chocks / restraints engaged (safety) + 3. Engine start / EV ready (OBD communication verified) + 4. Acceleration test: + Part-throttle acceleration: 0–60 km/h in specified time + WOT (wide open throttle) acceleration: 0–100 km/h + Time within ±5% of specification + Max power verification: calculated from acceleration rate + on known inertia + 5. Cruise test: + Steady-state at 50, 80, 100 km/h + Speedometer accuracy: +0% / −10% (never read low) + Wheel speed sensors: all 4 wheels within ±1 km/h + 6. Brake test: + Roller brake tester (RBT): each axle independently + Braking force per wheel: F_brake [kN] + Brake imbalance left-to-right: <20% + Parking brake efficiency: >16% on roller test + 7. ABS / ESP functional test: + Low-μ surface simulation (one roller driven, other free) + ABS cycling verified (pedal pulsation + wheel speed fluctuation) + ESP intervention at steering input (yaw rate sensor response) + 8. Deceleration / coast-down: + Drivetrain drag at specified speed (parasitic losses) + Excessive drag → brake drag, bearing issue + 9. Emissions test (if applicable): + Tailpipe probe: CO, HC, NOx at idle + fast idle + OBD readiness monitors: all monitors set (no pending codes) + EVAP monitor may be incomplete (needs cold start) + + Dyno acceptance criteria: + Speedometer error: 0 to −6% (at 50 km/h, display 50 → actual 47–50) + Braking force total: >50% of vehicle weight (service brake) + Brake L-R imbalance: <20% (front), <30% (rear, lower load) + ABS cycling: detected (wheel speed oscillation ±3 km/h at ~10 Hz) + No MIL (Malfunction Indicator Lamp) illuminated + No DTCs (Diagnostic Trouble Codes) in any ECU + +ADAS Calibration (Advanced Driver Assistance Systems): + Static calibration of cameras, radars, and LiDAR sensors to + ensure correct operation of safety systems. + + Calibration targets and setup: + Front camera (mono/stereo, behind windshield): + Target: multi-pattern board (chessboard + dots) at defined + distance (typically 2–5 m) and height + Vehicle positioned: perpendicular to target, ±0.5° yaw + Lighting: controlled illumination (no glare, uniform) + Calibration: camera intrinsic (focal length, distortion) + + extrinsic (pitch, yaw, roll relative to vehicle) + Pitch angle: −0.5 to +0.5° (road-facing, depends on vehicle) + Yaw: 0° ± 0.2° (aligned with vehicle centerline) + Roll: 0° ± 0.2° (horizontal) + + Front radar (long-range, 77 GHz): + Target: corner reflector (trihedral) or Doppler simulator + Distance: 3–5 m + Alignment: azimuth ±0.5°, elevation ±0.5° + Verification: range accuracy ±0.1 m, + velocity accuracy ±0.1 km/h + + Surround-view cameras (front, rear, side mirrors): + Calibration mat: checkerboard pattern on floor around vehicle + Stitching calibration: overlap zones between adjacent cameras + Bird's-eye view: seamless composite, no misalignment at seams + + LiDAR (if equipped): + Target: retroreflective panel at defined distance + Beam alignment verification: point cloud registration + + Calibration prerequisites: + Vehicle on level floor (±0.5°) + Tire pressures at specification (affects camera pitch) + Steering wheel centered (alignment previously completed) + Fuel tank level: half-tank (standard vehicle attitude) + No load in vehicle (except driver weight simulation) + + Dynamic calibration (radar/LiDAR): + Vehicle driven at 30–60 km/h on straight road + Radar aligns to detected stationary objects (guardrails, signs) + Typically 2–5 minutes driving for convergence + Used when static calibration insufficient or not available + +Water Leak Test: + Every vehicle tested for water ingress before shipment. + + Test booth: + High-pressure water spray booth, 360° coverage + Water pressure: 5–15 bar (varies with zone) + Nozzle arrangement: overhead, side, underbody + Water temperature: ambient (15–35°C) + Flow rate: 1,000–3,000 L/min total + + Test cycle: + Duration: 3–8 minutes per vehicle + Zones tested: roof, windshield, backlight, door seals, + hood, decklid, sunroof (if equipped), underbody + Vehicle may rotate on turntable or pass through tunnel + + Inspection: + Operator (inside vehicle) with flashlight inspects: + A-pillar / B-pillar / C-pillar trim (water tracks) + Headliner (stains, drips) + Door sill / carpet (wetness) + Instrument panel (drips from windshield) + Trunk / cargo area + Special attention: + Sunroof drains (clogged → overflow to headliner) + Door seal compression (gap → water entry) + Windshield PUR seal (void → leak at A-pillar) + + Acceptance: + Zero water ingress into passenger compartment + Class A surface: no visible water on interior trim + Underbody / engine bay: water present is acceptable + (not sealed areas) + Any leak → vehicle to repair bay, root cause analysis + + Additional tests: + Car wash simulation: rotating brushes + high-pressure spray + (validates trim attachment, antenna, mirror fold) + Dust test (select vehicles): talcum powder or fluorescent dye + in water to trace leak path + +NVH Audit (Noise, Vibration, Harshness): + Subjective and objective evaluation of vehicle NVH quality. + + Test environment: + Rolling road dynamometer in semi-anechoic chamber + Smooth roller surface (no tread pattern noise) + Background noise: <30 dB(A) + + Objective measurements: + Microphone positions: + Driver ear (outboard), passenger ear (outboard) + Rear seat (center or outboard) + Accelerometer positions: + Steering wheel (12 o'clock, tangential) + Seat track (vertical) + Floor pan (vertical) + + Test conditions: + Smooth road cruise: 50, 80, 100, 120 km/h + Overall dB(A): target <65 dB(A) at 100 km/h (compact), + <62 dB(A) (luxury) + Speech intelligibility index (SII): >0.85 at 100 km/h + Rough road: coarse asphalt simulation (textured roller) + dB(A) increase: <5 dB vs. smooth road + Idle: <42 dB(A) (gasoline), <45 dB(A) (diesel) + + Frequency analysis: + Engine orders: 2nd order (I4), 3rd order (V6), etc. + Booming noise: 20–200 Hz (structure-borne) + Wind noise: >500 Hz (A-pillar, mirror, door seal) + Gear whine: tonal at gear mesh frequency + + Subjective evaluation: + Squeak & Rattle (S&R) audit: + Test track: cobblestone, Belgian block, pothole simulation + Evaluator listens for: squeaks (plastic-on-plastic, + plastic-on-metal), rattles (loose fasteners, clips) + Rating: 1–10 (10 = no squeaks/rattles), >7 acceptable + Source identification: chassis ears (wireless microphones + placed at suspected locations) + + Wind noise: + Drive at 120–160 km/h (autobahn simulation) + Whistle (gap in seal), buffeting (sunroof open, window), + aspiration (door seal leak) + +Electrical Function Test: + Comprehensive test of all vehicle electronic systems via OBD-II + diagnostic connector and CAN bus communication. + + Test scope: + ECU presence check: all ECUs responding on bus + (PCM, TCM, ABS, SRS, BCM, IPC, ACM, etc.) + DTC scan: no current or pending DTCs, no permanent DTCs + OBD readiness monitors: + Gasoline: misfire, fuel system, comprehensive components, + catalyst, O₂ sensor, O₂ heater, EGR, EVAP + Diesel: comprehensive components, fuel system, misfire, + EGR, boost pressure, NOx aftertreatment, PM filter + All monitors must be "complete" (except EVAP, which + requires cold start and may be incomplete at EOL) + + Function tests (actuation via diagnostic command): + All exterior lighting: low/high beam, turn signals, + brake lights, DRL, fog lights + Horn: sound level >93 dB(A) at 2 m + Wipers/washers: front + rear, all speeds, washer spray + Power windows: all 4, auto up/down, anti-pinch + Power mirrors: fold, adjust, heat + Door locks: all doors + trunk + fuel door + HVAC: all modes (defrost, face, floor), temperature sweep, + blower speeds, A/C compressor engagement + Infotainment: screen, audio (all speakers verified), + microphone, Bluetooth/WiFi, navigation GPS acquisition + Passive entry / push-button start: key fob detection, + immobilizer, start button + ADAS self-test: camera/radar/LiDAR internal diagnostics + + Data logging: + All test results stored with VIN + ECU software version numbers recorded (configuration audit) + OBD parameters snapshot: VIN in PCM, calibration IDs, + CVN (Calibration Verification Numbers) + Battery voltage: >12.3 V (charged), charging voltage 13.5–14.8 V + +Surface Quality Inspection: + Automated optical inspection (AOI) of painted body surface + in LED tunnel or robotic scanning station. + + Inspection methods: + LED tunnel: diffuse white light, high-angle + low-angle + Camera array: line-scan or area-scan cameras + Resolution: 0.1–0.2 mm/pixel (detects defects ≥0.3 mm) + Robotic scanning: robot with structured light or + deflectometry sensor, scans entire surface + + Defect classification (AI-based): + Paint defects: + Dirt-in-paint (DIP): particle in clearcoat → crater/nipple + Crater / fisheye: surface depression (contamination) + Orange peel: waviness (long-wave LW 1–10 mm, + short-wave SW 0.1–1 mm) + Sag / run: vertical paint flow + Dry spray: rough texture (insufficient flow) + Color mismatch: ΔE >1.5 vs. master panel + Surface defects: + Dent / ding: deformation from handling + Scratch: through clearcoat, basecoat, or to substrate + Polish mark: hologram from rotary buffer + + Acceptance: + Class A surface (horizontal: hood, roof, decklid): + No DIP >0.5 mm, no visible defects at 1 m distance + Class B surface (vertical: doors, fenders): + No DIP >0.8 mm, no defects visible at 3 m distance + Class C surface (underbody, inside door jambs): + Functional only (corrosion protection) + + Defect marking: + Defect location marked on vehicle with removable sticker + Defect image stored with VIN + Rework decision: automated (above threshold) or + operator confirmation +``` + +#### 8.2 C++ API: End-of-Line Test + +```cpp +namespace vde::automotive_assembly::eol_test { + +enum class DynoDriveType { TwoWD_Front, TwoWD_Rear, FourWD_TwinRoller }; +enum class ADASSensorType { FrontCamera_Mono, FrontCamera_Stereo, FrontRadar_77GHz, CornerRadar, LiDAR, SurroundCamera }; +enum class LeakTestZone { Roof, Windshield, Backlight, DoorSeal, Sunroof, Hood, Decklid, Underbody }; +enum class NVHTestCondition { SmoothRoad_50kmh, SmoothRoad_100kmh, RoughRoad, Idle, WOT_Accel }; +enum class SurfaceClass { Class_A_Horizontal, Class_B_Vertical, Class_C_Underbody }; +enum class PaintDefectType { DirtInPaint, Crater, OrangePeel, Sag, DrySpray, Scratch, Dent, ColorMismatch }; + +struct ChassisDynoSpec { + DynoDriveType drive_type = DynoDriveType::TwoWD_Front; + double roll_diameter_m = 1.5; + double acceleration_0_60_target_s = 9.0; + double acceleration_0_60_tolerance_pct = 5.0; + double speedo_accuracy_max_pct = 0.0; // never read low + double speedo_accuracy_min_pct = -10.0; + double brake_force_min_pct_weight = 50.0; // service brake + double brake_l_r_imbalance_max_pct = 20.0; + double parking_brake_min_pct = 16.0; + bool abs_test_enabled = true; + double abs_cycle_frequency_hz_min = 8.0; + bool esp_test_enabled = false; + bool emissions_test_enabled = false; + double dyno_cycle_time_s = 180.0; // per vehicle +}; + +struct ADASCalibrationSpec { + ADASSensorType sensor_type = ADASSensorType::FrontCamera_Mono; + double target_distance_mm = 3500.0; + double target_height_mm = 1400.0; // from ground + double vehicle_yaw_tolerance_deg = 0.5; + double vehicle_pitch_tolerance_deg = 0.3; + // Camera calibration targets + double camera_pitch_target_deg = -0.2; + double camera_pitch_tolerance_deg = 0.15; + double camera_yaw_tolerance_deg = 0.2; + double camera_roll_tolerance_deg = 0.2; + int chessboard_squares_x = 9; + int chessboard_squares_y = 6; + double chessboard_square_mm = 60.0; + // Radar calibration + double radar_azimuth_tolerance_deg = 0.5; + double radar_elevation_tolerance_deg = 0.5; + double radar_range_accuracy_m = 0.1; + double radar_velocity_accuracy_kmh = 0.1; + // Surround view + bool stitching_calibration = false; + double stitching_max_error_pixels = 2.0; + // Dynamic calibration + bool dynamic_cal_possible = true; + double dynamic_cal_speed_kmh = 50.0; + double dynamic_cal_duration_s = 120.0; +}; + +struct WaterLeakTestSpec { + double water_pressure_bar = 8.0; + double test_duration_s = 300.0; // 5 minutes + double flow_rate_L_min = 2000.0; + std::vector zones_to_test = { + LeakTestZone::Roof, LeakTestZone::Windshield, LeakTestZone::Backlight, + LeakTestZone::DoorSeal, LeakTestZone::Sunroof + }; + bool car_wash_simulation = false; + bool fluorescent_dye_trace = false; + bool turntable_rotation = true; + double turntable_speed_rpm = 2.0; +}; + +struct NVHAuditSpec { + std::vector test_conditions = { + NVHTestCondition::SmoothRoad_50kmh, + NVHTestCondition::SmoothRoad_100kmh, + NVHTestCondition::Idle + }; + double smooth_100kmh_dBA_max = 65.0; // compact car + double idle_dBA_max = 42.0; // gasoline + double speech_intelligibility_min = 0.85; + double rough_road_delta_dBA_max = 5.0; // vs. smooth + // Squeak and rattle + bool squeak_rattle_audit = true; + int s_r_rating_min = 7; // 1–10 scale + std::string s_r_test_track = "cobblestone_25mm"; + // Wind noise + double wind_noise_120kmh_dBA_max = 68.0; + // Frequency bands + double booming_low_Hz = 30.0; // 20–200 Hz + double booming_high_Hz = 200.0; + double wind_noise_min_Hz = 500.0; + double gear_whine_tolerance_dBA = 3.0; // above background +}; + +struct ElectricalTestSpec { + bool ecu_presence_check = true; + bool dtc_scan = true; + bool obd_readiness_check = true; + std::vector exempt_monitors = {"EVAP"}; // may be incomplete + bool lighting_test = true; + bool horn_test = true; + double horn_min_dBA = 93.0; + bool wiper_washer_test = true; + bool power_windows_test = true; + bool hvac_test = true; + bool infotainment_test = true; + bool adas_self_test = true; + bool passive_entry_test = true; + double battery_voltage_min_V = 12.3; + double charging_voltage_min_V = 13.5; + double charging_voltage_max_V = 14.8; + bool software_version_audit = true; +}; + +struct SurfaceInspectionSpec { + double camera_resolution_mm_per_pixel = 0.15; + double dip_max_size_mm = 0.5; // Class A + double scratch_min_length_mm = 3.0; + double orange_peel_lw_max = 10.0; // long-wave waviness + double orange_peel_sw_max = 25.0; // short-wave waviness + double color_delta_E_max = 1.5; + bool ai_defect_classification = true; + double ai_confidence_threshold = 0.90; + bool auto_mark_defects = true; +}; + +struct EOLTestPerformance { + // Dyno + double acceleration_0_60_actual_s = 0.0; + double speedo_error_pct = 0.0; + double brake_force_total_kN = 0.0; + double brake_imbalance_pct = 0.0; + bool abs_cycling_detected = false; + bool dyno_pass = false; + // ADAS + double camera_pitch_error_deg = 0.0; + double camera_yaw_error_deg = 0.0; + double radar_azimuth_error_deg = 0.0; + bool adas_calibration_pass = false; + // Water leak + bool water_leak_pass = false; + std::vector leak_locations; + // NVH + double dBA_at_100kmh = 0.0; + double dBA_at_idle = 0.0; + double speech_intelligibility = 0.0; + int squeak_rattle_rating = 10; + bool nvh_pass = false; + // Electrical + int dtc_count = 0; + std::vector incomplete_monitors; + bool electrical_pass = false; + // Surface + int paint_defects_class_A = 0; + int surface_defects_total = 0; + bool surface_pass = false; + // Overall + bool overall_eol_pass = false; +}; + +ChassisDynoSpec design_chassis_dyno_test(DynoDriveType drive, double vehicle_weight_kg); +ADASCalibrationSpec design_adas_calibration(ADASSensorType sensor, double target_distance_mm); +WaterLeakTestSpec design_water_leak_test(double vehicle_length_mm, double vehicle_width_mm); +NVHAuditSpec design_nvh_audit(std::string vehicle_segment, bool luxury); +ElectricalTestSpec design_electrical_test(int num_ecus, bool full_infotainment); +SurfaceInspectionSpec design_surface_inspection(SurfaceClass class_level, double defect_tolerance_mm); + +EOLTestPerformance simulate_dyno_test(const ChassisDynoSpec& spec, double vehicle_mass_kg); +EOLTestPerformance simulate_adas_camera_calibration(const ADASCalibrationSpec& spec); +EOLTestPerformance simulate_adas_radar_calibration(const ADASCalibrationSpec& spec); +EOLTestPerformance simulate_water_leak_test(const WaterLeakTestSpec& spec); +EOLTestPerformance simulate_nvh_measurement(const NVHAuditSpec& spec, std::string vehicle_type); +EOLTestPerformance simulate_electrical_test(const ElectricalTestSpec& spec); +EOLTestPerformance simulate_surface_inspection(const SurfaceInspectionSpec& spec); + +double calculate_brake_imbalance(double force_left_N, double force_right_N); +double calculate_speech_intelligibility(double noise_dBA, double speech_dBA); +double calculate_color_delta_E(const std::array& lab_ref, const std::array& lab_measured); +double calculate_speedo_error(double indicated_kmh, double actual_kmh); + +} // namespace vde::automotive_assembly::eol_test +``` + +--- + +### 9. Acceptance Criteria + +1. **BIW Line AC**: Framing station must achieve dimensional Cp ≥1.33 on critical datums (±0.7 mm) with Cpk ≥1.33 sustained over 1,000 consecutive bodies. Takt time achievement must be ≥95% of design JPH with model changeover <30 s for multi-model flexible lines. Hem crack rate <1 per 10,000 panels. + +2. **Welding Process AC**: RSW weld lobe width ΔI ≥1.5 kA for steel stack-ups (2×0.7 mm), nugget diameter ≥4√t, tensile shear strength per AWS D8.9. Laser weld penetration within 80–120% of nominal, porosity <2%. Arc weld heat input within ±15% of target, fillet leg length ±1 mm. + +3. **Mechanical Joining AC**: SPR interlock distance ≥0.2 mm, head height 0 to −0.3 mm, no bottom sheet crack. FDS residual torque within specification, thread engagement >2 full threads in bottom sheet. Clinch neck thickness ≥30% of bottom sheet thickness. Adhesive lap shear within 15% of specification, cohesive failure mode, degree of cure >95%. + +4. **Powertrain Assembly AC**: Main and connecting rod bearing clearances within specification ±0.005 mm across all journals. Head bolt TTY angle within ±5° of specification, bolt stretch within ±0.05 mm (ultrasonic verification). Camshaft timing within ±1° crankshaft angle. Engine leak test <8 sccm at 0.5 bar. Cold test torque signature within ±3σ of golden reference. + +5. **xEV Assembly AC**: Hairpin stator HIPOT pass at 2×Unom + 1,000 V, surge test ±5% of golden waveform, phase resistance balance <2%. Rotor balancing G2.5 at max speed, flux density variation <5%. Battery pack helium leak <1×10⁻⁷ mbar·L/s, isolation resistance >500 Ω/V per UN R100, formation capacity ±2% of rated. Fuel cell stack cell voltage uniformity ±20 mV, H₂ crossover <5 sccm. + +6. **Tightening AC**: Class A joints Cpk ≥1.67 for both torque and angle, 100% monitoring with VIN traceability. Residual torque ratio 0.85–1.15 for AT joints. Defect detection rate >99.5% (cross-thread, bottoming, wrong bolt, reuse). NOK joint must trigger station lock (Poka-Yoke), preventing conveyor index. + +7. **Final Assembly AC**: Chassis marriage docking accuracy ±2 mm in X/Y, ±3 mm in Z. Cockpit insertion without interference (no part damage, all connectors fully seated). Glazing PUR bead continuity 100% (no gaps), glass position ±0.5 mm. Brake fluid vacuum leak-up <10 mbar in 10 s, A/C charge within ±5 g of specification. Wheel alignment all parameters within tolerance, thrust angle <0.08°. + +8. **EOL Test AC**: Chassis dyno: speedometer error 0 to −6%, brake imbalance <20% front/<30% rear, ABS cycling detected. ADAS camera calibration within ±0.2° yaw, ±0.15° pitch. Water leak: zero ingress to passenger compartment. NVH: overall <65 dB(A) at 100 km/h (compact), squeak-and-rattle rating ≥7/10. Electrical: zero current DTCs, all OBD monitors complete (except EVAP). Surface: Class A defects >0.5 mm detected with AI confidence ≥90%. + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|----------|-------|-----------| +| ISO 17657 | Resistance welding — Welding current measurement for resistance welding | RSW current measurement, calibration | +| ISO 18278-1 | Resistance welding — Weldability — Part 1: Assessment of weldability for resistance spot welding of metallic materials | RSW weld lobe determination, testing | +| ISO 18278-2 | Resistance welding — Weldability — Part 2: Alternative procedures for assessment of sheet steels | Automotive steel RSW qualification | +| AWS D8.9M | Test methods for evaluating resistance spot welding behavior of automotive sheet steel | RSW quality: tensile shear, cross-tension, macro | +| ISO 13919-1 | Welding — Electrons and laser beam welded joints — Guidance on quality levels for imperfections | Laser weld defect classification | +| ISO 5817 | Welding — Fusion-welded joints in steel, nickel, titanium — Quality levels for imperfections | Arc weld defect classification | +| ISO 14329 | Resistance welding — Destructive tests of welds — Failure types and geometric measurements for spot and projection welds | RSW/projection failure mode classification | +| ISO 17653 | Resistance welding — Destructive tests on welds in metallic materials — Torsion test of resistance spot welds | Projection nut torque test | +| ISO 14588 | Blind rivets — Terminology and definitions | Blind rivet types and specifications | +| ISO 12996 | Mechanical joining — Destructive testing of joints — Specimen dimensions and test procedure for tensile shear testing of single joints | SPR/FDS tensile shear test | +| ISO 5393 | Rotary tools for threaded fasteners — Performance test method | DC nutrunner calibration, accuracy | +| ISO 6789 | Assembly tools for screws and nuts — Hand torque tools | Torque wrench calibration | +| VDI 2862 | Minimum requirements for use of tightening systems and tools for threaded fasteners in the automotive industry | Joint classification (A/B/C), tightening strategies, SPC | +| VDA 286 | Process capability in the tightening technology — Minimum requirements for tightening threaded fasteners | Cpk/Cmk requirements | +| IATF 16949 | Quality management system requirements for automotive production and relevant service parts organizations | Automotive QMS, process control, traceability | +| ISO 14253-1 | Geometrical product specifications (GPS) — Inspection by measurement of workpieces and measuring equipment — Decision rules | Dimensional measurement, tolerance verification | +| ISO 2768 | General tolerances — Tolerances for linear and angular dimensions | BIW dimensional tolerances | +| ISO 1101 | Geometrical product specifications (GPS) — Geometrical tolerancing | Datum schemes, body-in-white GD&T | +| ISO 22074 | Road vehicles — Vehicle dynamics test methods — General conditions for passenger cars | Chassis dyno test conditions | +| FMVSS 108 / ECE R48 | Lamps, reflective devices, and associated equipment / Installation of lighting | Headlamp aiming, function test | +| FMVSS 135 / ECE R13-H | Light vehicle brake systems | Brake force balance, parking brake efficiency | +| UN ECE R100 | Uniform provisions concerning the approval of vehicles with regard to specific requirements for the electric power train | EV isolation resistance >500 Ω/V, HiPot | +| ISO 20653 | Road vehicles — Degrees of protection (IP code) — Protection of electrical equipment against foreign objects, water and access | IP67/IP6K9K for battery pack | +| ISO 14644-1 | Cleanrooms and associated controlled environments — Classification of air cleanliness | Battery module cleanroom class | +| ISO 3744 / ISO 5128 | Acoustics — Determination of sound power levels / Measurement of noise inside motor vehicles | NVH measurement method | +| SAE J2807 | Performance requirements for determining tow-vehicle gross combination weight rating and trailer weight rating | Tow vehicle dyno test | +| ISO 16530 | Structural adhesives — Determination of shear behaviour of structural bonds — Lap shear test method | Adhesive bond strength testing | +| ASTM D1002 | Standard test method for apparent shear strength of single-lap-joint adhesively bonded metal specimens | Adhesive lap shear test | +| DVS 2616 | Resistance welding in the automotive industry — Quality assurance | German RSW quality standard | +| IEC 62660-2 | Secondary lithium-ion cells for the propulsion of electric road vehicles — Reliability and abuse testing | xEV cell reliability testing | +| ISO 19453 | Road vehicles — Environmental conditions and testing for electrical and electronic equipment | Battery pack environmental testing | + +--- + +## Benchmarks + +| Target | Class | Characteristic | +|--------|-------|----------------| +| KUKA Titan / KR QUANTEC | Industrial robot | 6-axis, 1,000 kg payload (Titan), 120–300 kg (QUANTEC), KUKA.Ready2_Spot | +| ABB IRB 6700 / 7600 | Industrial robot | Spot welding, 150–500 kg payload, SpotPack, TrueMove | +| FANUC R-2000iD / M-900iA | Industrial robot | Servo weld gun, iRVision 3DL, high rigidity | +| COMAU NJ 290 / NJ 370 | Industrial robot | 290–370 kg, hollow wrist, SmartDrive | +| TOX Pressotechnik / Henrob | SPR / Clinching | 30–80 kN servo press, force-displacement monitoring | +| Böllhoff RIVSET / FDS | FDS / SPR | Flow drill screw system, 6,000 rpm spindle | +| Atlas Copco Power Focus 6000 / Tensor STR | DC nutrunner | 0.5–4,000 Nm, transducerized, 14 strategies, SQS3 analytics | +| Bosch Rexroth Nexo / TS | DC nutrunner | Integrated WiFi/RFID, traceability, multi-stage strategies | +| Desoutter EABC / EABS | DC nutrunner | Angle fixture, wireless transducer, CONNECT platform | +| TRUMPF TruDisk / TruFiber | Laser welding | 2–16 kW disk/fiber, BrightLine weld, PFO scanner | +| IPG Photonics YLS | Laser welding | Fiber laser, 1–100 kW, LDD welding head | +| Coherent HighLight FL-ARM | Laser welding | Fiber, 4–10 kW, adjustable ring mode | +| Fronius TPS/i CMT | Arc welding | CMT (cold metal transfer), pulse multi-control | +| Lincoln Power Wave S500 | Arc welding | Waveform control technology, advanced process | +| ThyssenKrupp Automotive | Assembly line | BIW body shop, engine assembly, final assembly | +| Dürr Assembly Products | Assembly & filling | x-line final assembly, EcoFill for fluids | +| AVL / MAHA / HORIBA | Chassis dyno | EOL roller dynamometer, 2WD/4WD, up to 250 km/h | +| Beissbarth / Dürr | Wheel alignment | CCD/laser alignment, QAT headlamp tester | +| VISION IC / Bürkle | ADAS calibration | Multi-sensor static calibration, brand-agnostic | +| Car-O-Liner / Pro-Cam | ADAS calibration | Camera/radar/LiDAR integration | +| Jenoptik / Isra Vision | Surface inspection | AOI paint inspection, AI defect classification | +| Atlas Copco IAS / Henrob | SPR / clinching | Henrob SPR, Clinch Systems, adhesive dispensing | +| ABB FlexLoader / FlexGripper | Material handling | Modular loading, vision-guided, quick-change gripper | +| FANUC Paint / Sealer Process | Dispensing | Robotic sealer, paint, adhesive with closed-loop flow | +| Festo ServoPress YJKP | Servo press | 0.5–17 kN, force-displacement monitoring for press-fit | +| Kistler / HBM | Transducer / DAQ | Torque/force transducers, multi-channel DAQ for test stands | +| Siemens SIMATIC / TIA Portal | PLC / Automation | Line control, safety PLC, RFID track-and-trace | + +--- + +## C++ API Namespace Summary + +```cpp +// BIW Welding Line +namespace vde::automotive_assembly::biw_welding { } +// enums: LocatingScheme, ClampType, FramingType, HemmingMethod, SealerType, ConveyorType, ProductionLayout +// structs: FixtureSpec, FramingStationSpec, RespotStationSpec, HemmingSpec, SealerApplicationSpec, FMSLayoutSpec, BIWLinePerformance +// factories: design_fixture_3_2_1, design_locating_pins, design_framing_station, design_respot_stations, +// design_hemming_process, design_sealer_bead, design_fms_layout +// simulators: simulate_biw_line_throughput, simulate_framing_geometry, simulate_hemming_quality, simulate_sealer_application +// calculators: calculate_takt_time, calculate_parallel_stations, calculate_hem_thickness, calculate_weld_pitch_min, +// calculate_buffer_capacity + +// Welding Processes +namespace vde::automotive_assembly::welding_processes { } +// enums: RSWPowerType, ElectrodeCapMaterial, LaserType, ArcTransferMode, ShieldingGas, WeldJointType +// structs: RSWSpec, LaserWeldSpec, ArcWeldSpec, ProjectionWeldSpec, WeldQualityResult +// factories: design_rsw_parameters, design_rsw_lobe, design_laser_weld, design_laser_brazing, +// design_arc_weld, design_cmt_weld, design_projection_weld +// simulators: simulate_rsw_nugget, simulate_laser_weld, simulate_arc_weld, simulate_projection_weld +// calculators: calculate_rsw_heat_input, calculate_rsw_nugget_diameter_min, calculate_laser_intensity, +// calculate_arc_heat_input, calculate_arc_deposition_rate + +// Mechanical Joining +namespace vde::automotive_assembly::mechanical_joining { } +// enums: SPRRivetMaterial, SPRDieType, FDSMaterial, ClinchingType, BlindRivetType, AdhesiveType, AdhesiveFailureMode +// structs: SPRSpec, FDSSpec, ClinchingSpec, BlindRivetSpec, AdhesiveBondSpec, MechanicalJointQuality +// factories: design_spr_joint, design_spr_die, design_fds_joint, design_clinch_joint, design_blind_rivet, design_adhesive_bond +// simulators: simulate_spr_setting, simulate_fds_installation, simulate_clinching, simulate_blind_rivet_setting, simulate_adhesive_cure +// calculators: calculate_spr_interlock_min, calculate_spr_button_force, calculate_adhesive_lap_shear_strength, calculate_blind_rivet_shear_strength + +// Powertrain Engine Assembly +namespace vde::automotive_assembly::powertrain_ice { } +// enums: BearingClearanceMethod, BoltTighteningStrategy, LeakTestMethod, ColdTestParameter +// structs: BearingClearanceSpec, PistonRingSpec, CylinderHeadBoltSpec, CamshaftTimingSpec, EngineLeakTestSpec, +// EngineColdTestSpec, EngineAssemblyPerformance +// factories: design_bearing_clearance, design_piston_ring_gap, design_head_bolt_tty, design_camshaft_timing, +// design_engine_leak_test, design_engine_cold_test +// simulators: simulate_bearing_assembly, simulate_piston_ring_install, simulate_head_bolt_tightening, +// simulate_cam_timing_check, simulate_engine_leak_test, simulate_engine_cold_test +// calculators: calculate_bearing_clearance, calculate_piston_ring_end_gap, calculate_tty_clamp_force, +// calculate_leak_rate_sccm, calculate_cold_test_torque_variation + +// xEV Electric Drive & Battery +namespace vde::automotive_assembly::xev_electric_drive { } +// enums: HairpinWireShape, MagnetGrade, CellFormFactor, CellChemistry, PackSealingMethod, FCBipolarPlateMaterial, WindingTestType +// structs: HairpinStatorSpec, PMRotorSpec, BatteryModuleSpec, BatteryPackSpec, FuelCellStackSpec, xEVAssemblyPerformance +// factories: design_hairpin_stator, design_pm_rotor, design_battery_module, design_battery_pack, design_fuel_cell_stack +// simulators: simulate_hairpin_winding, simulate_hairpin_laser_welding, simulate_rotor_magnet_assembly, +// simulate_rotor_balancing, simulate_module_stacking, simulate_module_electrical_test, +// simulate_pack_sealing_test, simulate_pack_formation, simulate_fc_stack_compression, simulate_fc_stack_leak_test +// calculators: calculate_slot_fill_factor, calculate_centrifugal_force, calculate_cell_compression_force, +// calculate_pack_isolation_resistance, calculate_fc_gdl_compression + +// Tightening & Process Control +namespace vde::automotive_assembly::tightening_control { } +// enums: TighteningStrategy, JointClass, NutrunnerType, ToolVerification +// structs: TighteningSpec, TighteningResult, ToolCalibrationSpec, SPCResult +// factories: design_tightening_strategy, design_at_joint, design_yield_point_joint, design_multi_spindle_sync +// simulators: simulate_tightening_rundown, simulate_spc_analysis, simulate_residual_torque_check, simulate_cmk_evaluation +// calculators: calculate_cpk, calculate_cmk, calculate_clamp_load_from_torque, calculate_yield_slope_max, classify_defect_signature + +// Final Assembly +namespace vde::automotive_assembly::final_assembly { } +// enums: CockpitInsertionMethod, GlazingPURType, FluidType, AlignmentParameter +// structs: ChassisMarriageSpec, CockpitModuleSpec, GlazingSpec, FluidFillSpec, WheelAlignmentSpec, FinalAssemblyPerformance +// factories: design_chassis_marriage, design_cockpit_insertion, design_glazing_process, design_brake_fluid_fill, +// design_ac_charge, design_wheel_alignment +// simulators: simulate_marriage_docking, simulate_cockpit_loading, simulate_pur_dispensing, simulate_glass_placement, +// simulate_fluid_vacuum_fill, simulate_wheel_alignment +// calculators: calculate_vacuum_leak_rate, calculate_pur_bead_volume, calculate_alignment_thrust_angle, calculate_headlamp_cutoff_height + +// End-of-Line Test +namespace vde::automotive_assembly::eol_test { } +// enums: DynoDriveType, ADASSensorType, LeakTestZone, NVHTestCondition, SurfaceClass, PaintDefectType +// structs: ChassisDynoSpec, ADASCalibrationSpec, WaterLeakTestSpec, NVHAuditSpec, ElectricalTestSpec, +// SurfaceInspectionSpec, EOLTestPerformance +// factories: design_chassis_dyno_test, design_adas_calibration, design_water_leak_test, design_nvh_audit, +// design_electrical_test, design_surface_inspection +// simulators: simulate_dyno_test, simulate_adas_camera_calibration, simulate_adas_radar_calibration, simulate_water_leak_test, +// simulate_nvh_measurement, simulate_electrical_test, simulate_surface_inspection +// calculators: calculate_brake_imbalance, calculate_speech_intelligibility, calculate_color_delta_E, calculate_speedo_error +``` \ No newline at end of file diff --git a/docs/feedback/VDE-1145.md b/docs/feedback/VDE-1145.md new file mode 100644 index 000000000..041b335d8 --- /dev/null +++ b/docs/feedback/VDE-1145.md @@ -0,0 +1,2575 @@ +# VDE-1145: Aerospace Assembly Equipment Engine Requirements (航空装配设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign AerospaceAssemblyEngine — large component join & alignment, panel & skin assembly, wing & empennage assembly, turbofan engine assembly, engine build & test, avionics integration & EWIS, ground & flight test +**Module**: `vde/aerospace_assembly/airframe_assembly.h`, `vde/aerospace_assembly/engine_propulsion.h`, `vde/aerospace_assembly/avionics_test.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Aerospace Assembly / Airframe / Turbofan / Avionics / Flight Test + +--- + +## Background + +Modern commercial and military aircraft assembly represents one of the most complex manufacturing integration challenges in industrial engineering. The assembly of a Boeing 787 or Airbus A350 XWB involves joining over 2.5 million individual parts into a final vehicle that must withstand extreme aerodynamic, thermal, and mechanical loads while maintaining passenger safety with catastrophic failure probability below 1×10⁻⁹ per flight hour. The aerospace assembly domain spans four major sub-disciplines: airframe structural assembly (fuselage, wings, empennage), propulsion system integration (turbofan engines with 60,000–115,000 lbf thrust), avionics and electrical wiring interconnection systems (EWIS), and ground/flight test validation. + +Large component join and alignment is the foundational capability for final assembly lines (FAL). The fuselage is typically divided into major sections — nose, forward (FWD), mid, aft, and tail cone — each fabricated separately and then joined at circumferential junctions. Automated positioning systems using multiple POGO (Programmable Ground Operation) actuators provide multi-axis servo control under the guidance of 3D metrology systems. Leica laser trackers (AT960/AT930) achieve volumetric accuracy of ±15µm + 6µm/m and are used to measure 6-degree-of-freedom (6DoF) positions of fuselage sections with target reflectors (1.5" SMR or T-Probe). Alternatively, iGPS (indoor GPS) systems from Nikon Metrology use rotating laser transmitters to triangulate positions of multiple sensors simultaneously across the factory floor. Wing-to-fuselage join involves mating the wing root rib to the center wing box keel beam, requiring precise fastener hole drilling through multi-layer stacks (titanium + CFRP + aluminum) with H7 hole tolerance (+0/-0.015mm) and jig-less assembly technologies. + +Panel and skin assembly involves stiffened skin panels where stringers, frames, and clip ribs are joined to the outer skin. Automated drilling and riveting machines (E-MAG, Brotje, Gemcor) perform one-up assembly (jig-less) using electromagnetic riveting (EMR) for interference-fit fasteners. Composite panel manufacturing uses Automated Fiber Placement (AFP) with 3.2/6.4/12.7mm tow widths, InSitu laser heating for thermoset/thermoplastic consolidation, and compaction rollers maintaining minimum steering radius control. Automated Tape Laying (ATL) applies wide carbon fiber prepreg tape (75/150/300mm) with contour-parallel or perpendicular strategies. Autoclave cure cycles control temperature ramp (1–3°C/min), dwell at 120–180°C, and N₂ pressurized at 6–7 bar with vacuum bag sealant tape, bleeder, and peel ply layup. + +Turbofan engine assembly involves the core engine (HPC high-pressure compressor with rotor disk stacking via broach fir-tree slots, variable IGV/VGV stator vanes), combustor (Rich-Quench-Lean RQL / TAPS lean burn with TBC YSZ thermal barrier coatings), HPT/LPT turbine stages with single crystal CMSX-4/PWA 1484 blades and film cooling, and fan section with wide chord hollow Ti or CMC composite blades within a Kevlar-wrapped containment case. Engine testing includes sea level static thrust stands, altitude test facilities, bird ingestion tests (2.5–3.65kg bird), and ice accretion certification. + +Avionics integration covers fly-by-wire (FBW) flight control with triplex/quadruplex redundancy voting, navigation (IRS/INS+GPS SBAS), communications (VHF 118–137MHz/8.33kHz, SATCOM), surveillance (WXR, TCAS II, ADS-B), cockpit displays (PFD/ND/EICAS, HUD), and EWIS wiring harnesses with MIL-DTL-38999 connectors and HiPot/IR/TDR testing. Ground and flight tests include Iron Bird hydraulic integration, full-scale static test to 150% ultimate load, fatigue test with S-N spectrum, flight flutter test with damping ratio verification, and EMC/HIRF certification. + +Leading industry benchmarks include Boeing (B787/B777X at BSCA Everett/North Charleston), Airbus (A350 XWB FAL / A320neo FAL at Toulouse, Hamburg, Mobile, Tianjin), COMAC (C919 FAC at Shanghai Pudong), GE Aviation (GE9X, GE90, GEnx), Rolls-Royce (Trent XWB, UltraFan at Derby), Pratt & Whitney (PW1000G GTF), CFM International (LEAP-1A/1B/1C), Safran, Spirit AeroSystems, Leonardo, Triumph, GKN Aerospace, Brotje/Gemcor/E-MAG (automated drill & rivet), MTorres/Ingersoll/Fives (AFP/ATL), Hexagon Leica (laser tracker), Nikon Metrology (iGPS), Collins Aerospace/Honeywell/Thales (avionics), and regulatory frameworks including FAA FAR Part 25, EASA CS-25, MIL-STD, ARINC 429/629/664, ARP 4754A, DO-178C, and DO-254. + +VDE currently lacks: +- Large component join & alignment design (fuselage junction geometry and tolerance stack, POGO actuator multi-axis servo kinematics, Leica laser tracker 6DoF measurement error propagation, iGPS constellation geometry dilution of precision DOP, bore/hone H7 tolerance analysis, wing-to-fuselage join load distribution, empennage incidence/dihedral setting) +- Panel & skin assembly design (E-MAG/Brotje drill/rivet cycle time and fastener installation force model, electromagnetic rivet (EMR) discharge energy and interference fit, AFP tow placement deviation model with steering radius constraint, ATL tape path planning with contour offset, autoclave cure thermal simulation with exothermic reaction and temperature gradient through laminate thickness) +- Wing & empennage assembly design (wing box spar/rib/skin assembly jig, movable surface kinematics for slat/flap/aileron/spoiler, fuel tank sealant application coverage, HTP+Elevator and VTP+Rudder alignment) +- Turbofan engine assembly design (HPC rotor stack broach fir-tree contact stress and balance, variable IGV/VGV schedule and tip clearance active control, combustor RQL/TAPS flow distribution and LBO lean blowout, HPT blade film cooling effectiveness with shaped holes, fan blade containment energy absorption) +- Engine test design (sea level static thrust measurement load cell calibration, altitude test facility inlet bellmouth flow conditioning, SFC specific fuel consumption measurement uncertainty, EGT margin vs. turbine life, bird ingestion impact dynamics, ice accretion test) +- Avionics & EWIS design (FBW FCC flight control redundancy voting, EHA/EBHA actuator performance, REU remote electronic unit wiring, electrical harness MIL-DTL-38999 connector contact crimp force, HiPot insulation resistance 500V megger and TDR time domain reflectometry, HIRF bonding) +- Ground & flight test design (Iron Bird hydraulic 3000psi/5000psi system, full-scale static test strain gauge network layout, fatigue test S-N spectrum rainflow cycle counting, flight test instrumentation DAU data acquisition and pitot-static calibration, flutter analysis damping ratio from frequency sweep, EMC/HIRF indirect effects) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native aerospace assembly equipment engine. + +--- + +## Detailed Requirements + +### 1. Large Component Join & Alignment (P1) + +#### 1.1 Fuselage Major Junction, POGO Actuator, and Laser Tracker 6DoF Alignment + +``` +Fuselage major junction assembly overview: + The fuselage is assembled from major sections joined at circumferential + junctions. Each section (nose, FWD, MID, AFT, tail cone) is positioned + using multiple POGO actuators providing 6DoF motion. Alignment is + measured by laser tracker or iGPS to achieve bore/hone tolerance H7. + + Fuselage section coordinate system: + Each section defines its own local coordinate frame {S_i} with origin + at the section center point. The global assembly coordinate frame {G} + is defined at the FAL floor reference. + + Section transformation (6DoF pose): + T_{G←S_i} = [R(roll,pitch,yaw) | t(x,y,z)] + + Where: + R = R_z(yaw)×R_y(pitch)×R_x(roll) (Euler intrinsic ZYX) + t = [Δx, Δy, Δz]^T (translation vector) + + POGO actuator kinematics: + Each POGO is a 3-DOF prismatic actuator (vertical Z, longitudinal X, + lateral Y) supporting the fuselage section via a spherical joint at + the contact point. + + For N POGOs supporting a section: + POGO_i position: p_i^G = [x_i, y_i, z_i]^T in global frame + POGO_i stroke: s_i = [sx_i, sy_i, sz_i]^T + + Inverse kinematics (section pose → POGO strokes): + Given desired section pose T_{G←S}, compute required POGO strokes: + s_i = p_i^G_target − p_i^G_current + + The pose T is estimated from metrology measurements on reference + targets T_j mounted on the section surface. + + Forward kinematics (POGO strokes → section pose): + Minimize: Σ_i ||p_i^G − (R·p_i^S + t)||² (point cloud registration) + This is the Procrustes problem solved via SVD. + + POGO servo control: + PID control per axis: + u_i(t) = Kp·e_i(t) + Ki·∫e_i(τ)dτ + Kd·(de_i/dt) + e_i = s_i_target − s_i_actual + + Synchronized multi-axis motion (≤0.1mm tracking error between axes) + + Leica laser tracker 6DoF measurement: + Laser tracker measures spherical coordinates (d, θ, φ) to SMR target: + d = distance (interferometer, ±0.5µm/m) + θ = horizontal angle (angular encoder, ±15µm + 6µm/m) + φ = vertical angle (angular encoder, ±15µm + 6µm/m) + + Cartesian conversion: + x = d × cos(φ) × cos(θ) + y = d × cos(φ) × sin(θ) + z = d × sin(φ) + + For 6DoF measurement using T-Probe or multiple SMRs: + At least 3 non-collinear targets define a rigid body + P_i^LT = [x_i, y_i, z_i]^T (target i in laser tracker frame) + Rigid body pose solved via SVD (Arun's method): + H = Σ_i (q_i − q̄)·(p_i − p̄)^T + SVD: H = U·Σ·V^T + R = V·U^T (rotation), t = q̄ − R·p̄ (translation) + + Measurement uncertainty propagation: + Covariance of pose: Σ_T = J·Σ_meas·J^T + J = Jacobian of SVD pose estimation + Σ_meas = diag(σ²_d, σ²_θ, σ²_φ) for each target + Typical volumetric uncertainty: ±0.05mm for 1m object + + iGPS (indoor GPS) measurement: + Multiple rotating laser transmitters (≥4 for good geometry) + Each transmitter emits two fan beams at known angles + Sensor measures time between beam strikes → azimuth & elevation + Triangulation from ≥3 transmitters → 3D position + + Dilution of Precision (DOP): + DOP = trace((H^T×H)^(−1))^0.5 + H = geometry matrix (direction cosines to transmitters) + Good DOP < 2.0 (transmitters well-distributed in volume) + + iGPS advantages: + - Multiple sensors tracked simultaneously (no sequential target lock) + - No warm-up time, factory-floor scale (50m × 50m × 20m) + - Accuracy: ±0.25mm at 10m range (with good geometry) + + Fuselage junction alignment procedure: + Step 1: Pre-position sections using POGO actuators in open-loop + Step 2: Measure reference targets on both sections (laser tracker / iGPS) + Step 3: Compute delta pose between sections: + ΔT = T_{G←S_j}⁻¹ × T_{G←S_i} + Δx, Δy, Δz = translation errors [mm] + Δroll, Δpitch, Δyaw = angular errors [arcmin] + + Step 4: Closed-loop alignment: + While max(|Δx|,|Δy|,|Δz|) < tolerance AND angle < tolerance: + Compute POGO correction strokes from ΔT + Execute synchronized POGO motion + Re-measure and update ΔT + + Step 5: Bore & hone tolerance verification: + Junction fastener holes are line-bored and honed after alignment + Hole diameter: D_nominal ±0 (H7: +0/−0.015mm for D≤10mm) + Circularity: <0.005mm + Cylindricity: <0.010mm over 2D depth + + Wing-to-fuselage join: + Wing box root rib mates to fuselage center keel beam + Fastener hole drilling through multi-material stack: + CFRP skin (top) + aluminum frame + titanium fitting (bottom) + One-up drilling with PCD (polycrystalline diamond) drill + Feed rate: 0.05–0.15mm/rev depending on material layer + Peck drilling for CFRP to avoid delamination + + Load distribution at wing root: + Bending moment M [N·m] → tension in upper skin, compression in lower + Shear force V [N] → transferred through shear ties + Fastener pattern design: + Pitch: 4D–6D (D = fastener diameter, typically 4.76–9.52mm) + Edge distance: 2D minimum + Rows: 2–4 rows staggered + Material-specific bearing stress check: + σ_brg = P / (D × t) < σ_allowable + + Empennage join (HTP + VTP): + Horizontal tail plane (HTP) alignment: + Incidence angle: typically −1° to +2° (adjustable via trim actuator) + Dihedral: 0° to +5° (aerodynamic stability) + + Vertical tail plane (VTP) alignment: + Offset from fuselage centerline < 0.5mm + Verticality < 0.05° (checked with inclinometer / laser tracker) + + Integral fuel tank sealing: + Sealant application: + Material: PR1776 (polysulfide, brushable, class B-2) or PR1826 + Joint type: fillet seal, faying surface seal, injection seal + Application: pneumatic sealant gun, 3–5mm fillet radius + Cure: 14 days at 25°C/50%RH (accelerated: 24h at 50°C) + + Rivet wet seal: + Sealant applied to rivet shank before installation + Squeeze-out forms seal around rivet head + Leak check: pressure decay test ≤0.5 psi/min at 5 psi differential + + Fuselage pressure seal (frame-to-skin): + Sealant groove in frame flange: 3mm × 3mm + Continuous bead along frame perimeter + Overlap at frame splices: ≥25mm + +C++ API design for fuselage join: + AirframeJoinSpec holds section geometry, POGO configuration, metrology + system type, and tolerance targets. The alignment solver computes the + optimal POGO stroke sequence for given target tolerances. +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class MetrologySystem { Leica_LaserTracker_AT960, Leica_AT930, Nikon_iGPS, API_Radian, Custom }; +enum class POGO_Type { ThreeAxis_XYZ, TwoAxis_XZ, SingleAxis_Z, SphericalJoint }; +enum class FuselageSection { Nose, FWD, Mid, AFT, TailCone, WingBox, Custom }; +enum class FastenerType { HiLite, HiLok, Lockbolt, TaperLok, ComposiLok, EddieBolt }; + +struct POGO_ActuatorSpec { + int pogo_id; + POGO_Type type; + double x_stroke_min_mm; // minimum X stroke + double x_stroke_max_mm; // maximum X stroke + double y_stroke_min_mm; + double y_stroke_max_mm; + double z_stroke_min_mm; + double z_stroke_max_mm; + double load_capacity_kg; + double max_velocity_mm_per_s; + double max_acceleration_mm_per_s2; + double positioning_repeatability_um; // ±µm + double kp_gain; // PID proportional gain + double ki_gain; // PID integral gain + double kd_gain; // PID derivative gain + std::array global_position_mm; // [x, y, z] in FAL frame +}; + +struct SectionPose { + double x_mm; // translation X + double y_mm; // translation Y + double z_mm; // translation Z + double roll_deg; // rotation about X + double pitch_deg; // rotation about Y + double yaw_deg; // rotation about Z +}; + +struct FuselageSectionSpec { + FuselageSection type; + std::string section_name; // e.g., "FWD_Fuselage_S41" + double length_mm; + double max_diameter_mm; + double weight_kg; + double cg_offset_from_nose_mm; // CG position in section CS + std::vector> reference_targets_mm; // target positions in section CS + SectionPose initial_pose; +}; + +struct MetrologyConfigSpec { + MetrologySystem system; + int num_instruments; // for iGPS: number of transmitters + double measurement_frequency_Hz; // typically 100–1000 Hz + double volumetric_accuracy_um; // ±µm at specified range + double warmup_time_min; + bool temperature_compensation; + bool real_time_6dof; +}; + +struct JunctionSpec { + FuselageSectionSpec section_a; + FuselageSectionSpec section_b; + double target_gap_mm; // design gap between sections + double gap_tolerance_plus_mm; + double gap_tolerance_minus_mm; + double angular_tolerance_arcmin; + double concentricity_tolerance_mm; // radial alignment + int num_fasteners_circumferential; + FastenerType fastener_type; + double fastener_diameter_mm; // 4.76, 6.35, 7.94, 9.52 + double hole_tolerance_um; // H7: +0/−15 for D≤10 + bool line_bore_required; + bool hone_required; +}; + +struct AirframeJoinSpec { + FuselageSectionSpec nose_section; + FuselageSectionSpec fwd_section; + FuselageSectionSpec mid_section; + FuselageSectionSpec aft_section; + FuselageSectionSpec tail_cone; + std::vector pogo_actuators; + MetrologyConfigSpec metrology; + std::vector junctions; // nose-FWD, FWD-MID, MID-AFT, AFT-cone + double alignment_settling_time_s; // post-motion settle before measurement + int max_alignment_iterations; + double alignment_convergence_threshold_mm; +}; + +struct AirframeJoinState { + std::map section_poses; + std::vector pogo_strokes_mm; // [x1,y1,z1, x2,y2,z2, ...] + double current_max_position_error_mm; + double current_max_angle_error_arcmin; + int alignment_iteration_count; + bool alignment_converged; + std::vector metrology_quality_DOP; // per measurement +}; + +struct AirframeJoinPerformance { + double final_gap_achieved_mm; + double final_concentricity_mm; + double hole_tolerance_achieved_um; + double alignment_time_min; + double alignment_accuracy_cpk; // process capability index + bool within_tolerance; +}; + +AirframeJoinSpec design_airframe_join( + const std::vector& sections, + int num_pogo_per_section, + MetrologySystem metrology, + double target_gap_mm = 0.3 +); + +AirframeJoinState initialize_join_state(const AirframeJoinSpec& spec); + +AirframeJoinPerformance simulate_airframe_join( + const AirframeJoinSpec& spec, + AirframeJoinState& state, + double ambient_temp_C, + double floor_vibration_mm_per_s2 +); + +SectionPose compute_section_pose_from_targets( + const std::vector>& measured_targets_mm, + const std::vector>& nominal_targets_mm +); + +std::vector compute_pogo_strokes( + const SectionPose& desired_pose, + const SectionPose& current_pose, + const std::vector& pogos +); + +double calculate_DOP( + const std::vector>& transmitter_positions, + const std::array& sensor_position, + MetrologySystem system +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 2. Panel & Skin Assembly (P1) + +#### 2.1 Automated Drilling, AFP, ATL, and Autoclave Cure + +``` +Panel & skin assembly overview: + Aircraft skin panels are stiffened structures consisting of outer skin, + longitudinal stringers, circumferential frames, and clip ribs, joined + by mechanical fasteners. For composite structures, panels are built-up + from prepreg layers using Automated Fiber Placement (AFP) and Automated + Tape Laying (ATL), then cured in an autoclave. + +Automated drilling and riveting: + E-MAG / Brotje / Gemcor automated fastening machines: + One-up assembly (jig-less): + Panel held in fixture, machine positions over each fastener location + Drilling → countersinking → hole inspection → sealant → fastener insert → upset + + Drilling cycle: + 1. Clamp pressure foot on workpiece (pneumatic, 200–500N) + 2. Drill through stack (PCD drill, 2,000–20,000 RPM) + 3. Countersink (100° or 130° inclusive angle) + 4. Retract, blow-out chips, vacuum extraction + 5. Hole diameter measurement (laser/capacitive probe, ±0.005mm) + + Cycle time per hole: 5–15 seconds (dependent on stack thickness) + + Drill feed force optimization by material: + CFRP: low feed (0.05–0.10mm/rev), high speed → minimize delamination + Aluminum 2024/7075: feed 0.10–0.20mm/rev + Titanium Ti-6Al-4V: low speed, high feed, abundant coolant + + Electromagnetic riveting (EMR): + Operating principle: + Capacitor bank discharge (5–20 kJ) → electromagnetic coil → + induced eddy current in driver plate → repulsive force pulse + (100–300 kN peak, <1ms duration) → rivet upset in single blow + + Advantages over hydraulic squeezing: + - Consistent interference fit (0.5–1.5% of hole diameter) + - Reduced hole preparation (no cold working needed) + - Single-sided access possible (blind riveting) + - No heat-affected zone + + EMR process parameters: + Discharge energy E = ½×C×V² [J] + C = capacitance (500–2,000 µF) + V = charging voltage (1,000–5,000 V) + + Required energy for rivet upset: + E_req = k × D² × L / η + Where: + D = rivet shank diameter [mm] + L = rivet grip length [mm] + k = material constant (≈0.5 for Al 2117, ≈0.8 for Ti) + η = electromagnetic-to-mechanical efficiency (0.3–0.6) + + Interference fit verification: + Radial expansion measured by split-sleeve gauge + Minimum interference: 0.5% of D (for fatigue life) + Maximum interference: 1.5% of D (to avoid stress corrosion) + + Fastener types selection: + Hi-Lite (Alcoa/Arconic): + Lightweight, 12-point drive, 95–110 ksi shear + Application: secondary structure, fairings + + Hi-Lok (Hi-Shear): + Collar-swaged, consistent preload, 95–160 ksi shear + Application: primary structure, wing-to-fuselage + + Lockbolt (Huck): + Swaged collar, vibration resistant + Application: high-fatigue areas, engine mount + + Taper-Lok: + Tapered shank, interference fit, no sealant required + Application: integral fuel tank boundary + + Automated Fiber Placement (AFP): + AFP head configuration: + Tow width: 3.2mm (1/8"), 6.4mm (1/4"), 12.7mm (1/2") + Number of tows per head: 8, 16, 24, 32 + Individual tow cut/add/restart for boundary shaping + + Steering radius constraint: + Minimum fiber steering radius R_min [mm]: + R_min = w / (2 × ε_max) + Where: + w = tow width [mm] + ε_max = maximum allowable fiber strain (≈0.5–1.0%) + + For 6.4mm tow: R_min ≈ 320–640mm + For 3.2mm tow: R_min ≈ 160–320mm (tighter turning) + + Tow placement accuracy: + Deviation tolerance: <1.5mm (typical for current AFP) + Position measured by laser line scanner on AFP head + Correction via machine controller closed-loop + + InSitu consolidation: + Laser heating (diode laser, 940–980nm wavelength): + Thermoset (epoxy): heat to 150–250°C, partial cure during layup + Thermoplastic (PEEK, PEKK): heat above T_melt (343°C for PEEK) + + Compaction roller: + Force: 200–1,000N (depending on tow width and material) + Roller material: silicone (thermoset) or steel (thermoplastic) + Temperature: actively heated/cooled + + Consolidation quality factors: + Void content target: <1% + Degree of cure (thermoset): 20–40% after AFP (final in autoclave) + Crystallinity (thermoplastic): 20–30% for PEEK + + Automated Tape Laying (ATL): + Wide prepreg tape (75mm, 150mm, 300mm wide) + Suitable for large, low-curvature surfaces (wing skins, fuselage panels) + + Tape laying strategies: + Contour parallel: tape follows iso-contour of surface + Advantage: minimal steering, high layup rate + Disadvantage: gaps at panel edges + + Perpendicular to spar/rib: tape aligns with structural members + Advantage: optimal load path alignment + Disadvantage: more complex programming + + Tape gap control: + Gap between adjacent tapes: 0–2.5mm (design tolerance) + Overlap: not permitted (thickness build-up) + Gap staggering: offset between layers to avoid cumulative gap + + ATL productivity: + Typical layup rate: 20–50 kg/h (depending on tape width and complexity) + Compared to hand layup: 3–5× faster + + Autoclave cure cycle: + Vacuum bag layup sequence (bottom to top): + Tool surface → release agent → prepreg laminate → peel ply → + bleeder cloth → perforated release film → breather felt → + vacuum bag film → sealant tape on tool perimeter + + Temperature cycle: + Ramp 1: 1–3°C/min from ambient to dwell temperature + Dwell: 120–180°C for 2–6 hours (depending on resin system) + Epoxy 977-2 (Cytec/Solvay): 177°C, 2h + Epoxy M21 (Hexcel): 180°C, 2h + BMI (bismaleimide): 190–230°C, 4–6h + Ramp 2: 1–3°C/min cool-down to <60°C before venting + + Pressure cycle: + Autoclave N₂ pressure: 6–7 bar (600–700 kPa gauge) + Applied at start of heat-up, maintained through cool-down + Vacuum bag pressure differential: autoclave P − vacuum P + + Degree of cure model: + dα/dt = k(T) × (1 − α)^n × α^m (autocatalytic Kamal-Sourour) + k(T) = A × exp(−E_a / R×T) + + Porosity prediction: + Porosity forms when volatiles cannot escape before gelation + Critical gel point: α_gel ≈ 0.5–0.7 (resin dependent) + Volatile removal by vacuum: <α_gel, volatiles extracted through bleeder + + Exothermic temperature control: + Q_exo = ρ × V × ΔH_r × dα/dt [W] + T_max = T_setpoint + Q_exo / (h × A) (adiabatic overshoot estimate) + Must maintain T_max < T_degradation + For thick laminates (>25mm), exotherm can cause >30°C overshoot +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class AFPMaterial { + CFRP_Epoxy_977_2, CFRP_Epoxy_M21, CFRP_BMI, + CFRP_PEEK_AS4, CFRP_PEKK, CFRP_PPS, Custom +}; + +enum class TowWidth { TOW_3_2mm, TOW_6_4mm, TOW_12_7mm }; +enum class ATLTapeWidth { TAPE_75mm, TAPE_150mm, TAPE_300mm }; + +enum class CureCycleType { + Standard_177C_2h, Standard_180C_2h, + BMI_190C_4h, BMI_230C_6h, CustomCycle +}; + +struct DrillRivetSpec { + FastenerType fastener_type; + double fastener_diameter_mm; + double fastener_grip_length_mm; + double hole_diameter_target_mm; + double hole_tolerance_upper_um; + double hole_tolerance_lower_um; + double drill_rpm; + double drill_feed_mm_per_rev; + double countersink_angle_deg; + double countersink_depth_mm; + double cycle_time_per_hole_s; + bool emr_used; + double emr_energy_J; + double emr_voltage_V; + double emr_capacitance_uF; + double interference_fit_target_pct; +}; + +struct FasteningMachineSpec { + std::string machine_type; // "E-MAG", "Brotje", "Gemcor" + int num_fastener_positions; + double positioning_accuracy_mm; + double drilling_power_kW; + double clamp_force_N; + double max_feed_force_N; + double cycle_time_per_hole_s; + bool cfrp_al_ti_stack_capable; + bool emr_capable; +}; + +struct AFPSpec { + AFPMaterial material; + TowWidth tow_width; + int num_tows_per_head; + double layup_speed_mm_per_s; + double compaction_force_N; + double laser_power_W; + double laser_wavelength_nm; + double nip_point_temperature_C_target; + double minimum_steering_radius_mm; + double tow_placement_accuracy_mm; + double gap_tolerance_mm; + bool individual_tow_control; +}; + +struct ATLSpec { + AFPMaterial material; + ATLTapeWidth tape_width; + double layup_speed_mm_per_s; + double compaction_force_N; + double tape_tension_N; + double heater_temperature_C; + double gap_tolerance_mm; + std::string path_strategy; // "contour_parallel", "perpendicular_spar" +}; + +struct AutoclaveSpec { + CureCycleType cycle; + double heat_ramp_rate_C_per_min; + double cool_ramp_rate_C_per_min; + double dwell_temperature_C; + double dwell_time_min; + double pressure_bar_g; + double vacuum_level_kPa_abs; + int num_thermocouples; + double max_interlaminate_temperature_gradient_C; + double target_degree_of_cure_pct; + double max_void_content_pct; + double part_max_thickness_mm; +}; + +struct CureKineticsSpec { + double pre_exponential_A_per_s; // Arrhenius A + double activation_energy_Ea_J_per_mol; + double reaction_order_n; + double autocatalytic_order_m; + double total_heat_of_reaction_J_per_kg; + double gel_point_conversion; +}; + +struct PanelAssemSpec { + std::string panel_id; // e.g., "WING_UPPER_SKIN_LEFT" + double panel_length_mm; + double panel_width_mm; + double skin_thickness_mm; + int num_stringers; + int num_frames; + int num_clip_ribs; + int total_fastener_count; + std::vector fastener_specs; // one per material stack + FasteningMachineSpec fastening_machine; + std::string material_system; // "Al_2024_T3", "CFRP_M21", "GLARE" + AFPSpec afp; // if composite AFP + ATLSpec atl; // if composite ATL + AutoclaveSpec autoclave; // if composite cure + CureKineticsSpec cure_kinetics; + double target_fastener_cycle_time_per_panel_min; +}; + +struct PanelAssemState { + int fasteners_installed; + double cumulative_drill_time_s; + double cumulative_rivet_time_s; + double drill_bit_wear_pct; // 0 = new, 100 = replace + int afp_tows_placed; + double afp_gap_deviation_max_mm; + double cure_temperature_history_C[100]; // temp vs. time + double degree_of_cure_current_pct; + double void_content_estimated_pct; + bool cure_cycle_complete; +}; + +struct PanelAssemPerformance { + double total_fastening_time_min; + double fastener_rejection_rate_ppm; // defective fasteners per million + double hole_diameter_cpk; + double afp_layup_deviation_max_mm; + double afp_layup_productivity_kg_per_h; + double cure_degree_final_pct; + double void_content_final_pct; + double total_panel_assembly_time_h; + bool panel_accepted; +}; + +PanelAssemSpec design_panel_assembly( + const std::string& panel_id, + double length_mm, + double width_mm, + const std::string& material, + int num_stringers, + int num_frames, + FasteningMachineSpec machine +); + +PanelAssemState initialize_panel_state(const PanelAssemSpec& spec); + +PanelAssemPerformance simulate_panel_assembly( + const PanelAssemSpec& spec, + PanelAssemState& state, + double ambient_temp_C, + double ambient_RH_pct +); + +double calculate_emr_energy( + double rivet_diameter_mm, + double grip_length_mm, + const std::string& rivet_material +); + +double calculate_afp_steering_radius( + TowWidth tow_width, + double max_fiber_strain_pct +); + +double calculate_degree_of_cure( + const CureKineticsSpec& kinetics, + double temperature_C, + double current_alpha, + double time_step_s +); + +double estimate_autoclave_exotherm( + double part_thickness_mm, + const CureKineticsSpec& kinetics, + double heat_ramp_rate_C_per_min +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 3. Wing & Empennage Assembly (P1) + +#### 3.1 Wing Box, Movable Surfaces, and Empennage Alignment + +``` +Wing & empennage assembly overview: + The wing is a load-bearing structure transmitting lift forces to the + fuselage. The wing box (front spar, rear spar, ribs, upper/lower skin + panels) forms the primary structural element. Movable surfaces — slats, + flaps, ailerons, spoilers — provide aerodynamic control. The empennage + (horizontal and vertical stabilizers) provides pitch and yaw stability. + +Wing box assembly: + Components: + Front spar: longitudinal beam at ~15–25% chord + Rear spar: longitudinal beam at ~60–70% chord + Ribs: transverse ribs at regular spacing (typically 500–700mm) + Upper skin panel: primarily compression in flight (CFRP or Al-Li) + Lower skin panel: primarily tension in flight + Stringers: longitudinal stiffeners between spars (bonded or fastened) + + Assembly sequence: + 1. Spar fabrication (built-up or machined from plate) + 2. Rib positioning on assembly jig + 3. Lower skin panel placed on jig + 4. Rib-to-skin fastening (Hi-Lok or Lockbolt) + 5. Spar-to-skin fastening + 6. Upper skin panel placement (after internal systems) + 7. Fuel tank sealant application + + Wing box jig/fixture: + Assembly jig locates spar, rib, and skin at key datums + Jig locators: tooling holes (TH) and tooling pins + Typical tolerance: ±0.1mm at locator points + Jig thermal compensation: ΔL = α_T × L × ΔT + α_T_steel = 11.7×10⁻⁶/°C, α_T_CFRP ≈ 0–2×10⁻⁶/°C + Mismatch can cause residual stress if not accounted for + + Fuel tank boundary: + Wing integral fuel tank: volume enclosed by front/rear spars and ribs + Faying surface sealant (PR1776 class B): applied to all mating surfaces + Fillet seal (PR1776 class B or C): all internal corners + Access panels: sealed with O-ring + wet-installed fasteners + Leak test: 3–5 psi differential, <0.5 psi/min decay (FAR 25.965) + + Anti-corrosion coating: + Aluminum structure: chromate conversion coating (Alodine 1200) + CFRP-to-aluminum interface: fiberglass isolation ply + sealant + Titanium fasteners: no coating needed (galvanic compatibility) + +Movable surfaces: + Slat (leading edge device): + Function: increase wing camber, delay stall at high α + Kinematic mechanism: + Track-guided slat: circular arc track, roller carriage + Deployment angle: 15–30° (nose-down) + Actuator: rotary geared actuator with torque shaft + + Design parameters: + Slat chord / wing chord = 0.10–0.15 + Slat gap (slot height): 1.5–3% of local chord + Slat overlap: 0–2% of local chord + + Flap (trailing edge device): + Fowler flap (translates aft + rotates down): + Single slot: simple, lower C_L_max gain (~0.5–0.8) + Double slot: intermediate (~0.8–1.2) + Triple slot: highest C_L_max gain (~1.2–1.6), heavy/complex + + Kinematic mechanism: + Track + carriage: flap moves along curved track + Linkage: hinged-beam mechanism (simpler, Airbus preference) + Actuator: hydraulic rotary actuator + torque shaft + gearbox + + Deployment angles: + Takeoff: 5–15°, low drag + Landing: 25–40°, high lift, high drag + + Fowler motion: + Translation Δx = R × (1 − cos(θ)) + Vertical displacement Δz = R × sin(θ) + R = effective track radius [mm] + + Aileron: + Function: roll control via differential deflection + Chord ratio: 20–30% of local wing chord + Span: 20–35% of wing semi-span (outboard) + Deflection: +20°/−20° (up/down), differential ratio ~2:1 + Hinge moment balance: mass balance (anti-flutter) + + Spoiler / Speed brake: + Function: lift dump + roll assist + speed brake + Position: upper wing surface, ahead of flaps + Deployment: 0–60° (speed brake), 0–30° (roll assist) + Actuator: hydraulic, fail-safe (blow-back at high loads) + +Empennage assembly: + Horizontal tail plane (HTP): + Area ratio S_HT/S_wing = 0.20–0.30 + Tail volume coefficient: V_HT = S_HT × l_HT / (S_wing × c̄) + l_HT = distance from CG to HTP aerodynamic center + Typical V_HT = 0.6–1.2 + + HTP incidence setting: + i_HT = −1° to +3° (adjustable on ground or in flight via trim) + Measured by inclinometer or laser tracker + Tolerance: ±0.1° relative to fuselage reference + + Vertical tail plane (VTP): + Area ratio S_VT/S_wing = 0.15–0.25 + Tail volume coefficient: V_VT = S_VT × l_VT / (S_wing × b) + Typical V_VT = 0.04–0.08 + + Elevator (on HTP trailing edge): + Chord ratio: 25–35% of HTP chord + Deflection: +15°/−25° (down/up) + Control: via pushrod or hydraulic actuator + + Rudder (on VTP trailing edge): + Chord ratio: 25–40% of VTP chord + Deflection: ±25–30° + Control: dual hydraulic actuators (FAR 25 requirement) + + Balance tab / flight control tab: + Aerodynamic balance: reduces hinge moment + Mass balance: prevents flutter (weight forward of hinge line) + Tab chord: 20–30% of control surface chord +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class MovableSurfaceType { + Slat, Flap_SingleSlot, Flap_DoubleSlot, Flap_TripleSlot, + Aileron, Spoiler, Elevator, Rudder, TrimTab +}; + +enum class KinematicType { + TrackGuided, HingedLinkage, FourBar, RackPinion, BallScrew +}; + +struct SparSpec { + std::string spar_id; // "FRONT_SPAR", "REAR_SPAR" + double length_mm; + double height_mm; + double web_thickness_mm; + double cap_area_mm2; // spar cap cross-section + std::string material; // "Al7075_T6", "CFRP_IM7_8552", "Ti6Al4V" + double weight_kg; +}; + +struct RibSpec { + std::string rib_id; + double chord_position_pct; // % of chord from leading edge + double rib_spacing_from_prev_mm; + double thickness_mm; + std::string material; + bool is_sealing_rib; // fuel tank boundary +}; + +struct SkinPanelSpec { + std::string panel_id; // "UPPER_SKIN_LH", "LOWER_SKIN_LH" + double length_mm; + double width_max_mm; + double thickness_mm; // constant or variable + std::string material; + bool is_integral_stringer; // co-cured/machined stringers + int num_stringers; + double stringer_pitch_mm; + double stringer_height_mm; +}; + +struct FuelTankSpec { + double volume_liters; + double sealant_type; // "PR1776_B2", "PR1826_B2" + double faying_surface_seal_thickness_mm; + double fillet_seal_radius_mm; + double injection_seal_pressure_bar; + double leak_test_pressure_kPa; + double max_pressure_decay_kPa_per_min; + bool wet_installed_fasteners; +}; + +struct MovableSurfaceSpec { + MovableSurfaceType type; + double chord_mm; + double span_mm; + double deflection_up_deg; + double deflection_down_deg; + KinematicType kinematic; + double track_radius_mm; // for track-guided + double hinge_line_position_pct_chord; // for hinged + double actuator_torque_Nm; + double max_actuation_speed_deg_per_s; + bool mass_balanced; + double balance_weight_kg; + double balance_weight_arm_mm; // from hinge line +}; + +struct WingSpec { + std::string wing_id; // "LEFT_WING", "RIGHT_WING" + double semi_span_mm; + double root_chord_mm; + double tip_chord_mm; + double leading_edge_sweep_deg; + double dihedral_deg; + double incidence_deg; + SparSpec front_spar; + SparSpec rear_spar; + std::vector ribs; + SkinPanelSpec upper_skin; + SkinPanelSpec lower_skin; + FuelTankSpec fuel_tank; + bool integral_fuel_tank; + std::vector movable_surfaces; + double wing_box_weight_kg; + double ultimate_bending_moment_Nm; +}; + +struct EmpennageSpec { + // Horizontal tail plane + double htp_area_m2; + double htp_span_mm; + double htp_aspect_ratio; + double htp_taper_ratio; + double htp_incidence_setting_deg; + double htp_incidence_tolerance_deg; + double htp_dihedral_deg; + double htp_tail_volume_coefficient; + MovableSurfaceSpec elevator; + + // Vertical tail plane + double vtp_area_m2; + double vtp_height_mm; + double vtp_aspect_ratio; + double vtp_sweep_deg; + double vtp_tail_volume_coefficient; + MovableSurfaceSpec rudder; +}; + +struct WingAssemState { + std::map component_poses; + int fasteners_installed; + double sealant_applied_length_m; + bool fuel_tank_leak_test_passed; + double movable_surface_free_play_mm; + double movable_surface_actuation_torque_Nm; +}; + +struct WingAssemPerformance { + double final_dihedral_deg_achieved; + double final_incidence_deg_achieved; + double twist_distribution_error_deg_rms; + double total_assembly_time_h; + bool fuel_tank_sealed; + double flap_track_alignment_error_mm; + bool movable_surfaces_rigged; +}; + +WingSpec design_wing( + double semi_span_mm, + double root_chord_mm, + double tip_chord_mm, + double sweep_deg, + const std::string& material +); + +EmpennageSpec design_empennage( + double wing_area_m2, + double wing_span_mm, + double wing_mac_mm, + double cg_to_htp_mm, + double cg_to_vtp_mm +); + +WingAssemState initialize_wing_state(const WingSpec& spec); + +WingAssemPerformance simulate_wing_assembly( + const WingSpec& spec, + WingAssemState& state, + double ambient_temp_C +); + +double calculate_tail_volume_coefficient( + double tail_area, + double tail_arm, + double wing_area, + double reference_length +); + +double calculate_flap_fowler_motion( + double track_radius_mm, + double deployment_angle_deg +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 4. Turbofan Engine Assembly (P1) + +#### 4.1 HPC, Combustor, Turbine, and Fan Assembly + +``` +Turbofan engine assembly overview: + A modern high-bypass turbofan engine (e.g., GE9X, Trent XWB) consists + of fan, compressor (LPC+HPC), combustor, turbine (HPT+LPT), and exhaust + sections. Assembly tolerances directly affect performance, efficiency, + and service life. Key technologies include single-crystal turbine blades, + thermal barrier coatings, and active clearance control. + +High-Pressure Compressor (HPC): + Rotor disk stacking: + Disks are assembled on a central shaft with precise axial preload + Disk-to-disk connection: Curvic coupling or interference fit + Blade-to-disk attachment: broached fir-tree slots + + Fir-tree slot geometry: + Flank angle: 35–45° (trapezoidal dovetail) + Contact surfaces: 3–5 lobes + Broach manufacturing: H7 tolerance on working surfaces + + Contact stress at fir-tree (from centrifugal load): + σ_c = F_c / (N_lobes × A_contact_per_lobe) + F_c = m_blade × r_cg × ω² = m × r_cg × (2π×N/60)² + + Where: + m_blade = blade mass [kg] + r_cg = CG radius from rotation axis [m] + ω = angular velocity [rad/s], N = RPM + Typically 10,000–15,000 RPM for HPC + + Disk bore stress (rotating disk with central hole): + σ_θ_max = (3+ν)/8 × ρ × ω² × [r_o² + r_i²×(1−ν)/(3+ν)] + Where ν = Poisson's ratio, ρ = material density + + Interference fit between disks: + δ = (P × D) / (E × (D²_o + D²) / (D²_o − D²) + ν) + Thermal expansion: δ_T = α × D × ΔT + Required interference at operating condition must prevent separation + + Variable stator vanes (IGV / VGV): + IGV (Inlet Guide Vanes): first row, adjustable incidence + VGV (Variable Guide Vanes): rows 1–4 typically + Actuation: unison ring driven by hydraulic/fueldraulic actuator + Scheduling: vane angle vs. corrected speed N/√T + + Vane angle schedule: + Closed position (starting): IGV at −20° to −40° + Open position (cruise): IGV at 0° to +10° + Modulation: linear interpolation between schedule breakpoints + + Active tip clearance control (ACC): + HPC blade tip clearance must be minimized for efficiency + Typical hot clearance: 0.5–1.5mm (blade tip to casing) + Too tight → rub (damage); Too loose → efficiency loss + + ACC system: + Air impingement cooling on casing exterior + Casing thermal contraction → clearance reduction + Clearance measurement: capacitive probe or eddy current sensor + + Clearance effect on efficiency: + Δη ≈ −2 to −3% per 1% increase in clearance/chord ratio + Typical tip gap: 0.5–2% of blade chord + +Combustor: + Rich-Quench-Lean (RQL) design: + Stage 1 (Rich): fuel-rich primary zone (φ ≈ 1.2–1.8) + Incomplete combustion, low temperature → low NOx + Stage 2 (Quench): rapid dilution air injection + Temperature drop from ~2,200K to ~1,700K + Stage 3 (Lean): fuel-lean burnout zone (φ ≈ 0.5–0.7) + Complete combustion + + TAPS (Twin Annular Premixing Swirler) — lean burn: + Premixed fuel + air before combustion + Lower flame temperature → lower NOx + Risk: lean blowout (LBO), thermoacoustic instability + + Swirler design: + Swirl number S: + S = G_θ / (R × G_x) + G_θ = axial flux of tangential momentum + G_x = axial flux of axial momentum + R = swirler outer radius + Typical S = 0.6–1.2 for combustion stability + + Fuel nozzle: + Airblast atomization (shear between fuel film and high-speed air) + SMD (Sauter Mean Diameter) droplets: 20–50 µm + Fuel pressure: 20–80 bar at takeoff + + Dilution holes: + Provide quench and burnout air + Jet penetration: J = (ρ_j×V²_j / ρ_main×V²_main)^0.5 × d_h / H + d_h = hole diameter, H = annulus height + Target J = 0.3–0.8 for uniform exit temperature distribution + + Liners & TBC: + Combustor liner material: Ni-based superalloy (Haynes 230, Hastelloy X) + TBC (Thermal Barrier Coating): + YSZ (Yttria-Stabilized Zirconia, 7–8 wt% Y₂O₃) + Application: EB-PVD (Electron Beam Physical Vapor Deposition) + Columnar microstructure for strain tolerance + Thickness: 200–500 µm + Temperature reduction at metal surface: 100–200°C + Service life: 10,000–25,000 hours + +High-Pressure Turbine (HPT): + Blade materials: + Single crystal (SX): CMSX-4, PWA 1484, René N5 + No grain boundaries → superior creep resistance + Ni-based, γ' (Ni₃Al) precipitation strengthened + Service temperature: up to 1,150°C (metal), with TBC + cooling + + Directionally solidified (DS): columnar grains aligned with span + Used for less critical stages / cost-sensitive applications + + Blade cooling: + Internal cooling: + Convection: serpentine passages, pin fins + Impingement: jet impingement on leading edge + + Film cooling: + Coolant air ejected through holes on blade surface + Protective film between hot gas and blade + + Film cooling effectiveness: + η_f = (T_gas − T_aw) / (T_gas − T_coolant) + η_f ≈ 0.3–0.7 depending on blowing ratio + + Hole geometries: + Cylindrical: simple, low effectiveness (η ≈ 0.2–0.4) + Shaped (diffuser/fan-shaped): η ≈ 0.4–0.7 + Showerhead (leading edge): multiple rows, η ≈ 0.5–0.7 + + Blowing ratio: + M = (ρ_c×V_c) / (ρ_g×V_g) + Optimal M ≈ 0.5–1.5 (above → jet lift-off, below → insufficient) + + HPT blade design life: + Creep life: 20,000–30,000 cycles (start-stop) + Larson-Miller parameter: + LMP = T × (log₁₀(t_r) + C) / 1,000 + T in K, t_r = rupture time in hours, C ≈ 20 for Ni superalloys + +Low-Pressure Turbine (LPT): + Larger, heavier blades than HPT + Uncooled or minimally cooled + High aspect ratio (span/chord > 5) + Interlocking shrouds for vibration damping + Typically 4–7 stages (vs. 1–2 for HPT) + +Fan: + Wide-chord hollow titanium fan blades: + Manufacturing: diffusion bonding + superplastic forming (DB/SPF) + Two Ti sheets bonded at edges, inflated with argon at high T + Internal: hollow cavity with stiffening ribs + Chord: 300–600mm (GE90: ~550mm, GE9X: ~340mm (composite)) + Weight: hollow Ti ~30% lighter than solid + + Composite fan blades (CMCs): + Carbon fiber reinforced polymer (CFRP) or Ceramic Matrix Composite + GE9X: CFRP fan blades with Ti leading edge erosion shield + Advantages: lighter, higher stiffness/damping + + Fan containment case: + Aluminum or composite fan case with Kevlar wrap + Must contain blade-out event (FAR 33.94) + Kevlar 49 wrap: multi-layer, typical 15–25mm total thickness + Energy absorption test: 1/3 blade release at max RPM + + Fan blade-off containment energy: + E_blade_impact = ½ × m_blade × (ω × r_cg)² [J] + Must be fully absorbed by containment case and Kevlar wrap + Margin: case must survive with no penetration + +Accessory drive: + Gearbox (Accessory Gearbox, AGB): + Driven from HP spool via tower shaft + bevel gear + Gear ratio: ~0.5–1.5 (gearbox output / HP RPM) + + Accessories driven: + Fuel pump: 3,000–8,000 RPM, 500–2,000 L/h + Hydraulic pump: 3,000 psi (207 bar) + Oil pump (lubrication + scavenge): 100–500 L/min + IDG (Integrated Drive Generator): 115VAC, 400Hz, 90–150 kVA + PMA (Permanent Magnet Alternator): FADEC power backup + Starter (air turbine or electric) + + Gearbox bearing: + Angular contact ball bearing or roller bearing + L10 life: >25,000 hours + Oil jet lubrication: 2–5 L/min per bearing +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class CombustorType { RQL, TAPS_LeanBurn, RichDome, DLE_DryLowEmissions }; +enum class BladeMaterial { CMSX4_SX, PWA1484_SX, ReneN5_SX, DS_MarM247, Equiaxed_IN718 }; +enum class BladeCoolingType { None, Convection, Impingement, FilmCylindrical, FilmShaped, Showerhead }; +enum class FanBladeType { Solid_Ti, Hollow_Ti_DB_SPF, CFRP_Composite, CMC_Ceramic }; +enum class TBCCoatingType { YSZ_EBPVD, YSZ_APS, GadoliniumZirconate, Multilayer }; + +struct CompressorStageSpec { + int stage_number; // 1-based from inlet + int num_blades; + int num_stator_vanes; + double blade_chord_mm; + double blade_span_mm; + double tip_clearance_cold_mm; + double pressure_ratio_stage; // typically 1.1–1.4 per stage + BladeMaterial blade_material; + bool vgv_active; // variable geometry? + double vgv_angle_min_deg; + double vgv_angle_max_deg; +}; + +struct HPCSpec { + int num_stages; + double overall_pressure_ratio; // typically 15–25 + double design_rpm; + double max_rpm; + double inlet_diameter_mm; + double exit_diameter_mm; + double mass_flow_kg_per_s; + std::vector stages; + bool tip_clearance_active_control; // ACC + double acc_bleed_air_pct; // % of core flow for ACC + double fir_tree_flank_angle_deg; + int fir_tree_lobes; +}; + +struct CombustorSpec { + CombustorType type; + double inlet_temperature_K; + double outlet_temperature_K; // T4 / T40 + double fuel_flow_kg_per_s_max; + int num_fuel_nozzles; + double fuel_nozzle_pressure_bar; + double swirler_number; + double dilution_hole_diameter_mm; + int num_dilution_holes; + TBCCoatingType tbc_type; + double tbc_thickness_um; + double liner_material_max_temp_K; + double lbo_fuel_air_ratio; // lean blowout limit + double pattern_factor; // (T_max − T_avg) / (T_avg − T_inlet) +}; + +struct TurbineStageSpec { + int stage_number; + int num_blades; + double blade_chord_mm; + double blade_span_mm; + BladeMaterial blade_material; + BladeCoolingType cooling_type; + double cooling_air_pct; // % of core flow + double film_cooling_effectiveness_target; + double blowing_ratio; + double pressure_ratio_stage; + TBCCoatingType tbc_type; + double tbc_thickness_um; + double design_life_cycles; // start-stop cycles + double larson_miller_parameter; +}; + +struct HPTSpec { + int num_stages; + double inlet_temperature_K_max; // T41 + double overall_pressure_ratio; + double design_rpm; + std::vector stages; +}; + +struct LPTSpec { + int num_stages; + double overall_pressure_ratio; + double design_rpm; + std::vector stages; +}; + +struct FanSpec { + FanBladeType blade_type; + int num_blades; + double tip_diameter_mm; + double hub_diameter_mm; + double bypass_ratio; + double design_rpm_n1; + double max_rpm_n1; + double blade_mass_kg; + double blade_cg_radius_mm; + double containment_kevlar_layers; + double containment_case_thickness_mm; + double bird_ingestion_bird_mass_kg; // 2.5–3.65kg (FAR 33.76) +}; + +struct AGBSpec { + double gear_ratio; + double input_rpm; + double fuel_pump_flow_L_per_h; + double hydraulic_pump_pressure_bar; + double oil_pump_flow_L_per_min; + double idg_power_kVA; + bool pma_installed; + double bearing_L10_life_h; +}; + +struct TurbofanSpec { + std::string engine_model; // "GE9X", "Trent_XWB84", "PW1100G" + double sea_level_static_thrust_kN; + double max_thrust_kN; + double bypass_ratio; + double overall_pressure_ratio_opr; + double fan_diameter_mm; + double dry_weight_kg; + FanSpec fan; + HPCSpec hpc; + CombustorSpec combustor; + HPTSpec hpt; + LPTSpec lpt; + AGBSpec agb; +}; + +struct TurbofanAssemState { + double hpc_rotor_stack_preload_kN; + double hpc_tip_clearance_measured_mm[20]; // per stage + double combustor_pattern_factor_measured; + double turbine_blade_cooling_flow_pct; + double fan_blade_frequency_Hz; // first natural frequency + double agb_bearing_temp_C; + bool fir_tree_inspection_passed; + bool rotor_balance_grade; // G2.5 or better per ISO 1940 +}; + +struct TurbofanAssemPerformance { + double assembly_time_h; + double rotor_unbalance_g_mm; + double tip_clearance_hot_mm; + double estimated_sfc_pct_of_spec; // vs. specification + double compressor_efficiency_pct; + bool containment_case_verified; + bool configuration_to_drawings; +}; + +TurbofanSpec design_turbofan( + double thrust_kN, + double bypass_ratio, + double opr, + const std::string& manufacturer +); + +TurbofanAssemState initialize_turbofan_state(const TurbofanSpec& spec); + +TurbofanAssemPerformance simulate_turbofan_assembly( + const TurbofanSpec& spec, + TurbofanAssemState& state, + double ambient_temp_C +); + +double calculate_fir_tree_stress( + double blade_mass_kg, + double cg_radius_mm, + double rpm, + int num_lobes, + double contact_area_mm2 +); + +double calculate_film_cooling_effectiveness( + double blowing_ratio, + BladeCoolingType cooling_type, + double hole_pitch_diameter_ratio +); + +double calculate_blade_creep_life( + const LarsonMillerParam& lmp, + double operating_temp_K, + double stress_MPa +); + +double calculate_fan_blade_off_energy( + double blade_mass_kg, + double cg_radius_mm, + double rpm +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 5. Engine Build & Test (P1) + +#### 5.1 Horizontal Split Case Build, Engine Test Cell, and Certification Testing + +``` +Engine build & test overview: + After component assembly, the engine is built up (core stacking → + horizontal split → fan case → accessories), then tested in a dedicated + test cell for performance, emissions, vibration, and certification. + +Horizontal split case build procedure: + Step 1 — Core stacking: + HPC rotor + stator assembly on vertical build stand + Combustor case + liners + HPT rotor + stator (stage 1–2) + LPT rotor + stator (stages 3–7 typically) + Exhaust case + + Step 2 — Horizontal split: + Core is split horizontally (lower half + upper half) + Allows access for internal inspection + Split line sealing: metal C-seal or W-seal + + Step 3 — Fan case assembly: + Fan rotor installed on LP shaft + Fan stator + OGV (outlet guide vanes) + fan case + Kevlar containment wrap applied + + Step 4 — Accessories installation: + AGB mounted on fan case / compressor case + Accessories connected: fuel pump, oil pump, hydraulic, IDG, starter + External plumbing: oil lines, fuel lines, bleed air ducts + +Engine test cell: + Sea level static thrust stand: + Engine mounted on thrust measurement frame + Load cell(s) measure thrust: + Multiple load cells (3–4) for redundant measurement + Calibration: dead-weight traceable to NIST/NPL standards + Accuracy: ±0.25% of full scale + + Thrust measurement: + F_thrust = Σ_i F_loadcell_i − F_preload + F_bellmouth_correction + Bellmouth correction: approximately 0.5–1.0% of measured thrust + Due to inlet momentum not captured by load cells + + Air inlet: + Bellmouth (convergent nozzle) upstream: smooth flow acceleration + Inlet screens + flow straighteners (honeycomb) + Total pressure/temperature rakes at aerodynamic interface plane (AIP) + + SFC (Specific Fuel Consumption): + SFC = ṁ_fuel / F_thrust [kg/(kN·h)] or [lb/(lbf·h)] + + Fuel flow measurement: + Coriolis mass flow meter (accuracy ±0.1%) + Or volumetric flow meter + density compensation + Fuel temperature compensation: density = f(T) + + Correction to standard day conditions: + SFC_corrected = SFC_measured × (θ)^α × (δ)^β + θ = T_ambient / T_standard (288.15 K) + δ = P_ambient / P_standard (101.325 kPa) + α, β = empirical correction exponents from engine model + + EGT (Exhaust Gas Temperature): + Measured at turbine exit (station 5) or nozzle inlet (station 7) + Thermocouple rakes: multiple K-type or S-type thermocouples + S-type (Pt/Pt-Rh): up to 1,600°C, drift < ±1°C at 1,000°C + + EGT margin: + EGT_margin = T_EGT_redline − T_EGT_measured_at_max_thrust + New engine margin: 30–80°C + Margin erosion: ~5–15°C per 1,000 cycles (depends on engine) + Minimum acceptable margin: 5–15°C (before overhaul) + + Altitude test facility: + Altitude chamber simulates flight conditions: + Inlet total pressure: 11–101 kPa (sea level to 13,000m) + Inlet total temperature: −60 to +50°C + Exhaust back pressure: corresponding to altitude + + Test capabilities: + Cruise SFC at altitude + Re-light envelope (windmill and starter-assisted) + Ice crystal icing (Appendix D / EASA CS-25 Appendix P) + + Emissions (ICAO Annex 16 Volume II / CAEP): + LTO (Landing and Take-Off) cycle: + Measured at 4 power settings: + Takeoff (100%): 0.7 min + Climb (85%): 2.2 min + Approach (30%): 4.0 min + Taxi/Ground idle (7%): 26.0 min + + Regulated species: + NOx: chemiluminescence analyzer (heated sample line >65°C) + CO: NDIR (non-dispersive infrared) + UHC (unburned hydrocarbons): FID (flame ionization detector) + Smoke: SAE ARP 1179 (filter paper) → Smoke Number (SN) + + Fuel flow method for Dp/Foo: + Dp = mass of pollutant [g] + Foo = thrust at takeoff [kN] + Dp/Foo = emission index per thrust + + Vibration: + Accelerometers mounted on engine casing: + Fan casing (N1), compressor casing (N2), turbine casing + Typically piezoelectric, ±50g range, 5–10,000 Hz + + Vibration tracking (order analysis): + N1 tracking: fan speed fundamental + harmonics + N2 tracking: HPC/HPT speed fundamental + harmonics + Blade pass frequency: N_blade × shaft_RPM / 60 [Hz] + ISO 10816 / API 616 vibration limits: <50mm/s RMS + + Balancing: + Low-speed balance: individual disks, ISO 1940 Grade G2.5 + High-speed balance: assembled rotor, at-speed in vacuum chamber + Trim balance: in test cell with operational measurements + + Bird ingestion (FAR 33.76 / EASA CS-E 800): + Bird mass requirements: + Small flock: 85g birds, quantity = 2–16 depending on inlet area + Medium flock: 0.7–1.15kg birds + Large single: 2.5–3.65kg bird (chicken / herring gull) + + Test acceptance: + Engine must produce at least 75% of rated thrust for 5 min after strike + No sustained power loss >25% for required duration + Fan blade containment: no penetration of containment case or engine casing + Shutdown capability maintained + + Fan blade impact dynamics: + Bird slice through by rotating blades (bird chopped into segments) + Blade leading edge damage assessment + Unbalance after strike: typically <500g·mm acceptable for continued operation + + Ice accretion test (FAR Part 25 Appendix C / CS-25 Appendix C): + Icing cloud parameters: + LWC (Liquid Water Content): 0.2–3.0 g/m³ + MVD (Median Volumetric Diameter): 15–50 µm + Temperature: 0 to −30°C (intermittent max), −30 to −40°C (max continuous) + + Engine icing certification: + Fan blade ice accretion → thrust loss assessment + Ice shed test: shed ice must not damage downstream components + Core inlet ice protection: anti-ice bleed air system + + Icing wind tunnel test or artificial icing: + Spray bars create icing cloud + Endurance: 30 min cumulative in Appendix C conditions +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class TestCellType { SeaLevel_Static, Altitude_Chamber, Altitude_Facility, Icing_Tunnel }; +enum class EmissionSpecies { NOx, CO, UHC, Smoke_SN, CO2, SOx }; + +struct LoadCellSpec { + int num_cells; + double full_scale_per_cell_kN; + double accuracy_pct_fs; + double calibration_traceability; // "NIST", "NPL", "PTB" + double preload_kN; +}; + +struct BellmouthSpec { + double inlet_diameter_mm; + double contraction_ratio; + double flow_coefficient; + double bellmouth_correction_factor; + bool inlet_screen_installed; + bool flow_straightener_honeycomb; +}; + +struct SFC_MeasurementSpec { + double fuel_flow_meter_accuracy_pct; + std::string fuel_flow_meter_type; // "Coriolis", "Turbine", "PositiveDisplacement" + double fuel_density_kg_per_m3; + double theta_correction_exponent; + double delta_correction_exponent; + double standard_day_temp_K; // 288.15 + double standard_day_pressure_kPa; // 101.325 +}; + +struct EGT_MeasurementSpec { + int num_thermocouples_per_rake; + int num_rakes; + std::string thermocouple_type; // "K_type", "S_type" + double redline_temperature_C; + double new_engine_margin_min_C; + double margin_erosion_rate_C_per_1k_cycles; +}; + +struct EmissionSpec { + double lto_nox_g_per_kN; // CAEP/8 limit + double lto_co_g_per_kN; + double lto_uhc_g_per_kN; + double smoke_number_max; + double takeoff_time_min; // 0.7 + double climb_time_min; // 2.2 + double approach_time_min; // 4.0 + double taxi_time_min; // 26.0 +}; + +struct VibrationSpec { + int num_accelerometers; + double accel_range_g; + double accel_frequency_range_Hz_min; + double accel_frequency_range_Hz_max; + double vibration_limit_mm_per_s_rms; // per ISO 10816 + double balance_grade_ISO_1940; // G2.5 + double max_residual_unbalance_g_mm; +}; + +struct BirdStrikeSpec { + double bird_mass_kg; // 2.5–3.65kg large single + int small_bird_count; // for flock test + double small_bird_mass_g; + double required_post_strike_thrust_pct; // 75% + double required_post_strike_duration_min; // 5 min + bool containment_required; +}; + +struct EngineTestSpec { + TestCellType test_cell_type; + LoadCellSpec load_cell; + BellmouthSpec bellmouth; + SFC_MeasurementSpec sfc_measurement; + EGT_MeasurementSpec egt_measurement; + EmissionSpec emissions; + VibrationSpec vibration; + BirdStrikeSpec bird_strike; + bool ice_accretion_test_required; + double ice_accretion_lwc_g_per_m3; + double ice_accretion_mvd_um; + double ice_accretion_temp_C; + double altitude_max_m; // for altitude chamber + double altitude_min_m; + double mach_number_range; + double test_duration_h; +}; + +struct EngineTestState { + double measured_thrust_kN; + double measured_sfc_kg_per_kNh; + double measured_egt_C; + double measured_n1_rpm; + double measured_n2_rpm; + double measured_vibration_mm_per_s_rms; + double emission_nox_g_per_kN; + double emission_co_g_per_kN; + double emission_uhc_g_per_kN; + double emission_smoke_number; + double egt_margin_C; + bool bird_strike_passed; + bool ice_accretion_passed; +}; + +struct EngineTestPerformance { + double sfc_deviation_pct_from_spec; + double egt_margin_final_C; + bool emissions_caep_compliant; + double vibration_margin_pct; // % below limit + bool bird_ingestion_certified; + bool ice_accretion_certified; + double total_test_time_h; + bool test_passed; +}; + +EngineTestSpec design_engine_test_cell( + double max_thrust_kN, + double max_mass_flow_kg_per_s, + TestCellType cell_type +); + +EngineTestState initialize_engine_test_state(const EngineTestSpec& spec); + +EngineTestPerformance simulate_engine_test( + const EngineTestSpec& spec, + EngineTestState& state, + double ambient_temp_C, + double ambient_pressure_kPa +); + +double correct_sfc_to_standard_day( + double sfc_measured, + double T_ambient_K, + double P_ambient_kPa, + double alpha_exp, + double beta_exp +); + +double calculate_egt_margin( + double egt_measured_C, + double egt_redline_C, + double cycles_since_new, + double erosion_rate_C_per_1k_cycles +); + +bool verify_bird_strike_containment( + double blade_off_energy_J, + double containment_case_energy_absorption_J, + double safety_factor +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 6. Avionics Integration & EWIS (P1) + +#### 6.1 FBW Flight Control, Navigation, Communications, and EWIS Wiring + +``` +Avionics integration & EWIS overview: + Modern aircraft avionics encompass fly-by-wire (FBW) flight control, + navigation, communication, surveillance, cockpit displays, and the + electrical wiring interconnection system (EWIS) that connects all + systems. Redundancy and integrity are paramount for safety. + +Fly-by-Wire (FBW) Flight Control System: + Architecture: + FCC (Flight Control Computer): primary computing element + Executes control laws (normal, alternate, direct modes) + Triplex or quadruplex redundancy for fault tolerance + + Actuator types: + EHA (Electro-Hydrostatic Actuator): + Self-contained hydraulic system + Electric motor → hydraulic pump → cylinder + No central hydraulic connection needed + Power: 3–30 kW, bandwidth >10 Hz + + EBHA (Electro-Backup Hydraulic Actuator): + Normal mode: central hydraulic supply + Backup mode: local electric motor-driven pump + Used for critical surfaces (elevator, aileron, rudder) + + Redundancy voting: + Triplex (3 channels): 2-out-of-3 majority vote + Probability of system failure: + P_sys_fail = 3λ²×T_det − 2λ³×T²_det + λ = failure rate per channel per hour + T_det = detection interval (time to identify and isolate fault) + + Quadruplex (4 channels): 3-out-of-4 vote + Higher integrity, lower false-alarm rate + P_sys_fail ≈ 4λ³×T²_det (simplified for λT << 1) + + REU (Remote Electronic Unit): + Distributed I/O units near actuators/sensors + Analog/digital signal conditioning + Communication with FCC via ARINC 629 / AFDX (ARINC 664) bus + + Control laws: + Normal Law: + C* law (pitch): blend of pitch rate + normal load factor + Roll rate command: stick → roll rate demand → aileron deflection + Yaw damper: automatically coordinates turns, damps Dutch roll + + Alternate Law: + Reduced protection (stall, overspeed) + Degraded handling qualities + + Direct Law: + Direct stick-to-surface mapping + No stability augmentation + Ultimate backup mode + +Navigation: + IRS/INS (Inertial Reference/Inertial Navigation System): + Ring laser gyro (RLG) or fiber-optic gyro (FOG) + Drift rate: <0.01°/h (navigation grade), <1°/h (tactical grade) + Alignment time: 5–10 min (gyrocompassing on ground) + + Kalman filter integration: + INS + GPS SBAS for blended navigation solution + GPS SBAS accuracy: <1m horizontal, <2m vertical (WAAS/EGNOS) + + Radio Altimeter (Rad Alt): + Frequency: 4.2–4.4 GHz (C-band) + Range: 0–2,500 ft (typical) + Accuracy: ±2 ft or 2% (whichever greater) + Critical for: autoland, GPWS/EGPWS, CAT II/III approaches + +Communication: + VHF voice/data: + Frequency band: 118.000–136.975 MHz + Channel spacing: 8.33 kHz (Europe), 25 kHz + Modulation: AM (DSB-AM for voice), VDL Mode 2 for data + VDL Mode 2: 31.5 kbps, CSMA protocol + + HF communication: + Frequency: 2–30 MHz (oceanic/remote) + SSB (Single Side Band) modulation + HFDL (HF Data Link): ACARS over HF + + SATCOM (Satellite Communications): + L-band: Inmarsat (1.5–1.6 GHz), Iridium (1.6 GHz) + Voice + data: SwiftBroadband up to 432 kbps + ACARS over SATCOM for oceanic tracking + + ACARS (Aircraft Communications Addressing and Reporting System): + VHF/ HF/ SATCOM data link + OOOI messages: Out-Off-On-In (gate departure, takeoff, landing, gate arrival) + FMS upload, weather, maintenance reports + + CPDLC (Controller-Pilot Data Link Communications): + Replaces voice for routine ATC clearances + FANS-1/A over ACARS (oceanic), ATN B1 over VDL Mode 2 (continental) + +Surveillance: + Weather Radar (WXR): + X-band: 9.3–9.5 GHz + Functions: precipitation detection, turbulence (Doppler), windshear + Antenna: flat-plate phased array, ±90° azimuth sweep + Predictive windshear: ±30° ahead, up to 5 nm range + + TAWS / EGPWS (Terrain Awareness / Enhanced Ground Proximity): + Uses GPS + terrain database + radar altimeter + Alerts: "TERRAIN, TERRAIN, PULL UP", "TOO LOW, GEAR" + EGPWS: terrain display on ND, forward-looking terrain alerting + + TCAS II (Traffic Collision Avoidance System): + Active interrogation on 1,030 MHz, replies on 1,090 MHz + Version 7.1: coordinated RAs (Resolution Advisories) + Range: ~14 nm (40 nm for traffic display) + + ADS-B (Automatic Dependent Surveillance – Broadcast): + ADS-B Out (mandate): transmits position, velocity, ID on 1,090 MHz + ADS-B In: receives traffic and weather (FIS-B, TIS-B) + Update rate: 0.5–2 Hz (position), GPS-based + + Transponder: + Mode S: selective interrogation, 24-bit ICAO address + Mode A/C: legacy altitude + squawk code + Extended Squitter: 112-bit message for ADS-B + +Cockpit displays: + PFD (Primary Flight Display): + Attitude indicator (ADI), airspeed tape, altitude tape + Vertical speed, heading, FMA (Flight Mode Annunciator) + Typically 15–18 inch LCD, sunlight readable + + ND (Navigation Display): + Map mode (compass rose, arc, plan) + Weather radar overlay, TCAS traffic, terrain + Flight plan route + waypoints + + MFD (Multi-Function Display): + Systems synoptic pages (hydraulic, electrical, fuel, etc.) + CMC (Central Maintenance Computer) interface + + EICAS / ECAM (Engine Indication & Crew Alerting): + Engine parameters: N1, N2, EGT, FF, oil P/T, vibration + CAS (Crew Alerting System): warning/caution/advisory messages + Checklist display for non-normal procedures + + HUD (Head-Up Display): + Holographic combiner: transparent, infinite focus (~optical infinity) + Field of view: ~30° horizontal × 25° vertical (typical) + Display: CRT or LCD with collimating optics + Symbology: flight path vector, horizon, speed, altitude, guidance cue + + EVS (Enhanced Vision System): + IR camera (3–5µm MWIR or 8–12µm LWIR) + Image fused with SVS (Synthetic Vision System) terrain from DEM + +EWIS (Electrical Wiring Interconnection System): + Wiring harness design: + Wire specification: MIL-W-22759 (PTFE), MIL-W-81381 (polyimide) + AWG sizes: 20, 22, 24 (signal), 16, 18 (power), 8–2 (feeder) + Shielding: single braid, double braid, or foil + braid + Harness bundling: nylon lacing tape or P-clips, separation distance + + Connector types: + MIL-DTL-38999 Series III (circular): + Shell size: 9–25 (diameter) + Contact size: 22D, 20, 16, 12 + Contact type: crimp (MIL-C-22520/1 or /2 tool) + Environmental: scoop-proof, EMI backshell available + + EN2997 (EN standard, high-temperature): + Fire-resistant, 260°C continuous, 1,100°C/15min fire + Used in engine/nacelle areas + + AS39029 contacts: + Crimp force: 3–20 lbs depending on size + Pull test: contact retention force > specified (per MIL-DTL-38999) + + Harness shielding and bonding: + HIRF (High Intensity Radiated Fields) protection: + Shielding effectiveness: SE = 20×log₁₀(E_incident / E_transmitted) [dB] + Target: >40 dB attenuation over 10kHz–18GHz + Bonding strap: <2.5mΩ DC resistance + + Lightning indirect effects protection: + Cable shielding + connector backshell bonding + Transient protection devices (TVS diodes) + + Harness testing: + HiPot (High Potential / Dielectric Withstand): + Test voltage: 1,500VAC or 2,120VDC (for 115VAC system) + Duration: 60 seconds + Leakage current: <5mA (pass) + + IR (Insulation Resistance): + Test voltage: 500VDC (Megger) + Pass criterion: >100MΩ for new harness, >10MΩ in service + + TDR (Time Domain Reflectometry): + Pulse sent down wire → reflection from fault + Distance to fault: d = v×Δt/2 + v = propagation velocity (~0.67c for twisted pair) + Fault type: open (positive reflection), short (negative reflection) + + Continuity test: + 4-wire Kelvin measurement for low-resistance checks + Pass: <0.1Ω per connection + + Laser marking: + Wire identification per SAE AS50881: + Marking every 75–150mm along wire + Laser marking (UV 355nm) for PTFE/ETFE insulation + Inkjet alternative for PVC insulated wires + Legibility: human-readable + optional 2D barcode +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class FCC_Redundancy { Triplex, Quadruplex, DualDual }; +enum class ActuatorType { EHA_ElectroHydrostatic, EBHA_ElectroBackupHydraulic, ServoControl_Hydraulic, EMA_Electromechanical }; +enum class NavigationSystem { IRS_RLG, IRS_FOG, GPS_SBAS, RadioAltimeter, VOR_ILS_DME }; +enum class CommSystem { VHF_8_33, HF_SSB, SATCOM_LBand, ACARS_VDL2, CPDLC_ATN }; +enum class SurveillanceSystem { WXR_XBand, TAWS_EGPWS, TCAS_II_v71, ADS_B_Out, ModeS_Transponder }; +enum class DisplayType { PFD, ND, MFD, EICAS_ECAM, HUD_Holographic, EVS_IR }; +enum class ConnectorType { MIL_DTL_38999_III, EN2997, AS39029, ARINC_600, ARINC_404 }; + +struct FCC_Spec { + FCC_Redundancy redundancy; + int num_channels; + double failure_rate_per_channel_per_hour; + double fault_detection_interval_s; + double voting_logic; // "2oo3", "3oo4" + bool control_law_normal_supported; + bool control_law_alternate_supported; + bool control_law_direct_supported; +}; + +struct ActuatorSpec { + ActuatorType type; + double max_force_kN; + double max_velocity_mm_per_s; + double bandwidth_Hz; + double stroke_mm; + double power_consumption_kW; + std::string controlled_surface; // "Elevator_LH", "Aileron_RH", etc. +}; + +struct NavigationSpec { + double ins_drift_rate_deg_per_h; + double ins_alignment_time_min; + bool gps_sbas_enabled; + double gps_position_accuracy_m; // <1m with SBAS + bool radio_altimeter_installed; + double radio_alt_accuracy_ft; +}; + +struct CommunicationSpec { + bool vhf_voice; + bool vhf_vdl_mode2; + double vhf_channel_spacing_kHz; // 8.33 or 25 + bool hf_ssb; + bool satcom_lband; + bool acars_over_vhf; + bool acars_over_satcom; + bool cpdlc_fans1a; +}; + +struct SurveillanceSpec { + bool wxr_xband; + double wxr_detection_range_nm; + bool taws_egpws; + bool tcas_ii; + bool ads_b_out; + bool ads_b_in; + bool mode_s_transponder; +}; + +struct CockpitDisplaySpec { + bool pfd; // 2 required (captain + FO) + bool nd; + int num_mfd; + bool eicas_ecam; + bool hud; + double hud_fov_horizontal_deg; + double hud_fov_vertical_deg; + bool evs_ir; +}; + +struct ConnectorContactSpec { + ConnectorType connector_type; + int shell_size; + std::string contact_size; // "22D", "20", "16" + double crimp_force_N; + double contact_retention_force_N_min; + double max_current_A; + double max_voltage_V; +}; + +struct WiringHarnessSpec { + std::string harness_id; + double total_length_m; + int num_conductors; + std::vector awg_sizes; + std::string insulation_material; // "PTFE_MIL22759", "Polyimide_MIL81381" + std::string shielding_type; + double shielding_effectiveness_dB; + bool hirf_protection; + bool lightning_protection; + std::vector connectors; +}; + +struct EWIS_TestSpec { + bool hipot_test_required; + double hipot_voltage_VAC_or_VDC; + double hipot_duration_s; + double hipot_max_leakage_mA; + bool ir_test_required; + double ir_test_voltage_VDC; + double ir_pass_threshold_Mohm; + bool tdr_test_required; + double tdr_propagation_velocity_fraction_c; + bool continuity_test_required; + bool laser_marking_required; +}; + +struct AvionicsSpec { + FCC_Spec fcc; + std::vector actuators; + NavigationSpec navigation; + CommunicationSpec communication; + SurveillanceSpec surveillance; + CockpitDisplaySpec cockpit; + std::vector wiring_harnesses; + EWIS_TestSpec ewis_test; + double target_catastrophic_failure_rate_per_flight_hour; // <1E-9 +}; + +struct AvionicsState { + bool fcc_channel_1_healthy; + bool fcc_channel_2_healthy; + bool fcc_channel_3_healthy; + bool fcc_channel_4_healthy; // if quadruplex + std::string active_control_law; // "Normal", "Alternate", "Direct" + double ins_drift_accumulated_deg; + bool gps_sbas_locked; + bool tcas_ra_active; + bool terrain_alert_active; + double hipot_leakage_current_mA; + bool hipot_passed; + double ir_measured_Mohm; + bool tdr_fault_detected; + double tdr_fault_distance_m; +}; + +struct AvionicsPerformance { + double fcc_availability_pct; // >99.999% + double system_failure_probability_per_flight_hour; + bool meets_1e9_catastrophic_failure_rate; + double navigation_position_error_m_cep; // 50% CEP + bool all_comm_systems_functional; + bool all_surveillance_systems_functional; + double harness_hipot_pass_rate_pct; + double harness_ir_pass_rate_pct; + bool ewis_certified; +}; + +AvionicsSpec design_avionics_suite( + FCC_Redundancy redundancy, + int num_actuators, + bool include_hud, + bool include_evs +); + +AvionicsState initialize_avionics_state(const AvionicsSpec& spec); + +AvionicsPerformance simulate_avionics( + const AvionicsSpec& spec, + AvionicsState& state, + double flight_hours, + double operating_altitude_ft +); + +double calculate_fcc_system_failure_rate( + double channel_failure_rate_per_h, + int num_channels, + double detection_interval_h, + int required_healthy_channels +); + +double calculate_connector_crimp_force( + const std::string& contact_size, + const std::string& wire_awg +); + +bool verify_ewis_hipot( + double test_voltage_V, + double measured_leakage_mA, + double max_allowable_mA +); + +} // namespace vde::aerospace_assembly +``` + +--- + +### 7. Ground & Flight Test (P1) + +#### 7.1 Iron Bird, Static Test, Fatigue Test, and Flutter Test + +``` +Ground & flight test overview: + Before certification, aircraft undergo extensive ground testing (Iron Bird + systems integration, full-scale static, fatigue) and flight testing + (performance, handling, flutter, EMC/HIRF). These tests validate design + assumptions and demonstrate compliance with FAR Part 25 / EASA CS-25. + +Iron Bird test: + Full-scale hydraulic and flight control integration test rig + Systems included: + Hydraulic: pumps (3,000psi commercial / 5,000psi military), reservoirs + Actuators: all primary flight control actuators + Landing gear: retract/extend system, steering + Flight control computers: same as aircraft installation + Flight control surfaces: actual or mass/inertia-equivalent simulators + + Test objectives: + Verify FCS functionality under all modes (normal/alternate/direct) + Hydraulic system performance (flow, pressure, temperature) + Failure mode testing (pump failure, jam, leak) + Endurance: 2× design life in simulated flights + +Full-scale static test: + Test article: complete airframe (or major components) + Loading: hydraulic actuators apply discrete loads at wing, fuselage, empennage + + Load cases (FAR 25.301): + Limit Load: maximum load expected in service + No permanent deformation allowed + No detrimental interference between parts + + Ultimate Load: 1.5 × Limit Load + Must sustain for 3 seconds without rupture + Local yielding permitted (buckling), but no structural collapse + + Instrumentation: + Strain gauges: typically 2,000–5,000 per full-scale test + 120Ω foil gauges, quarter/half/full bridge + Rosettes for shear/tension measurement + Displacement transducers: LVDT or string pot, ±0.01mm + Deflection measurement: photogrammetry or laser tracker + + Test sequence: + 1. Pre-load to 20–40% limit (check instrumentation, settle structure) + 2. Increment: 5–10% steps to limit load (hold 30s, record data) + 3. Unload (check for permanent set) + 4. Re-load to ultimate load (fast ramp, hold 3s) + 5. Inspection: no rupture, no detrimental deformation + +Full-scale fatigue test: + Load spectrum (S-N): + Derived from flight-by-flight mission profile + Gust, maneuver, pressurization, landing impact cycles + Rainflow cycle counting: + Extract cycles (mean + amplitude) from stress history + Miner's rule for cumulative damage: + D = Σ_i (n_i / N_i) + n_i = cycles at stress level i + N_i = fatigue life at stress level i (from S-N curve) + Failure (crack initiation) when D → 1 (typically D ≈ 0.5–1.5) + + Test factor: + 2× design service goal (DSG) for safe-life structures + 3× DSG for commercial transport (FAR 25.571) + + Crack detection: + Eddy current: surface and near-surface cracks (<5mm depth) + Frequency: 100Hz–10MHz + Probe types: pencil, sliding, ring + Sensitivity: crack >2mm length, >0.1mm depth + Ultrasonic: internal defects, delamination + Visual: dye penetrant for surface cracks + Inspection intervals: every 2,000–10,000 simulated flights + +Flight test instrumentation: + FTI (Flight Test Instrumentation) system: + DAU (Data Acquisition Unit): + Sampling rate: 1–1,000 Hz per channel (configurable) + Resolution: 16–24 bit ADC + Total channels: 500–5,000 per aircraft + Data storage: solid-state recorder, 100+ GB + + Sensor types: + Strain gauge: wing root bending, tail loads, landing gear + Accelerometer: structural vibration, flutter (piezoelectric, ±50g) + Pressure transducer: pitot-static, surface pressures (kulite) + Thermocouple: structure temperature, ECS temperature + Angular rate gyro: pitch/roll/yaw rates for dynamics + Flow angle sensor (AoA/AoSS vane): angle of attack, sideslip + + Pitot-static calibration: + Nose boom (production) + trailing cone (reference for static) + Trailing cone: ~1.5× wingspan behind aircraft → undisturbed static + Tower fly-by: low pass at known altitude for static pressure error + GPS-based: INS/GPS true speed vs. pitot-static airspeed + +Flutter test: + Objective: demonstrate freedom from flutter (aeroelastic instability) + Flight envelope expansion: + Step-by-step speed/Mach increase + At each test point: + Excite structure (impulse, control surface frequency sweep) + Measure response (accelerometers at wing tip, fin tip, etc.) + Compute damping ratio ζ from decay + + Excitation methods: + Impulse: rapid control surface doublet (aileron, elevator, rudder) + Frequency sweep: sinusoidal control surface drive, 0.5–30 Hz + Atmospheric turbulence: natural excitation (less controlled but simpler) + + Damping ratio from log decrement: + δ = (1/n) × ln(A₁ / A_{n+1}) + ζ ≈ δ / 2π (for small damping) + + Where: + A₁ = amplitude of first peak + A_{n+1} = amplitude after n cycles + + Flutter margin per FAR 25.629: + At V_D (design dive speed) / M_D: ζ > 0.03 for all critical modes + At 1.15 × V_D (flutter clearance speed): no sustained oscillation + + V_D / M_D definition: + V_D = 1.4 × V_C (cruise speed) or demonstrated dive speed + M_D = corresponding Mach number + + Envelope expansion: + Start: V_LO (landing gear operating speed) → flutter unlikely + Increment: 0.05 M or 10 knots IAS between cleared points + Step 1: V_LO → V_C (cruise): check all configurations + Step 2: V_C → V_D: check critical configurations only + Flutter detection: abrupt amplitude growth → stop immediately + +EMC / HIRF test: + Indirect effects of lightning: + Equipment transient design level (ETDL): + Waveform 1 (current): 6.4/69 µs double exponential + Waveform 2 (voltage): 100ns/6.4µs + Pin injection test: apply waveforms to connector pins + Pass: no damage, no upset > specified level + + HIRF test: + Radiated susceptibility: 10 kHz – 18 GHz + Field strength levels per FAA Advisory Circular 20-158: + Category A (critical): 200 V/m (10kHz–400MHz), 7,200 V/m (4–8GHz) + Conducted susceptibility: bulk cable injection + Pass: no upset of critical systems + + Ground test: + Mode-stirred reverberation chamber (for high frequencies) + Anechoic chamber (for low frequencies) + Aircraft-level test: taxi, engine run, all systems operating +``` + +#### 7.2 Proposed API + +```cpp +namespace vde::aerospace_assembly { + +enum class GroundTestType { IronBird, FullScaleStatic, FullScaleFatigue, EMC_HIRF }; +enum class FlutterExcitation { ControlSurfacePulse, FrequencySweep, TurbulenceNatural }; +enum class LoadType { LimitLoad, UltimateLoad }; +enum class CrackDetectionMethod { EddyCurrent, Ultrasonic_UT, DyePenetrant, Visual }; + +struct IronBirdSpec { + double hydraulic_pressure_psi; // 3000 or 5000 + double hydraulic_flow_gpm; + int num_hydraulic_pumps; + int num_actuators_tested; + bool landing_gear_retract_simulated; + bool fcs_computers_real_hardware; // use actual FCC or simulation + double endurance_simulated_flight_hours; + int failure_mode_cases; // number of failure scenarios tested +}; + +struct StrainGaugeSpec { + int num_gauges; + double gauge_resistance_ohm; // typically 120Ω + std::string bridge_config; // "Quarter", "Half", "Full" + double gauge_factor; + std::string adhesive_type; // "Cyanoacrylate", "Epoxy" + double excitation_voltage_V; +}; + +struct StaticTestSpec { + double limit_load_factor; + double ultimate_load_factor; // 1.5 × limit + std::vector load_discrete_points; // actuator positions + StrainGaugeSpec strain_gauges; + bool photogrammetry_deflection; + double deflection_measurement_accuracy_mm; + double hold_time_at_limit_s; + double hold_time_at_ultimate_s; // 3s per FAR 25 +}; + +struct FatigueTestSpec { + double design_service_goal_flights; + double test_factor; // 2× or 3× DSG + double total_simulated_flights; + std::vector s_n_curve_N; // N values + std::vector s_n_curve_S; // S values (stress amplitude) + std::vector load_spectrum_cycles; + std::vector load_spectrum_mean_stress_MPa; + double cumulative_damage_target; // D → 1 + std::vector inspection_methods; + double inspection_interval_flights; +}; + +struct FlightTestInstSpec { + int num_dau_channels; + double max_sample_rate_Hz; + double adc_resolution_bits; + double data_storage_GB; + bool nose_boom_pitot_static; + bool trailing_cone_static; + bool gps_ins_airspeed_calibration; + int num_accelerometers; + int num_pressure_transducers; + int num_strain_gauges_flight; +}; + +struct FlutterTestSpec { + double vc_knots; // design cruise speed + double vd_knots; // design dive speed + double md_mach; + double speed_increment_knots; // step between test points + FlutterExcitation excitation_method; + double exc_frequency_start_Hz; + double exc_frequency_end_Hz; + double exc_duration_s; + double damping_ratio_threshold; // 0.03 minimum + int num_accelerometers_flutter; + std::vector flutter_critical_modes; // "WingBending", "WingTorsion", etc. +}; + +struct EMC_HIRF_Spec { + double radiated_field_strength_V_per_m; + double frequency_range_min_kHz; + double frequency_range_max_GHz; + std::string waveform_type; // "6.4_69us", "100ns_6.4us" + double pin_injection_voltage_V; + double pin_injection_current_A; + bool reverberation_chamber_test; + bool anechoic_chamber_test; + bool aircraft_level_full_systems_test; +}; + +struct FlightTestSpec { + GroundTestType ground_test_type; + IronBirdSpec iron_bird; + StaticTestSpec static_test; + FatigueTestSpec fatigue_test; + FlightTestInstSpec instrumentation; + FlutterTestSpec flutter; + EMC_HIRF_Spec emc_hirf; + double max_operating_altitude_ft; + double max_operating_mach; +}; + +struct FlightTestState { + double current_speed_knots; + double current_mach; + double current_altitude_ft; + double flutter_damping_ratio_measured; + double flutter_frequency_Hz; + bool flutter_detected; + double fatigue_cumulative_damage_D; + bool ultimate_load_rupture; + double emc_upset_detected; + int flights_completed; +}; + +struct FlightTestPerformance { + bool iron_bird_test_passed; + bool static_test_passed; + bool fatigue_test_passed; // D < 1 at DSG × factor + bool flutter_cleared_to_vd_md; + double flutter_min_damping_ratio; + bool emc_hirf_test_passed; + double static_deflection_at_limit_percent_of_predicted; + bool flight_envelope_cleared; +}; + +FlightTestSpec design_flight_test( + double vc_knots, + double vd_knots, + double md_mach, + double design_service_goal_flights +); + +FlightTestState initialize_flight_test_state(const FlightTestSpec& spec); + +FlightTestPerformance simulate_flight_test( + const FlightTestSpec& spec, + FlightTestState& state, + double test_speed_knots, + double test_mach, + double test_altitude_ft +); + +double calculate_flutter_damping_ratio( + const std::vector& response_time_s, + const std::vector& response_amplitude_g, + int num_peaks +); + +double calculate_fatigue_damage( + const std::vector& cycles, + const std::vector& stress_amplitude_MPa, + const std::vector& s_n_N, + const std::vector& s_n_S +); + +bool verify_ultimate_load( + double applied_load_N, + double ultimate_load_N, + double measured_strain_ue, + double max_allowable_strain_ue, + double hold_time_s +); + +} // namespace vde::aerospace_assembly +``` + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Primary Types | +|-----------|--------|---------------| +| `vde::aerospace_assembly` | `vde/aerospace_assembly/airframe_assembly.h` | `AirframeJoinSpec`, `AirframeJoinState`, `AirframeJoinPerformance`, `FuselageSectionSpec`, `POGO_ActuatorSpec`, `MetrologyConfigSpec`, `JunctionSpec`, `SectionPose` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/airframe_assembly.h` | `PanelAssemSpec`, `PanelAssemState`, `PanelAssemPerformance`, `DrillRivetSpec`, `FasteningMachineSpec`, `AFPSpec`, `ATLSpec`, `AutoclaveSpec`, `CureKineticsSpec` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/airframe_assembly.h` | `WingSpec`, `WingAssemState`, `WingAssemPerformance`, `SparSpec`, `RibSpec`, `SkinPanelSpec`, `MovableSurfaceSpec`, `EmpennageSpec`, `FuelTankSpec` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/engine_propulsion.h` | `TurbofanSpec`, `TurbofanAssemState`, `TurbofanAssemPerformance`, `HPCSpec`, `CompressorStageSpec`, `CombustorSpec`, `HPTSpec`, `LPTSpec`, `FanSpec`, `AGBSpec` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/engine_propulsion.h` | `EngineTestSpec`, `EngineTestState`, `EngineTestPerformance`, `LoadCellSpec`, `BellmouthSpec`, `SFC_MeasurementSpec`, `EGT_MeasurementSpec`, `EmissionSpec`, `BirdStrikeSpec` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/avionics_test.h` | `AvionicsSpec`, `AvionicsState`, `AvionicsPerformance`, `FCC_Spec`, `ActuatorSpec`, `NavigationSpec`, `CommunicationSpec`, `SurveillanceSpec`, `WiringHarnessSpec`, `EWIS_TestSpec` | +| `vde::aerospace_assembly` | `vde/aerospace_assembly/avionics_test.h` | `FlightTestSpec`, `FlightTestState`, `FlightTestPerformance`, `IronBirdSpec`, `StaticTestSpec`, `FatigueTestSpec`, `FlutterTestSpec`, `EMC_HIRF_Spec` | + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|---|---|---| +| FAA FAR Part 25 | Airworthiness Standards: Transport Category Airplanes | Structural design, systems, flight test | +| EASA CS-25 | Certification Specifications for Large Aeroplanes | European airworthiness certification | +| FAR Part 33 / CS-E | Airworthiness Standards: Aircraft Engines | Engine certification, bird strike, ice | +| FAR Part 36 / ICAO Annex 16 | Noise Standards / Environmental Protection | Engine noise certification | +| ICAO Annex 16 Vol II / CAEP | Aircraft Engine Emissions | LTO cycle emissions limits (NOx, CO, UHC, Smoke) | +| MIL-STD-810 | Environmental Engineering Considerations | Vibration, temperature, humidity testing | +| MIL-DTL-38999 Series III | Connectors, Electrical, Circular | EWIS connector specification | +| SAE AS50881 | Wiring Aerospace Vehicle | EWIS design and installation | +| ARINC 429 | Digital Information Transfer System | Avionics data bus (point-to-point) | +| ARINC 629 | Multi-Transmitter Data Bus | Boeing 777 data bus | +| ARINC 664 Part 7 | Avionics Full-Duplex Switched Ethernet (AFDX) | A380/A350/B787 data network | +| ARP 4754A | Development of Civil Aircraft and Systems | Systems development process | +| DO-178C / ED-12C | Software Considerations in Airborne Systems | Software certification | +| DO-254 / ED-80 | Design Assurance Guidance for Airborne Electronic Hardware | Hardware certification | +| DO-160G / ED-14G | Environmental Conditions and Test Procedures | Environmental qualification | +| ISO 1940-1 | Mechanical Vibration — Balance Quality Requirements | Rotor balancing (G2.5) | +| ISO 10816-21 | Mechanical Vibration — Gas Turbines | Engine vibration limits | +| ISO 230-2 | Test Code for Machine Tools — Positioning Accuracy | CNC machine/robotic accuracy | +| SAE ARP 1179 | Aircraft Gas Turbine Engine Exhaust Smoke Measurement | Smoke number test | +| ISO 8501-1 | Preparation of Steel Substrates (cleanliness) | Surface prep (subset applicable) | +| ASME B46.1 | Surface Texture, Roughness | Surface finish for sealing surfaces | +| ASTM E1417 | Liquid Penetrant Testing | NDT dye penetrant | +| ASTM E1742 | Radiographic Examination | NDT radiography | +| ASTM E2375 | Ultrasonic Testing — Wrought Products | NDT ultrasonic | +| AITM (Airbus) / BSS (Boeing) | Internal test methods | Proprietary test specifications | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| FAL Automation (POGO) | Boeing BSCA | B787 FAL Everett/North Charleston | Fuselage join automation, 3-day FAL flow | +| FAL Automation | Airbus FAL | A350 XWB FAL (Toulouse) | POGO-based join, laser tracker alignment | +| FAL Automation | COMAC | C919 FAC (Shanghai Pudong) | Fuselage join, domestic automation | +| Laser Tracker | Hexagon Leica | AT960 / AT930 | ±15µm+6µm/m, 6DoF, 160m range | +| iGPS | Nikon Metrology | iGPS/iSpace | ±0.25mm @ 10m, multi-sensor simultaneous | +| Automated Drilling/Riveting | Brotje | iRACe / C-Frame | 1-up assembly, CFRP/Al/Ti stacks | +| Automated Drilling/Riveting | Gemcor / Electroimpact | E-MAG / G12 | EMR, 5–20kJ, interference fit | +| Automated Drilling/Riveting | Electroimpact | EMR (Electromagnetic Riveting) | 100–300kN peak, <1ms pulse | +| AFP Machine | MTorres | TORRESFIBERLAYUP | 8–32 tows, laser heating, individual cut | +| AFP Machine | Electroimpact | AFP Head | 16–32 tows, thermoplastic capable | +| ATL Machine | Ingersoll / Fives | ATLAS | 150/300mm tape, contour parallel | +| Autoclave | ASC Process Systems | Large Aerospace Autoclave | 7 bar, 250°C, N₂ atmosphere | +| Turbofan Engine (Large) | GE Aviation | GE9X | 134,300 lbf, 61:1 OPR, 134" fan, CFRP blades, CMC HPT | +| Turbofan Engine (Large) | GE Aviation | GE90-115B | 115,300 lbf, 42:1 OPR, 128" fan | +| Turbofan Engine (Large) | Rolls-Royce | Trent XWB-97 | 97,000 lbf, 50:1 OPR, 118" fan, 3-shaft | +| Turbofan Engine (Large) | Rolls-Royce | UltraFan | 64,000+ lbf, >25% fuel burn reduction, geared | +| Turbofan Engine (Medium) | CFM International | LEAP-1A (A320neo) | 32,160 lbf, 40:1 OPR, 78" fan, CMC shrouds | +| Turbofan Engine (Medium) | CFM International | LEAP-1B (737 MAX) | 28,000 lbf, 69" fan | +| Turbofan Engine (Medium) | Pratt & Whitney | PW1100G GTF (A320neo) | 33,000 lbf, geared turbofan, 81" fan | +| Engine Nacelle | Safran Nacelles | A320neo / B737 MAX / A330neo | Integrated nacelle, thrust reverser | +| Engine Test Cell | MDS / Atec / Calspan | Sea Level / Altitude Test Cell | Thrust to 150klbf, SFC ±0.1%, altitude to 50kft | +| FBW Flight Control | Collins Aerospace (UTC) | A350 XWB / B787 | Triplex/Quadruplex FCC, EHA/EBHA actuators | +| FBW Flight Control | Thales Avionics | A380 / A350 | IMA (Integrated Modular Avionics) | +| FBW Flight Control | BAE Systems | F-35 / Eurofighter | Quadruplex, high-rate, military | +| Navigation (IRS/GPS) | Honeywell Aerospace | ADIRS / Laseref VI | RLG, <0.01°/h, SBAS GPS | +| Navigation | Thales Avionics | TopAxyz / NavAero | FOG-based IRS | +| VHF Comm | Collins Aerospace | VHF-2100 | 8.33kHz, VDL Mode 2 | +| SATCOM | Honeywell / Thales | Aspire / SwiftBroadband | L-band, 432kbps, Inmarsat/Iridium | +| WXR | Honeywell | IntuVue RDR-4000 | 3D volumetric scanning, 320nm range | +| WXR | Collins Aerospace | WXR-2100 MultiScan | Automated threat assessment | +| TCAS II | Honeywell / ACSS | TPA-100B / TCAS 3000SP | v7.1, coordinated RA | +| EWIS Connectors | Amphenol / TE Connectivity / Radiall | MIL-DTL-38999 / EN2997 | Circular, scoop-proof, EMI backshell | +| Iron Bird Test | Airbus / Boeing / COMAC | Full-scale integration | 3000/5000psi, all actuators, FCC hardware | +| Full-Scale Static Test | Various OEMs + test houses | 150% ultimate load | 2,000–5,000 strain gauges, photogrammetry | +| Fatigue Test | Various OEMs + test houses | 2×/3× DSG fatigue | S-N spectrum, eddy current inspection | +| Flight Test Instrumentation | Curtiss-Wright / Safran / Zodiac | DAU / ACRA / KAM-500 | 16–24bit, 1k–1M S/s, IRIG-B time sync | + +--- + +## Acceptance Criteria + +1. **Fuselage Join & Alignment (必选):** Engine shall compute fuselage section 6DoF pose from Leica laser tracker spherical coordinates (d,θ,φ) and iGPS triangulation with DOP quality metric. POGO actuator inverse/forward kinematics using Procrustes SVD registration shall solve stroke sequences for closed-loop alignment. Junction gap tolerance (<0.5mm), concentricity, and fastener hole H7 tolerance (+0/−0.015mm) shall be verified. Wing-to-fuselage join bearing stress check for multi-material stacks (CFRP+Al+Ti) shall pass. Empennage incidence ±0.1° and dihedral shall be validated. + +2. **Panel & Skin Assembly (必选):** Engine shall model E-MAG/Brotje automated drilling/riveting cycles (5–15s per hole) with material-specific feed rates (CFRP: 0.05–0.10mm/rev, Al: 0.10–0.20mm/rev, Ti: low speed). EMR energy calculation (E = ½×C×V², E_req = k×D²×L/η) shall validate interference fit 0.5–1.5% of D. AFP tow steering radius R_min = w/(2×ε_max) shall constrain path planning. ATL tape gap control (0–2.5mm) and gap staggering shall be verified. Autoclave cure Kamal-Sourour kinetics (dα/dt model) shall predict degree of cure and exotherm. Porosity <1% target shall be estimated. Fastener rejection rate <100 ppm. + +3. **Wing & Empennage Assembly (必选):** Engine shall design wing box with configurable spars (front/rear), ribs, skin panels, and integral fuel tank. Movable surface kinematics (track-guided slat, Fowler flap with Δx = R×(1−cosθ), Δz = R×sinθ) shall model deployment motion. Flap takeoff (5–15°) and landing (25–40°) settings shall be configurable. Tail volume coefficients (V_HT = S_HT×l_HT/(S_wing×c̄), V_VT = S_VT×l_VT/(S_wing×b)) shall verify stability. Fuel tank leak test (3–5 psi differential, <0.5 psi/min decay) shall be reported. + +4. **Turbofan Engine Assembly (必选):** Engine shall compute HPC rotor disk fir-tree contact stress (σ_c = F_c/(N_lobes×A_contact)) under centrifugal load. VGV schedule (closed: −20° to −40°, open: 0° to +10°) from corrected speed shall be supported. Active tip clearance control (Δη ≈ −2 to −3% per 1% clearance/chord increase) shall estimate efficiency impact. Combustor swirler number S (0.6–1.2), film cooling effectiveness η_f = (T_g−T_aw)/(T_g−T_c), TBC YSZ EB-PVD coating (200–500µm, 100–200°C reduction), Larson-Miller creep life, and fan blade containment energy E = ½×m×(ωr)² shall be calculated. + +5. **Engine Build & Test (必选):** Engine shall model horizontal split case build sequence (core stacking→split→fan case→accessories). Sea level static thrust measurement with load cell calibration (±0.25% FS) and bellmouth correction shall be computed. SFC correction to standard day using θ^α×δ^β exponents shall be applied. EGT margin (initial 30–80°C, erosion 5–15°C/1k cycles) shall be tracked. ICAO Annex 16 LTO cycle emissions (NOx/CO/UHC/Smoke at 4 power settings) shall be evaluated. Bird ingestion (2.5–3.65kg) post-strike thrust >75% for 5 min shall be verified. Ice accretion Appendix C conditions (LWC 0.2–3.0 g/m³, MVD 15–50µm) shall be configurable. + +6. **Avionics Integration & EWIS (必选):** Engine shall model FBW FCC triplex/quadruplex voting with failure probability P_fail = 3λ²×T_det (triplex) or 4λ³×T²_det (quadruplex). EHA/EBHA actuator bandwidth (>10Hz), navigation INS drift (<0.01°/h) + GPS SBAS, VHF 118–137MHz/8.33kHz, SATCOM L-band, WXR X-band, TCAS II v7.1, ADS-B Out/In, cockpit PFD/ND/EICAS/HUD/EVS, and EWIS harness MIL-DTL-38999/EN2997 connectors with HiPot (1,500VAC, <5mA leakage), IR (>100MΩ at 500VDC), and TDR fault location shall be verified. Catastrophic failure rate <1×10⁻⁹ per flight hour. + +7. **Ground & Flight Test (必选):** Engine shall model Iron Bird hydraulic (3,000psi/5,000psi) FCS integration with all actuator types. Full-scale static test to limit load (no permanent set) and ultimate load (1.5× limit, hold 3s, no rupture) with strain gauge network (2,000–5,000 gauges) shall be simulated. Fatigue test S-N spectrum with rainflow cycle counting and Miner's damage accumulation (D = Σ n_i/N_i) shall track crack initiation. Flutter test with envelope expansion and damping ratio ζ from log decrement (δ = (1/n)×ln(A₁/A_{n+1})) shall verify ζ > 0.03 at V_D/M_D. EMC/HIRF radiated susceptibility (10kHz–18GHz) shall be assessed. + +8. **Performance Integration (必选):** Engine shall support end-to-end aerospace assembly workflow: airframe join → panel assembly → wing assembly → engine build → engine test → avionics integration → flight test. All tolerances, load distributions, and material properties shall propagate through the chain. Design-to-build traceability and configuration control shall be maintained. + +9. **Unit Consistency (必选):** All functions shall accept and return SI-derived units with aerospace conventions: dimensions in mm (structure) or inch (fasteners), thrust in kN or lbf, weight in kg, temperature in °C or K (thermodynamic formulas), pressure in bar or psi, torque in N·m, frequency in Hz or RPM, stress in MPa or ksi, strain in µε, energy in J or kJ, electrical resistance in Ω or MΩ. Coordinate transformations use mm units. Angular measurements in degrees or radians as appropriate for the formula context. + +10. **Regulatory Compliance (必选):** Engine shall verify compliance with key regulatory frameworks: FAA FAR Part 25 (structural integrity, systems, flight test), EASA CS-25, FAR Part 33 / CS-E (engine), FAR 25.571 (fatigue and damage tolerance), FAR 25.629 (flutter), FAR 25.1309 (system safety), FAR 25.965 (fuel tank), FAR 33.76 (bird ingestion), FAR 33.94 (blade containment), ICAO Annex 16 Vol II (emissions), DO-160G (environmental qualification), and EWIS per FAR 25 Subpart H. \ No newline at end of file diff --git a/docs/feedback/VDE-1146.md b/docs/feedback/VDE-1146.md new file mode 100644 index 000000000..349b9bcdb --- /dev/null +++ b/docs/feedback/VDE-1146.md @@ -0,0 +1,2995 @@ +# VDE-1146: Railway & Metro Equipment Engine Requirements (轨道交通设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign RailwayMetroEngine — car body structure & assembly, interior & auxiliary systems, door & gangway systems, bogie frame & suspension, wheelset & bearing, brake system, signaling & CBTC, traction power & track +**Module**: `vde/railway_metro/rolling_stock.h`, `vde/railway_metro/bogie_brake.h`, `vde/railway_metro/signal_infrastructure.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Railway / Metro / Rolling Stock / Bogie / Signaling / Catenary + +--- + +## Background + +Railway and metro systems form the backbone of urban and intercity passenger transport, with global rolling stock fleets exceeding 200,000 vehicles and annual production of over 5,000 vehicles. High-speed rail networks (operating at 250–380 km/h) and dense metro systems (headways as low as 90 seconds) demand precision engineering across car body structures, bogies, braking, signaling, and traction power systems. Unlike aerospace, railway systems operate in harsh ground-level environments with extreme loading cycles, vibration, weather exposure, and 30–40 year service lives with minimal downtime. + +Car body structures for modern rolling stock are predominantly aluminum alloy extrusions (6005A/6082/7020) joined by friction stir welding (FSW) for double-sided large hollow profiles, or stainless steel (EN 1.4003/1.4318/301L) with spot welding for corrosion-resistant applications. The underframe must absorb crash energy per EN 15227 crashworthiness categories C-I (metro: 800 kN at coupler), C-II (regional: 1,500 kN), and C-III (high-speed: 2,000 kN). The driver cab is a modular safety cell with laminated safety glass windshield and crash structure for obstacle deflection. Interior systems include aluminum honeycomb sandwich panels with melamine facing, ergonomic seating per EN 14752, LED lighting, and HVAC with R407C/R513A refrigerants supplying 10–20 m³/h/pax fresh air with CO₂ demand-controlled ventilation. + +Bogie design is the critical interface between vehicle and track. The bogie frame (welded box section from laminated plate) undergoes post-weld stress relief and machining of journal/pedestal surfaces. Primary suspension uses coil steel springs or rubber chevron springs for axle box guidance. Secondary suspension employs convoluted/rolling lobe air springs with auxiliary reservoirs, 3-position levelling valves, anti-roll torsion bars, and hydraulic telescopic yaw dampers for stability at high speed. The wheelset comprises monobloc forged rolled steel wheels (ER8/ER9, R9T per EN 13262) with S1002/XP55 tread profiles, hollow/solid axles (EA4T/EA1N per EN 13261), and double-row tapered roller bearing TBU sealed cartridge units with grease lubrication. Wheels undergo ultrasonic B-scan testing and periodic underfloor wheel lathe reprofiling. + +Braking systems for modern trains use electro-pneumatic (EP) brake control units with direct EP service brake and indirect automatic air brake backup. Foundation brakes include tread brake blocks (composite or grey cast iron) for conventional stock and disc brakes (axle-mounted or wheel-mounted) with sintered/metallic pads for high-speed. Load weighing valves enable variable load relay for consistent deceleration regardless of passenger load. Wheel slide protection (WSP) uses phonic wheel speed sensors to detect incipient slide (wheel deceleration 6–8%) and modulate brake pressure via dump/hold/apply valves, blending regenerative (rheostatic) and friction braking. + +Signaling has evolved from fixed block track circuits (AF audio frequency UM71/TI21) and axle counters to Communication-Based Train Control (CBTC) with moving block principles. The CBTC architecture includes zone controllers (ZC) computing movement authority limits, carborne controllers (VOBC), computer interlocking (CI), and automatic train supervision (ATS). Wayside-to-train radio uses LTE-M at 1.8 GHz or WiFi at 5 GHz. ATP provides overspeed protection with service and emergency brake curves; ATO enables automatic station stop within ±0.3m precision with energy-optimal coasting. Eurobalise intermittent transmission provides fixed and transparent data telegrams for position reference. + +Traction power is delivered via overhead catenary (contact wire Cu-Ag 120mm²/Cu-Mg 150mm² with autotension compensators at 10–20 kN) or third rail (DC 750V/1,500V steel-aluminum composite). Pantographs with carbon strip collectors maintain contact force via pneumatic raise and automatic dropping devices (ADD). Traction substations use 12/24-pulse rectifier transformers with IGBT active front-end for harmonics reduction. Track structure uses UIC60/E1 60kg/m rail (R260/R350HT head hardened) with flash-butt or Thermit aluminothermic welding, Vossloh W-tension clamp SKL elastic fastening, and ballasted or slab track (CRTS I/II/III with CAM/cement asphalt mortar infill). + +Leading benchmarks include Alstom (TGV, AGV, Citadis, Traxx, Prima), Siemens Mobility (Velaro, ICE4, Mireo, Vectron), CRRC (CR400AF/BF Fuxinghao复兴号, CRH380A/B/C), Bombardier (now Alstom), CAF, Talgo, Stadler, Hitachi Rail, Hyundai Rotem, Knorr-Bremse (brake/door/HVAC), Wabtec/Faiveley, ZF, Voith, SKF/FAG/Schaeffler (TBU bearings), Lucchini RS, Bonatrans GHH (wheelsets), Thales (SelTrac CBTC), Siemens (Trainguard CBTC), Alstom (Urbalis CBTC), CRSC (CTCS/TACS), Vossloh/Pandrol (fastening), voestalpine Railway Systems (rail), and regulatory frameworks including CENELEC EN 50126/128/129/159, UIC 518, TSI, EN 45545 fire safety, and EN 15227 crash. + +VDE currently lacks railway-specific engineering models for car body structural analysis, bogie dynamics, wheelset-rail interaction, brake system performance, CBTC signaling, and traction power design. This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria. + +--- + +## Detailed Requirements + +### 1. Car Body Structure & Assembly (P1) + +#### 1.1 Aluminum Extrusion Body, Stainless Steel Body, and Crashworthiness + +``` +Car body structure overview: + Railway vehicle bodies must meet longitudinal compression, vertical load, + and crash energy absorption requirements per EN 12663. Aluminum alloy + extrusion bodies (6005A/6082/7020) are joined by Friction Stir Welding + (FSW) for large hollow profiles; stainless steel bodies (EN 1.4003/1.4318/ + 301L) use resistance spot welding. The underframe absorbs crash energy + via controlled crumple zones per EN 15227. + +Aluminum extrusion body design: + Material properties: + 6005A-T6: R_m ≥ 260 MPa, R_p0.2 ≥ 215 MPa, A ≥ 8% + 6082-T6: R_m ≥ 310 MPa, R_p0.2 ≥ 260 MPa, A ≥ 10% + 7020-T6: R_m ≥ 350 MPa, R_p0.2 ≥ 290 MPa, A ≥ 8% + Extrusion wall thickness: 2.0–4.0 mm (thin-wall), 4.0–8.0 mm (thick) + Hollow profile cell size: typically 30–60 mm pitch + + Friction Stir Welding (FSW): + Process: rotating tool with shoulder + pin traverses along joint line + Frictional heat softens material (below melting point, ~450–500°C for Al) + Material is stirred/forged behind tool, creating solid-state bond + + FSW parameters: + Tool rotation: 400–1,200 RPM (for 6000-series Al, 4–8mm thickness) + Traverse speed: 200–800 mm/min + Axial force: 5–15 kN (shoulder plunge 0.1–0.3mm into workpiece) + Pin length: 0.1–0.3mm less than workpiece thickness + + Double-sided FSW: + First pass: weld from side A (outside skin) + Second pass: weld from side B (inside skin), overlapping nugget + Overlap depth: 1.0–2.0 mm (ensures full penetration) + Inspection: phased array UT for root flaw detection + + Weld quality acceptance per ISO 25239: + No crack, no lack of penetration, no tunnel defect + Weld nugget width: >80% of pin diameter + Tensile strength: >70% of parent material + + Body structure assembly sequence: + 1. Roof panel (corrugated sheet or extrusion profile) + 2. Sidewall panels (window frame + door portal reinforcement) + 3. Underframe (draft sill + buffer beam + corner post + cross beams) + 4. End walls / driver cab (modular cab for EMU/DMU) + 5. Longitudinal FSW welding of roof-to-sidewall, sidewall-to-underframe + 6. Transverse section joining (circumferential weld rings) + + Underframe crashworthiness (EN 15227): + Crash energy absorption categories: + C-I (metro/tram): 800 kN static compression at coupler + C-II (regional/intercity): 1,500 kN + C-III (high-speed): 2,000 kN + + Energy absorption zones: + Zone 1 (beyond coupler): 0–750 mm, collapse force F_avg [kN] + Energy absorbed: E_1 = F_avg × δ_1 [kJ] + Zone 2 (draft sill deformation): progressive buckling + Number of folds: n = L / (2×H_eff) + H_eff = 0.73 × t × (b × σ_y / (E × t²))^0.5 (simplified) + Where t = plate thickness, b = plate width + Zone 3 (survival cell): must remain intact, no intrusion + + Design collision scenario: + Identical train collision at 36 km/h (C-I/C-II) or 110 km/h (C-III) + Deceleration limit: <5g sustained, <7.5g peak (occupant safety) + + Longitudinal static compression (EN 12663 category P-II): + F_compression = 1,500 kN (metro) / 2,000 kN (mainline EMU) + Applied at coupler height via draft sill → buffer beam → corner posts + Buckling check: + P_cr = π² × E × I / (K×L)² (Euler buckling) + K = effective length factor (1.0 pinned, 0.5 fixed-fixed) + Must satisfy: P_cr > F_compression × safety_factor (≥1.5) + + Driver cab structure: + Modular cab: separate sub-structure bolted/welded to body shell + Materials: steel (S355J2) or aluminum (6005A), 3–5mm skin thickness + Crash structure: anti-climbing device, obstacle deflector (plow), + energy absorption tubes (aluminum honeycomb or thin-walled steel) + Windshield: laminated safety glass (EN 15152 / UIC 566) + Outer: chemically tempered glass 3–5mm + PVB interlayer: 1.52–3.04mm + Inner: annealed glass 3–5mm + Heated (ITO or wire): anti-fog / de-ice + Impact test: 1 kg aluminum projectile at 350 km/h (high-speed) + + Sidewall assembly: + Window frame: bonded glazing (structural silicone adhesive) + Window pane: double-glazed, tempered + laminated + Door portal: reinforced frame, door opening 1,300–1,900 mm clear width + Corner reinforcement brackets + + Roof structure: + Corrugated sheet (0.8–1.5mm stainless steel or aluminum) + Corrugation pitch: 40–80 mm, depth: 20–40 mm + Roof-mounted equipment: HVAC (2–4 units per car), pantograph base +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class CarBodyMaterial { Al_6005A_T6, Al_6082_T6, Al_7020_T6, SS_EN_14003, SS_301L, Hybrid_Al_SS }; +enum class WeldProcess { FSW_SingleSided, FSW_DoubleSided, MIG_Pulse, ResistanceSpot, LaserHybrid }; +enum class CrashCategory { EN15227_C_I, EN15227_C_II, EN15227_C_III }; +enum class EN12663_Category { P_I, P_II, P_III, P_IV, P_V }; + +struct AluminumExtrusionSpec { + CarBodyMaterial material; + double min_wall_thickness_mm; + double max_wall_thickness_mm; + double hollow_cell_pitch_mm; + double yield_strength_MPa; + double tensile_strength_MPa; + double elongation_pct; + double density_kg_per_m3; +}; + +struct FSW_Spec { + WeldProcess process; + double tool_rotation_rpm; + double traverse_speed_mm_per_min; + double axial_force_kN; + double shoulder_diameter_mm; + double pin_diameter_mm; + double pin_length_mm; + bool double_sided; + double overlap_depth_mm; +}; + +struct UnderframeSpec { + CrashCategory crash_category; + double static_compression_kN; + double energy_absorption_zone_1_length_mm; + double energy_absorption_zone_1_force_kN; + double survival_cell_length_mm; + double draft_sill_material; + double buffer_beam_capacity_kN; + double collision_speed_kmh; + double max_deceleration_g; +}; + +struct DriverCabSpec { + bool modular_cab; + std::string cab_material; + double skin_thickness_mm; + bool anti_climbing_device; + bool obstacle_deflector; + double windshield_outer_thickness_mm; + double windshield_interlayer_thickness_mm; + bool windshield_heated; +}; + +struct SidewallSpec { + double wall_height_mm; + double wall_thickness_mm; + int num_windows_per_side; + double window_width_mm; + double window_height_mm; + int num_doors_per_side; + double door_clear_width_mm; + double door_portal_reinforcement_thickness_mm; +}; + +struct RoofSpec { + double length_mm; + double width_mm; + double corrugation_pitch_mm; + double corrugation_depth_mm; + double sheet_thickness_mm; + int num_hvac_units; + bool pantograph_base; +}; + +struct CarBodySpec { + std::string vehicle_id; + double car_length_mm; + double car_width_mm; + double car_height_mm; + CarBodyMaterial body_material; + AluminumExtrusionSpec extrusion; + FSW_Spec welding; + UnderframeSpec underframe; + DriverCabSpec cab; + SidewallSpec sidewall; + RoofSpec roof; + EN12663_Category structural_category; + double tare_weight_kg; + double max_axle_load_kg; +}; + +struct CarBodyAssemState { + double roof_to_sidewall_weld_length_mm; + double sidewall_to_underframe_weld_length_mm; + int fsw_defects_detected; + double longitudinal_deflection_under_compression_mm; + double crash_energy_absorbed_kJ; + bool anti_climber_engaged; +}; + +struct CarBodyAssemPerformance { + double longitudinal_compression_test_deflection_mm; + double max_deflection_allowable_mm; + bool static_test_passed; + double fsw_weld_strength_pct_of_parent; + bool crash_energy_absorption_verified; + double total_assembly_time_h; + bool en_12663_compliant; +}; + +CarBodySpec design_car_body( + double car_length_mm, double car_width_mm, + CarBodyMaterial material, CrashCategory crash_cat, EN12663_Category struct_cat); + +CarBodyAssemState initialize_car_body_state(const CarBodySpec& spec); + +CarBodyAssemPerformance simulate_car_body_assembly( + const CarBodySpec& spec, CarBodyAssemState& state, double ambient_temp_C); + +double calculate_fsw_weld_strength( + double parent_strength_MPa, double tool_rpm, + double traverse_speed_mm_per_min, CarBodyMaterial material); + +double calculate_buckling_load( + double E_GPa, double I_mm4, double effective_length_mm, double K_factor); + +double estimate_crush_energy_absorption( + double avg_crush_force_kN, double crush_distance_mm, int num_buckles); + +} // namespace vde::railway_metro +``` + + +### 2. Interior & Auxiliary Systems (P1) + +#### 2.1 Passenger Saloon, HVAC, and Auxiliary Power + +``` +Interior & auxiliary systems overview: + Rolling stock interiors must meet stringent fire safety (EN 45545-2), + ergonomic (EN 14752), and accessibility (PRM TSI) requirements while + maximizing passenger capacity, comfort, and operational reliability + over a 30–40 year service life. Auxiliary power supplies convert + traction supply to onboard LV power for lighting, HVAC, and control. + +Passenger saloon design: + Interior paneling materials: + Wall panels: aluminum honeycomb sandwich (0.8–1.5mm Al skins, 10–20mm core) + or GRP (glass-reinforced plastic) molded panels + Ceiling panels: aluminum/Alucobond composite, integrated LED lighting + Floor: plywood (18–25mm birch) on elastomer mounts + flooring (PVC/rubber) + Fire rating per EN 45545-2: HL2 (standard) or HL3 (high-risk) + + Interior panel attachment: + Bonded + riveted to body structure via adjustable brackets + Gap between panels: 3–5mm for thermal expansion + Tolerance: ±2mm over 20m car length + + Seating design (EN 14752): + Seat pitch (longitudinal spacing): + Metro: 430–480 mm (transverse), 1,500–1,700 mm (longitudinal bench) + Regional: 750–900 mm (2+2 transverse) + High-speed: 900–1,050 mm (2+2 or 2+1) + First class: 1,100–1,300 mm (2+1) + + Seat width: 430–480 mm (standard), 500+ mm (first class) + Aisle width: >450mm (metro), >550mm (regional/HS) + Seat back angle: 15–25° from vertical + Cushion: cold-molded polyurethane foam, 80–150 mm thickness + Upholstery: wool moquette (fire-rated) or synthetic leather + Structure: cantilever or frame-type, bolted to sidewall/floor + + Ergonomic parameters: + H-point (hip pivot): 400–480 mm above floor + Lumbar support: 30–50 mm protrusion at L3–L5 level + Headrest: top edge 800–900 mm above seat reference point + + Standing passenger density (EN 15663): + Normal load (AW2): 4 passengers/m² (standing, includes 70 kg/pax) + Crush load (AW3): 6 passengers/m² (standing) + Maximum (AW4): 8 passengers/m² (design limit only) + + Handrail and grab pole: + Material: stainless steel (EN 1.4301, φ32–42mm) or aluminum (φ35mm) + Arrangement: horizontal rails at 1,800–1,950mm height + Vertical poles: at door areas, cross-junction, every 1.5–2m along car + Load capacity: 100 kg/pole point load, 250 kg/m distributed + +Interior lighting: + LED lighting system: + Color temperature: 3,000K (warm white) or 4,000K (neutral white) + Illuminance: + Saloon floor: >150 lux (general), >300 lux (reading, at 850mm) + Door area: >250 lux (at floor) + Driver cab: >50 lux (dimmable, instruments), >200 lux (desk) + CRI (Color Rendering Index): Ra > 80 + Uniformity: E_min/E_avg > 0.4 (floor), >0.7 (at seating level) + + Emergency lighting: + Battery-backed, 1.5h autonomy (EN 13272) + Illuminance: >5 lux at floor along escape path + + Dimming control: + PWM dimmable (0–100%), photocell + occupancy integration + Circadian rhythm: adjustable color temperature (2,700–6,500K) + +HVAC system: + System architecture: + Roof-mounted packaged unit (1–2 per car, metro: 1 unit/car, HS: 2 units/car) + Rooftop condenser + underframe compressor in split systems + Refrigerant: R407C (retrofit) or R513A (low GWP < 631) + Capacity: 30–45 kW cooling per car (metro), 40–60 kW (high-speed) + Heating: 25–35 kW per car (heat pump or electric resistance) + + Fresh air supply: + 10–20 m³/h per passenger (enclosed space) + CO₂ demand-controlled ventilation (DCV): + CO₂ setpoint: 1,000 ppm (comfort), 1,500 ppm (alarm) + Outdoor air damper modulation: 0–100% + Filtration: G4 (coarse) + F7 (fine) per EN 779, or ePM1 > 60% per ISO 16890 + + Air distribution: + Supply: linear slot diffusers in ceiling or window sill + Return: under-seat or sidewall grilles + Velocity at passenger zone: <0.3 m/s (comfort) + + Temperature control: + Setpoint: 22–26°C summer, 19–22°C winter (adjustable ±2K) + Gradient: <3K vertical between head and ankle + Uniformity: <2K horizontal across saloon + PID control: Kp=2.0, Ki=0.5, Kd=0.1 (per unit thermal inertia) + + Heat load calculation: + Q_total = Q_solar + Q_transmission + Q_ventilation + Q_passenger + Q_equipment + Q_solar = Σ (A_window × G × SHGC) [W] + A_window = glazed area [m²] + G = solar irradiance (800 W/m² peak) + SHGC = solar heat gain coefficient (0.3–0.5 for double glazed) + Q_transmission = Σ (U × A × ΔT) [W] + U = overall heat transfer coefficient (body: 1.5–3.0 W/m²K) + Q_passenger = n_pax × 115 W/pax (sensible + latent, seated) + Q_ventilation = ṁ × c_p × ΔT = ρ × V_dot × c_p × (T_out − T_in) [W] + + Noise limits: + Saloon: <65 dB(A) at full cooling (EN 14750-1) + Standstill (night): <45 dB(A) + Driver cab: <70 dB(A) + +Auxiliary power supply: + Static converter (DC/DC or DC/AC): + Input voltage: + DC 750V / 1,500V (third rail or OCS for metro) + DC 3kV or AC 25kV/50Hz via transformer (mainline) + Output: + 3-phase AC 400V/50Hz for HVAC compressors, air compressor + 1-phase AC 230V/50Hz for socket outlets + DC 110V (battery charging + control circuits) + DC 24V (low-power electronics, lighting) + + Battery: + Type: NiCd (traditional) or LiFePO₄ (modern, lower weight) + Capacity: 120–200 Ah at 110V (sufficient for 90 min emergency) + Charger: IGBT rectifier, constant voltage / constant current + + Converter efficiency: >92% at rated load (IGBT topology) + Redundancy: N+1 per train formation (6-car: typically 2–3 converters) + +Passenger information system (PIS): + Displays: LED/LCD (TFT), 21–29 inch saloon, 15 inch vestibule + Announcements: automated (GPS-triggered) + manual, 90 dB SPL + Emergency intercom: passenger-to-driver, full-duplex VoIP + CCTV: IP cameras (2–4 per car), H.265, 30 fps, 90-day recording + +Toilet system (for regional / high-speed / intercity): + Vacuum toilet (EVAC / Semvac type): + Flush volume: 0.5–1.0 L per flush + Retention tank: 400–800 L per car + Vacuum pump: 0.3–0.5 bar vacuum + Water tank: 300–600 L fresh water + Accessible toilet (PRM TSI): min 1,300 × 1,500mm clear floor space +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class SeatArrangement { Transverse_2plus2, Transverse_2plus1, Transverse_3plus2, + Longitudinal_Bench, Mixed, Foldable }; +enum class InteriorMaterial { Al_Honeycomb_Panel, GRP_Molded, Alucobond_Composite, Stainless_Steel }; +enum class FloorType { Plywood_PVC, Plywood_Rubber, Aluminum_Profiled }; +enum class RefrigerantType { R407C, R513A, R134a, R744_CO2 }; +enum class HVAC_Architecture { Rooftop_Packaged, Split_Underframe, Integrated_Underfloor }; +enum class Aux_Power_Topology { IGBT_Static_Converter, SiC_NextGen, Rotary_Converter }; +enum class BatteryType { NiCd, LiFePO4, LeadAcid_VRLA }; +enum class LightingZone { Saloon_General, Door_Vestibule, Reading, DriverCab, Emergency }; +enum class PIS_DisplayType { LED_Monochrome, LCD_TFT, OLED }; + +struct InteriorPanelSpec { + InteriorMaterial material; + double skin_thickness_mm; + double core_thickness_mm; + double total_panel_weight_kg_per_m2; + int fire_rating_hl; // HL1/HL2/HL3 per EN 45545-2 + double thermal_expansion_gap_mm; +}; + +struct SeatSpec { + SeatArrangement arrangement; + int seats_per_row; + double seat_pitch_mm; + double seat_width_mm; + double seat_back_angle_deg; + double cushion_thickness_mm; + double h_point_height_mm; + double aisle_width_mm; + bool has_headrest; + bool has_armrest; +}; + +struct SeatingLayoutSpec { + double car_interior_length_mm; + double car_interior_width_mm; + int num_doors_per_side; + std::vector seat_types; + int target_seated_capacity; + std::string passenger_class; // "economy", "first", "business" +}; + +struct HVACDesignInput { + double car_length_m; + double car_width_m; + double car_height_m; + double window_area_m2; + double body_u_value_W_per_m2K; + double window_shgc; + int max_passenger_capacity; + double outdoor_temp_summer_C; + double outdoor_temp_winter_C; + double indoor_temp_summer_C; + double indoor_temp_winter_C; + RefrigerantType refrigerant; + HVAC_Architecture architecture; +}; + +struct HVACDesignOutput { + double cooling_capacity_kW; + double heating_capacity_kW; + double fresh_air_flow_rate_m3_per_h; + double recirculation_ratio; + int num_units; + double compressor_power_kW; + double condenser_fan_power_kW; + double eer; // Energy Efficiency Ratio (cooling) + double cop; // Coefficient of Performance (heating) + double total_weight_kg; + double noise_level_dBA; +}; + +struct AuxPowerSpec { + Aux_Power_Topology topology; + double input_voltage_V; + std::string input_type; // "DC750", "DC1500", "AC25kV" + double output_power_3ph_kVA; + double output_power_1ph_kVA; + double dc_110V_power_kW; + double dc_24V_power_kW; + BatteryType battery_type; + double battery_capacity_Ah; + double battery_voltage_V; + double efficiency_pct; +}; + +struct LightingSpec { + LightingZone zone; + double target_illuminance_lux; + double color_temperature_K; + double cri; + double power_density_W_per_m2; + double uniformity_ratio; + bool dimmable; + bool emergency_backup; + double emergency_autonomy_h; +}; + +struct InteriorState { + double saloon_temperature_C; + double co2_concentration_ppm; + double illuminance_measured_lux; + double sound_pressure_level_dBA; + int passenger_count; + double standing_density_pax_per_m2; + double hvac_power_consumption_kW; + double battery_soc_pct; // State of Charge +}; + +struct InteriorPerformance { + double achieved_cooling_at_design_day_kW; + double temperature_deviation_from_setpoint_K; + double co2_exceedance_minutes; + double lighting_uniformity; + bool en14752_ergonomics_pass; + bool en45545_fire_pass; + double total_aux_power_kW; + double battery_autonomy_min; +}; + +InteriorPanelSpec design_interior_panel( + InteriorMaterial material, int fire_rating_hl, double panel_length_mm, double panel_width_mm); + +SeatingLayoutSpec design_seating_layout( + SeatArrangement arr, double car_length_m, double car_width_m, double door_width_m, int num_doors); + +HVACDesignOutput design_hvac_system(const HVACDesignInput& input); + +void simulate_hvac_cycle(HVACDesignOutput& hvac, InteriorState& state, InteriorPerformance& perf, double outdoor_temp_C, double solar_irradiance_W_per_m2, int passenger_count, double time_step_s); + +AuxPowerSpec design_aux_power_supply( + std::string input_type, double hvac_power_kW, double lighting_power_kW, + double control_power_kW, BatteryType battery, double emergency_duration_h); + +LightingSpec design_lighting_zone(LightingZone zone, bool dimmable, bool emergency); + +double calculate_heat_load(const HVACDesignInput& input, InteriorState& state); + +double estimate_co2_concentration(double outdoor_co2_ppm, int passenger_count, double fresh_air_m3_per_h_per_pax, double volume_m3, double time_min); + +double estimate_standing_capacity(double floor_area_m2, double stand_density_pax_per_m2, double seat_footprint_m2); + +} // namespace vde::railway_metro +``` + + +### 3. Door & Gangway Systems (P1) + +#### 3.1 Plug/Sliding Plug Doors, Door Control, and Gangway Bellows + +``` +Door & gangway systems overview: + Passenger doors are safety-critical systems that must provide reliable + operation (>1M cycles between failures), tight pressure sealing for + high-speed and tunnel operation, and obstacle detection per EN 14752. + Gangway systems (inter-car connections) provide weatherproof, fire-rated + passage between vehicles with full articulation range. + +Door system types: + External passenger doors: + Sliding plug door: + Motion: door leaf moves outward then slides along car body exterior + Advantages: flush exterior (aerodynamic + aesthetic), pressure seal + Application: high-speed trains, modern metro/regional EMU + Leaf width: 700–1,000 mm (single leaf), 1,300–1,900 mm (double leaf) + Clear opening height: 1,850–2,050 mm + + Bi-parting sliding door (pocket type): + Motion: leaves slide into body sidewall pockets + Application: traditional metro, tram + Advantage: no external protrusion + Disadvantage: poor pressure seal, pocket takes interior space + + Swing plug door: + Motion: door swings out then plugs into frame + Application: driver cab access, inter-car end doors + + Door leaf construction: + Material: aluminum frame + aluminum/GRP skin (1.5–2.5mm) + Core: aluminum honeycomb or rigid PU foam (for thermal/acoustic) + Window: double-glazed safety glass (EN 12150), heated option + Edge seal: EPDM rubber, electrically conductive (for sensitive edge) + Weight: 35–60 kg per leaf (typical metro door leaf) + + Guiding mechanism: + Top guide rail: aluminum profile, roller guides at top corners + Bottom guide pin: engages sill track groove (anti-jump protection) + Driving: toothed belt or ball screw from rotary motor + Motor type: 3-phase BLDC (brushless DC), 50–150W rated + + Locking system: + Electrical locking: solenoid-actuated lock bolt + Mechanical redundancy: secondary lock (gravity or spring-loaded) + Door closed and locked (DCL) detection: + Limit switch: confirms door fully closed within 3mm + Lock switch: confirms lock bolt fully engaged + + Obstacle detection: + Sensitive edge (pressure-sensitive): + Conductive rubber strip in door edge rubber + Activation force: <150 N (EN 14752, peak force <300 N) + Obstacle size: 30mm wide × 60mm high (detection target) + Motor current monitoring (backup): + Overcurrent threshold: 150% rated current → obstruction + + Recycle behavior: + On detection: door reverses to fully open, pauses 2–3s, re-closes + Max recycle cycles: 3–5 consecutive (then stays open, alarm) + Closing speed: 150–300 mm/s + Opening speed: 200–400 mm/s + Acceleration: 0.5–1.5 m/s² + + Door control system (DCU - Door Control Unit): + Microprocessor per door leaf + CAN bus to train control (MVB/WTB on modern trains) + Functions: + - Open/close command execution (local + train control) + - Obstacle detection and recycle logic + - DCL status reporting + - Zero-speed interlock (<3 km/h for door release) + - Traction interlock (all doors DCL = traction enable) + Diagnostics: cycle counter, motor current trend, event log + + Emergency egress: + Internal emergency handle: mechanical cable override of latch + External emergency access: key-operated (staff only) + Egress window: 1,500 cm² minimum clear opening per door + EN 14752 / TSI PRM: 450mm minimum clear width for wheelchair + +Pressure sealing for high-speed: + Inflatable door seal (for trains >200 km/h): + Pneumatic tube in door edge seal, inflated to 0.5–1.0 bar + Activated at speed > threshold (typically 5 km/h) + Seals against door frame to prevent pressure waves in tunnels + Pressure pulse tolerance: + +/− 4,000 Pa (tunnel crossing), +/− 1,500 Pa (train passing) + Leakage: <0.05 m² equivalent orifice per door at 1,000 Pa + +Door performance requirements: + Open/close time: <3.0 s per leaf + Reliability: MCBF (Mean Cycles Between Failures) > 1,000,000 + Door availability: >99.99% per door per year + Noise: <68 dB(A) at 1m during operation + +Gangway (inter-car connection) systems: + Gangway types: + Corrugated rubber bellows (standard for metro/regional): + Material: EPDM/CR (chloroprene), 2–4 convolutions + Thickness: 2.5–4.0 mm + Fire rating: HL2/HL3 per EN 45545-2 + Noise isolation: >20 dB (weighted) + + U-shaped rubber gangway with internal frame (articulated): + Allows relative rotation ±15° yaw, ±10° roll between cars + Articulation: bridge plate + centering device + Weatherproof canopy on roof + + Wide body gangway (full-width, for articulated trains): + Internal diameter: 1,100–1,500 mm + Continuous passage: no step or gap >20mm + Tear resistance: >50 N/mm + + Gangway mounting: + Car end interface: frame bolted to body end wall + Weather seal: neoprene gasket to body structure + Drainage: weep holes in lower convolution + + Gangway articulation range: + Yaw (curve negotiation): ±15° (minimum curve radius 150m → 11.5°) + Roll (track twist): ±5° + Pitch (vertical curve): ±3° + Longitudinal stroke: ±50mm (buff/draft relative motion) + + Pressure-tight gangway (high-speed): + Sealed bellows with pressure bulkhead + Test pressure: ±6,000 Pa + Leakage: <0.1 m² equivalent at 1,000 Pa + +Inter-car electrical connections: + Jumper cables: + Power jumpers: 400VAC + DC control + Data jumpers: MVB/ETB (Ethernet Train Bus) + Pneumatic: brake pipe (DN25) + main reservoir (DN25) + Coupling: Scharfenberg or tightlock automatic couplers +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class DoorType { SlidingPlug_BiParting, SlidingPlug_Single, PocketSliding_BiParting, + SwingPlug, Cab_Access }; +enum class DoorDriveType { BLDC_BeltDrive, BLDC_BallScrew, Pneumatic, LinearMotor }; +enum class DoorLockType { Solenoid, MotorHolding, Mechanical_Deadbolt }; +enum class GangwayType { Corrugated_Bellows, Articulated_Frame, WideBody_Continuous, PressureTight_HS }; +enum class GangwayMaterial { EPDM, CR_Chloroprene, Silicone, FabricReinforced_PTFE }; + +struct DoorLeafSpec { + DoorType type; + double leaf_width_mm; + double leaf_height_mm; + double clear_opening_width_mm; + double clear_opening_height_mm; + double leaf_weight_kg; + std::string leaf_material; + double window_width_mm; + double window_height_mm; + bool heated_window; + double glass_u_value_W_per_m2K; +}; + +struct DoorDriveSpec { + DoorDriveType drive_type; + double motor_power_W; + double closing_force_N; + double opening_force_N; + double closing_speed_mm_per_s; + double opening_speed_mm_per_s; + double max_acceleration_m_per_s2; + double holding_force_closed_N; +}; + +struct DoorLockSpec { + DoorLockType lock_type; + double lock_bolt_engagement_mm; + double lock_bolt_diameter_mm; + double holding_force_kN; + bool secondary_lock; + double dcl_switch_tolerance_mm; +}; + +struct DoorObstacleDetection { + double sensitive_edge_activation_force_N; + double peak_force_limit_N; + double motor_current_threshold_pct; + int max_recycle_attempts; + double recycle_pause_duration_s; + double min_obstacle_size_mm; // 30×60mm per EN 14752 +}; + +struct DoorControlSpec { + double zero_speed_threshold_kmh; + bool traction_interlock; + bool local_door_control; + std::string bus_protocol; // "CAN", "MVB", "WTB" + int cycle_counter_limit; + bool remote_diagnostics; +}; + +struct DoorSealingSpec { + bool inflatable_seal; + double inflate_pressure_bar; + double seal_activation_speed_kmh; + double pressure_pulse_tolerance_Pa; + double equivalent_leakage_area_m2; // at 1,000 Pa +}; + +struct DoorSystemSpec { + std::string door_id; + DoorLeafSpec leaf; + DoorDriveSpec drive; + DoorLockSpec lock; + DoorObstacleDetection obstacle; + DoorControlSpec control; + DoorSealingSpec sealing; + int door_position_in_car; // 1=front, 2=center, etc. +}; + +struct GangwaySpec { + GangwayType type; + GangwayMaterial material; + double internal_diameter_mm; + double wall_thickness_mm; + int num_convolutions; + double yaw_range_deg; + double roll_range_deg; + double pitch_range_deg; + double longitudinal_stroke_mm; + double fire_rating_hl; + double sound_insulation_dB; + bool pressure_tight; + double pressure_test_limit_Pa; +}; + +struct DoorState { + bool door_closed; + bool door_locked; + bool door_isolated; // manually isolated for maintenance + bool obstacle_detected; + int current_recycle_count; + double motor_current_A; + int total_operation_cycles; + bool emergency_egress_activated; + bool traction_interlock_satisfied; +}; + +struct DoorPerformance { + double open_time_s; + double close_time_s; + double peak_closing_force_N; + double obstacle_detection_delay_ms; + double pressure_leakage_at_1000Pa_m3_per_s; + int mcbf_cycles; // Mean Cycles Between Failures + double noise_operating_dBA; + bool en14752_compliant; +}; + +DoorSystemSpec design_sliding_plug_door( + double clear_width_mm, double clear_height_mm, DoorDriveType drive, DoorLockType lock, bool inflatable_seal); + +DoorSystemSpec design_pocket_sliding_door( + double clear_width_mm, double clear_height_mm, DoorDriveType drive, bool obstacle_detection); + +DoorState initialize_door_state(); + +DoorPerformance simulate_door_operation( + const DoorSystemSpec& spec, DoorState& state, int target_cycles, bool obstacle_scenario); + +GangwaySpec design_gangway( + GangwayType type, GangwayMaterial material, double car_body_width_mm, double car_body_height_mm, double min_curve_radius_m, bool pressure_tight); + +double calculate_closing_force( + double leaf_mass_kg, double friction_coefficient, double incline_deg, double acceleration_m_per_s2); + +double calculate_door_cycle_time( + double stroke_mm, double acceleration_m_per_s2, double max_speed_mm_per_s, double jerk_m_per_s3); + +bool check_door_pressure_integrity( + const DoorSystemSpec& specs, double external_pressure_Pa, double allowable_leakage_m3_per_s); + +double estimate_gangway_yaw_angle(double vehicle_length_m, double curve_radius_m); + +} // namespace vde::railway_metro +``` + + +### 4. Bogie Frame & Suspension (P1) + +#### 4.1 Bogie Frame, Primary/Secondary Suspension, and Dampers + +``` +Bogie frame & suspension overview: + The bogie is the critical interface between vehicle body and track, + providing load transfer, guidance, stability, and ride comfort. Modern + bogies use welded box-section frames with primary axle-box guidance + and secondary air spring suspension. The suspension system must isolate + track irregularities while maintaining curving performance, hunting + stability, and derailment safety. + +Bogie frame design: + Frame type: + Welded box section (fabricated bogie): + Material: S355J2+N (EN 10025) or S500Q (higher strength) + Plate thickness: 8–16 mm (side frames), 10–20 mm (bolster/transom) + Post-weld heat treatment (stress relief): + Temperature: 580–620°C, hold 2h per 25mm thickness + Cooling: furnace cool to 300°C, then air cool + Cast steel frame: + Material: G20Mn5 (EN 10213), single-piece casting + Advantage: fewer welds, better fatigue resistance + Disadvantage: higher weight, pattern cost + + Bogie types: + Powered bogie (motor bogie): + Traction motor mounted (nose-suspended or fully suspended) + Gearbox: parallel cardan shaft or right-angle helical + Axle weight: 15–18 tonnes (metro), 16–20 tonnes (mainline) + Trailer bogie (non-powered): + No traction motor, lighter weight + May include eddy current brake (for high-speed) + Axle weight: 10–14 tonnes + + Frame FEA design criteria (EN 13749): + Static loads: + Vertical: P_z = (M_v × g) / (2 × N_bogies × N_axles) × K_dyn + K_dyn = dynamic factor (1.4 for primary, 1.2 for secondary) + Lateral: Y = 0.5 × (P_z + 0.5 × M_a × g) + Longitudinal: X = 0.3 × axle load (traction/braking) + Fatigue (endurance limit): + Haigh diagram: σ_a + σ_m × (σ_w / R_m) < σ_w / S + Safety factor > 1.5 (normal), > 1.65 (exceptional) + Weld classification FAT per IIW (e.g., FAT71, FAT90) + + Bogie frame geometry: + Wheelbase: 2,200–2,700 mm (metro/powered), 2,500–3,000 mm (mainline) + Frame width: 2,000–2,800 mm (depending on gauge) + Bolster height: 400–600 mm above rail level + Side frame depth: 150–250 mm + Transom cross-section: 200–300mm × 200–300mm box + +Primary suspension: + Axle box guidance: + Coil spring (cylindrical steel): + Material: Cr-Si or Cr-V spring steel (EN 10089, 51CrV4) + Wire diameter: 20–35 mm + Coil diameter: 100–160 mm + Number of active coils: 5–8 + Spring rate: k = G × d⁴ / (8 × D³ × n_a) [N/mm] + G = 81,400 N/mm² (shear modulus for steel) + d = wire diameter [mm], D = mean coil diameter [mm], n_a = active coils + Static deflection: δ_static = F / k (typically 20–40 mm) + Natural frequency: ω_n = sqrt(k/m) (typically 1.5–3.0 Hz) + + Rubber chevron spring (Metacone / Clouth type): + Laminated rubber-metal sandwich in V-shape (chevron angle 60–80°) + Advantages: self-guiding, no separate axle box guide + Stiffness ratio (longitudinal/lateral/vertical): typically 1:2:5 + Dynamic stiffening: K_dyn/K_static ≈ 1.2–1.5 (at 10 Hz) + + Axle box bearing interface: + Axle box housing: spheroidal graphite cast iron (EN-GJS-400-15) + Bearing: double-row tapered roller TBU (sealed, grease lubricated) + Bearing inner diameter: 110–150 mm (metro), 130–180 mm (mainline) + +Secondary suspension: + Air spring system: + Bellows type: + Convoluted bellows: + Nominal diameter: φ500–φ700 mm + Number of convolutions: 1 or 2 + Operating height: 200–300 mm + Vertical stiffness: k_z_air = n × (p_abs × A_eff² / V + p_eff × dA_eff/dz) [N/mm] + n = polytropic index (1.0 isothermal, 1.4 adiabatic) + p_abs = absolute air pressure [bar] + A_eff = effective area [mm²] + V = air spring volume + auxiliary reservoir volume [mm³] + + Rolling lobe bellows: + Bellows rolls over a piston as height changes + Lower vertical stiffness than convoluted + Nominal diameter: φ350–φ550 mm + Piston shape determines stiffness characteristic + Stiffness profile: + k_z = (n × p_abs × A_eff² / V) + (p_eff × π × D_piston / dh/dz) + + Auxiliary reservoir: + Volume: 50–100 L (per air spring) + Connected by orifice (φ10–15 mm) to bellows + Damping effect: air flow resistance through orifice + Pneumatic natural frequency: 0.8–1.5 Hz + + Levelling valve: + 3-position: charge / neutral / exhaust + Dead band: ±3–5 mm from nominal height + Delay: 2–5 seconds (prevents hunting on curves) + Response time: charge/exhaust rate 0.5–1.0 L/s at 10 bar + + Emergency spring (rubber): + Inside bellows, provides residual suspension at zero pressure + Vertical stiffness: 500–1,500 N/mm + Residual ride height: 15–25 mm (below emergency stop threshold) + + Anti-roll bar (torsion bar): + Controls body roll on curves and crosswind + Torsion bar: + Material: spring steel (51CrV4) + Diameter: φ30–50 mm + Effective length: 500–800 mm (between end lever arms) + Torsional stiffness: k_θ = G × J / L_lever [N·m/rad] + J = π × d⁴ / 32 (polar moment of inertia) + Roll stiffness contribution: k_roll_arb = k_θ × (L_lever / b_track)² + End linkage: rubber-bushed drop links (vertical rods) + Anti-roll bar rating: typically provides 20–40% of total roll stiffness + +Dampers: + Yaw damper (for high-speed stability): + Type: hydraulic telescopic, monotube or twin-tube + Damping force: F = c × v^α (typically 1–3 kN at 0.1 m/s) + c = damping coefficient [N·s/m] + α = velocity exponent (0.3 = digressive, 1.0 = linear, 1.5 = progressive) + Mounting: between bogie frame and car body, horizontal/longitudinal + Stroke: ±100–150 mm + Relief (blow-off) valve: limits force at high velocity + + Vertical damper (secondary): + Type: hydraulic telescopic, between bogie and body + Damping ratio: ζ = c / (2 × sqrt(k × m)) = 0.15–0.35 (ride comfort) + Stroke: ±50–80 mm + Tilt resistance: anti-roll + damper combination + + Primary vertical damper (optional, for high-speed): + Between axle box and bogie frame + Reduces unsprung mass vibration transmission + Damping ratio: ζ = 0.2–0.3 + +Traction center pivot / linkage: + Bogie-body connection: + Traction rod (Z-link or Watts link): + Transmits traction/braking forces from bogie to body + Low longitudinal stiffness (elastic bushing): 5–15 kN/mm + Vertical pivot: allows bogie rotation (yaw) and roll + Center pivot (king pin): + Traditional design, transmits lateral and longitudinal forces + Spherical bearing with PTFE liner (maintenance-free) + Lateral clearance: ±30–50 mm (curve negotiation) + Bolsterless design (modern): + No bolster beam, air springs mount directly to bogie frame + Traction rod + anti-roll bar form articulation linkage + Lower mass, fewer wear components + +Bogie hunting stability: + Hunting: self-excited lateral oscillation at high speed + Klingel formula (rigid wheelset): + λ = wavelength = 2π × sqrt(b × r_0 / γ_eq) [m] + b = half gauge (~0.75m for standard gauge) + r_0 = nominal wheel radius [m] + γ_eq = equivalent conicity + + Critical (hunting) speed: + V_crit = λ × f_n [m/s] + f_n = natural yaw frequency of wheelset + Must satisfy: V_crit > V_max × 1.2 (safety margin) + + Yaw damper effect: increases effective yaw stiffness, raises V_crit + Without yaw damper: V_crit ≈ 160–200 km/h + With yaw damper (1 per side): V_crit > 350 km/h + + Bogie rotational resistance (friction yaw damping): + Side bearer friction pads: PTFE or polymeric, µ = 0.05–0.12 + Yaw torque: T_yaw = µ × F_z × r_side_bearer + +Derailment safety criteria (EN 14363 / UIC 518): + Nadal criterion (flange climb): + Y/Q < tan(δ_f − μ) / (1 + tan(δ_f) × μ) + Y = lateral force, Q = vertical wheel force + δ_f = flange angle (60–70°) + μ = friction coefficient at wheel/rail contact (typically 0.36) + + Prud'homme limit (track lateral force): + ΣY < 0.85 × (10 + 2Q/3) [kN] (track panel shift) + Max single wheel Y < Prud'homme limit + + Wheel unloading: + ΔQ/Q_0 < 0.6 (for V ≤ 160 km/h), < 0.65 (for V > 160 km/h) + Q_0 = static wheel load + +Track twist (warp) test: + Twist: g = 7‰ (2m base) standard, g = 10‰ (3m base) for bad track + Wheel unloading due to twist: + ΔQ = k_eq × g × b_wheelbase / (2 × gauge) + k_eq = equivalent vertical stiffness at wheel +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class BogieType { Powered_Motor, Trailer_NonPowered, Jacobs_Shared, Articulated }; +enum class FrameMaterial { S355J2_Welded, S500Q_Welded, G20Mn5_Cast, S355K2_ColdFormed }; +enum class PrimarySpringType { SteelCoil, RubberChevron, ConicalRubber, SteelLeaf }; +enum class SecondarySpringType { Air_Convoluted, Air_RollingLobe, SteelCoil_Conventional }; +enum class DamperType { Hydraulic_Telescopic, Monotube_HP, TwinTube_LP }; +enum class DamperCharacteristic { Linear, Digressive, Progressive }; +enum class BogieBodyInterface { CenterPivot_KingPin, TractionRod_ZLink, Bolsterless_AirSpring, BolsterBeam }; +enum class DerailmentCriterion { Nadal_YQ, Prudhomme_SigmaY, WheelUnloading, TrackTwist }; + +struct BogieFrameSpec { + BogieType bogie_type; + FrameMaterial frame_material; + double wheelbase_mm; + double frame_width_mm; + double side_frame_depth_mm; + double transom_cross_section_mm2; + double plate_thickness_side_frame_mm; + double plate_thickness_transom_mm; + bool post_weld_stress_relieved; + double frame_mass_kg; +}; + +struct PrimarySuspensionSpec { + PrimarySpringType spring_type; + double vertical_stiffness_N_per_mm; + double lateral_stiffness_N_per_mm; + double longitudinal_stiffness_N_per_mm; + double static_deflection_mm; + std::string spring_material; // "51CrV4" for coil + double chevron_angle_deg; // for rubber chevron + double dynamic_stiffening_ratio; // Kdyn/Kstatic +}; + +struct SecondarySuspensionSpec { + SecondarySpringType spring_type; + double bellows_diameter_mm; + int num_convolutions; + double operating_height_mm; + double vertical_stiffness_N_per_mm; + double lateral_stiffness_N_per_mm; + double auxiliary_reservoir_volume_L; + double levelling_valve_deadband_mm; + double levelling_valve_delay_s; + double emergency_spring_stiffness_N_per_mm; + double emergency_residual_height_mm; +}; + +struct AntiRollBarSpec { + bool active; + double torsion_bar_diameter_mm; + double effective_length_mm; + double lever_arm_length_mm; + double torsional_stiffness_Nm_per_rad; + double roll_stiffness_contribution_pct; + std::string material; +}; + +struct DamperSpec { + DamperType type; + DamperCharacteristic characteristic; + double damping_coefficient_Ns_per_m; // linearized + double velocity_exponent; // α for F = c × v^α + double stroke_mm; + double max_damping_force_N; + double blow_off_velocity_m_per_s; + DamperType mount_orientation; // "horizontal_longitudinal", "vertical" + double damping_ratio; // ζ nominal +}; + +struct TractionLinkageSpec { + BogieBodyInterface interface_type; + double longitudinal_stiffness_kN_per_mm; + double lateral_clearance_mm; + double center_pivot_diameter_mm; + std::string bearing_material; // "PTFE_liner", "spherical_steel" + double side_bearer_friction_coefficient; +}; + +struct BogieSpec { + std::string bogie_id; + BogieType type; + BogieFrameSpec frame; + PrimarySuspensionSpec primary; + SecondarySuspensionSpec secondary; + AntiRollBarSpec anti_roll_bar; + DamperSpec yaw_damper; + DamperSpec vertical_damper_secondary; + DamperSpec vertical_damper_primary; + TractionLinkageSpec linkage; + double axle_load_tonnes; + double bogie_total_mass_kg; + double design_max_speed_kmh; +}; + +struct BogieState { + double lateral_displacement_mm; + double yaw_angle_deg; + double roll_angle_deg; + double vertical_deflection_primary_mm; + double vertical_deflection_secondary_mm; + double air_spring_pressure_bar; + double levelling_valve_position; // -1=exhaust, 0=neutral, 1=charge + double yaw_damper_velocity_m_per_s; + bool hunting_detected; + double wheel_unloading_pct; +}; + +struct BogiePerformance { + double hunting_critical_speed_kmh; + double ride_comfort_index_Nmv; // per EN 12299 + double derailment_yq_ratio_max; + double wheel_unloading_max_pct; + double frame_fatigue_life_cycles; + double frame_max_stress_MPa; + double secondary_vertical_frequency_Hz; + double secondary_lateral_frequency_Hz; + bool en13749_static_pass; + bool en13749_fatigue_pass; + bool en14363_derailment_pass; +}; + +BogieFrameSpec design_bogie_frame( + BogieType type, double wheelbase_mm, double axle_load_tonnes, FrameMaterial material); + +PrimarySuspensionSpec design_primary_suspension( + PrimarySpringType type, double static_wheel_load_kN, double target_deflection_mm); + +SecondarySuspensionSpec design_secondary_suspension( + SecondarySpringType type, double body_mass_per_bogie_kg, double target_frequency_Hz); + +BogieSpec design_bogie( + BogieType type, double max_speed_kmh, double axle_load_tonnes, double wheelbase_mm, bool has_yaw_damper); + +BogieState initialize_bogie_state(const BogieSpec& spec); + +BogiePerformance simulate_bogie_dynamics( + const BogieSpec& spec, BogieState& state, double track_curve_radius_m, double speed_kmh, double track_irregularity_level); + +DamperSpec design_damper( + DamperType type, DamperCharacteristic characteristic, double body_mass_kg, double target_damping_ratio, double stroke_mm); + +AntiRollBarSpec design_anti_roll_bar( + double car_body_roll_stiffness_target_Nm_per_rad, double air_spring_lateral_spacing_mm, double bar_material_shear_modulus_GPa); + +double calculate_hunting_critical_speed( + double wheel_radius_m, double equivalent_conicity, double wheelset_yaw_stiffness_N_per_m, double half_gauge_m, double axle_load_kg); + +double calculate_nadal_yq_ratio( + double lateral_force_kN, double vertical_force_kN, double flange_angle_deg, double friction_coefficient); + +double calculate_spring_natural_frequency(double stiffness_N_per_mm, double sprung_mass_kg); + +double estimate_wheel_unloading_twist( + double track_twist_per_mille, double wheelbase_mm, double gauge_mm, double equivalent_stiffness_N_per_mm); + +} // namespace vde::railway_metro +``` + + +### 5. Wheelset & Bearing (P1) + +#### 5.1 Wheel Profile, Axle Design, and Rolling Bearings + +``` +Wheelset & bearing overview: + The wheelset is the rotating assembly that transfers vehicle weight to + the rail, provides guidance via wheel/rail contact geometry, and transmits + traction and braking forces. It comprises a monobloc forged wheel, hollow + or solid axle, and double-row tapered roller bearing TBU cartridges. + Wheelsets are safety-critical components per EN 13260/13261/13262. + +Wheel design: + Material: + ER7 (standard): R_m 820–940 MPa, HB 245–285 (EN 13262) + ER8 (high-performance): R_m 860–980 MPa, HB 260–300 + ER9 (premium/high-speed): R_m 900–1,050 MPa, HB 280–320 + Micro-alloyed steel, vacuum degassed, inclusion-controlled + Fracture toughness: K_IC > 80 MPa·√m (rim) + + Manufacturing: + Monobloc forging: ingot → upset → forge → roll → heat treat + Rim quenching: water spray on tread (creates compressive residual stress) + Rim compressive stress: −200 to −300 MPa (at tread surface, beneficial for fatigue) + Ultrasonic testing: B-scan C-scan for internal defects < 1.0mm FBH + + Wheel geometry (EN 13715 profiles): + Nominal rolling circle diameter: φ730/760/840/920 mm (metro), φ890/920 mm (mainline) + + S1002 tread profile (European standard): + Tread inclination: 1:40 (at rolling circle, linear region) + Flange height Sh: 28 mm + Flange thickness Sd: 32.5 mm (at 10mm above tread) + Flange angle: 70° + Flange root radius: R12 mm + + XP55 tread profile (CRH380 high-speed): + Lower equivalent conicity (improved stability at very high speed) + Flange height: 27.5 mm + Flange thickness: 30 mm + + Wear limits (EN 15313): + Flange height max: 36 mm (new: 28mm) + Flange thickness min: 22 mm (new: 32.5mm) + Rim thickness min: 25–30 mm (new: 45–55mm) + Flat spot: < 60 mm length (safety) / < 30 mm (passenger comfort) + + Equivalent conicity (γ_eq): + Contact angle difference between left and right wheel: + tan γ_eq ≈ Δr / (2 × b × y) + Δr = rolling radius difference between left and right [mm] + b = half gauge (~750 mm for 1,435 mm) + y = lateral displacement of wheelset [mm] + + EN 15313 limits: γ_eq = 0.10–0.40 (depending on speed class) + Low γ_eq → better high-speed stability (but worse curving) + High γ_eq → better curving (but lower hunting speed) + + Wheel reprofiling (re-turning): + Underfloor wheel lathe: + Tread turning: 2–5 mm radial cut per reprofiling + Cutting depth: 2–4 mm per cycle + Frequency: every 200,000–400,000 km (metro), 400,000–600,000 km (mainline) + Wheel life cycles: 3–5 reprofilings before reaching scrap diameter + Scrap diameter: typically 90–95% of new (e.g., 840mm new → 760mm scrap) + Equivalent km cost: €0.05–0.15/km per wheelset + +Axle design (EN 13261): + Material: + EA1N (standard): R_m 550–650 MPa, normalized, carbon steel C35/C40 mod. + EA4T (premium/quenched-tempered): R_m 650–800 MPa, 25CrMo4 / 30CrNiMo8 + Hollow axle: reduces unsprung mass by 20–40% (for high-speed) + + Axle geometry: + Journal diameter (bearing seat): φ110–φ150 mm (metro), φ130–φ180 mm (mainline) + Wheel seat diameter: journal + 20–30 mm (press-fit interference) + Body diameter (between wheels): journal − 10–20 mm + Total length: 2,000–2,200 mm (standard gauge) + Bore diameter (hollow): 30–60 mm (for UT inspection probe + weight reduction) + + Fatigue design per EN 13103/13104: + Sections: cylindrical and transitions (notch factor) + Fatigue limit σ_w (rotating bending): + EA1N: σ_w ≈ 200 MPa (at 10^7 cycles, R=−1, probability 97.5%) + EA4T: σ_w ≈ 240 MPa + Safety factor: n = σ_w / σ_a > 1.5 (standard), > 2.0 (hollow/HS) + σ_a = 32 × M_b / (π × d³) (bending stress amplitude) + M_b = P × g × (L/4) [N·mm] (simplified, simply supported beam) + P = load per journal, L = journal center span + Goodman diagram for mean stress correction: + σ_w_eff = σ_w × (1 − σ_m / R_m) + + Press-fit: + Wheel-axle interference: 0.20–0.35 mm (diametral, for φ160mm seat) + Press force: 500–1,200 kN (depending on interference + diameter) + Stress concentration at wheel seat fillet: + k_t = 1.5–2.5 (geometric notch factor) + Fretting fatigue: micro-slip at press-fit edge, reduces fatigue limit + + Probability of fatigue failure: + P_f = Φ(−β), where β = (log(σ_w) − log(σ_eq)) / σ_log + Target: P_f < 10⁻⁶ per axle per year + +Axle box bearing (TBU - Tapered Bearing Unit): + Configuration: + Double-row tapered roller bearing in cartridge (sealed unit) + Bearing type: TBU 130 × 230 × 160 (typical metro, mm) + Preloaded: axial clearance 0.05–0.15 mm (controlled by spacer) + Grease lubrication: lithium complex base, NLGI 2 grade (e.g., Shell GadusRail S3) + + Bearing life calculation (ISO 281:2007, modified rating life): + L_10mh = a_1 × a_ISO × (C/P)^p × 10^6 / (60 × n_{avg}) + a_1 = reliability factor: 1.0 (90%), 0.62 (95%), 0.33 (99%) + a_ISO = life modification factor (lubrication, contamination, fatigue limit) + a_ISO = f(κ, η_c × P_u / P) + κ = viscosity ratio ν/ν_1 (actual / required for adequate film) + η_c = contamination factor (0.1–0.8) + P_u = fatigue load limit [kN] + C = dynamic load rating [kN] + P = equivalent dynamic bearing load [kN] + P = F_r + Y_1 × F_a (if F_a/F_r ≤ e) + P = 0.67 × F_r + Y_2 × F_a (if F_a/F_r > e) + p = 10/3 (roller bearings) + n_{avg} = average rotational speed [rpm] + + Required life: + L_10mh > 2.0–3.0 million km (metro), > 3.0–4.0 million km (mainline/HS) + + Bearing forces: + Radial load: F_r = (M_axle × g) / 2 [kN per bearing] + Axial load: F_a = (F_lateral + F_curve_centrifugal) [kN] + F_lateral: quasi-static lateral force (~0.2–0.4 × axle load in curve) + F_curve_centrifugal: depends on speed, curve radius, cant deficiency + + Bearing monitoring: + Temperature sensor: PT100 embedded in axle box housing + Alarm threshold: T_ambient + 40K (typical), T_ambient + 50K (emergency stop) + Vibration sensor (optional): accelerometer on bearing housing + Trending envelope spectrum for early fault detection (BPFO, BPFI) + Hot axle box detector (HABD): wayside IR sensors every 30–50 km + +Wheel-rail contact mechanics (Hertzian): + Contact ellipse: + Semi-axes a (longitudinal) and b (lateral) per Hertz theory: + a = m × [3 × Q × R_eq / (2 × E_eq)]^(1/3) [mm] + b = n × [3 × Q × R_eq / (2 × E_eq)]^(1/3) [mm] + m, n = Hertzian coefficients (function of A/B ratio) + Q = normal wheel load [N] + R_eq = equivalent radius of curvature [mm] + E_eq = 2 / ((1−ν_w²)/E_w + (1−ν_r²)/E_r) + + Typical contact pressure: + p_0 = 1.5 × Q / (π × a × b) [MPa] + Metro (17t axle): p_0 ≈ 800–1,100 MPa + High-speed (17t axle, larger wheel): p_0 ≈ 700–950 MPa + Shakedown limit: p_0 < 4 × k (k = shear yield strength ≈ σ_y/√3) + +Wheel wear: + Types: + Tread wear (hollow wear): uniform material removal, increases conicity + Flange wear: wear on flange face in curves, reduces flange thickness + Out-of-round (OOR): polygonization, eccentricity + + Wear rate per EN 15313 methodology: + Tread wear (tangential): w_tread = k_w × Tγ / H [mm³ per km] + Tγ = wear number = T_x×γ_x + T_y×γ_y (tractive energy dissipation) + k_w = wear coefficient (function of contact pressure regime) + H = material hardness [HB] + + Archard wear law (simplified): + V_wear = K × N × s / (3 × H) + K = wear coefficient (10⁻⁴–10⁻² range for steel-steel) + N = normal load, s = sliding distance +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class WheelMaterial { ER7, ER8, ER9, Special_Alloy }; +enum class TreadProfile { S1002, XP55, P8, GOST_Standard, Custom }; +enum class AxleMaterial { EA1N, EA4T, EA1N_Hollow, EA4T_Hollow }; +enum class BearingType { TBU_DoubleRow_TRB, CylindricalPlusBall, Spherical_RB }; +enum class WearMechanism { TreadHollow, FlangeWear, OOR_Polygonization, RollingContactFatigue }; + +struct WheelProfileSpec { + TreadProfile profile; + double nominal_rolling_diameter_mm; + double flange_height_mm; + double flange_thickness_mm; + double flange_angle_deg; + double tread_inclination; // 1:40, etc. + double rim_thickness_new_mm; + double scrap_diameter_mm; + WheelMaterial material; + double surface_hardness_HB; +}; + +struct WheelState { + double current_diameter_mm; + double flange_height_mm; + double flange_thickness_mm; + double tread_wear_mm; // cumulative radial wear + double flange_wear_mm; // cumulative flange face material loss + double flat_spot_length_mm; + double out_of_roundness_mm; // peak-to-peak radial deviation + int num_reprofilings; + double km_since_last_reprofiling; + double km_total; +}; + +struct AxleSpec { + AxleMaterial material; + double journal_diameter_mm; + double wheel_seat_diameter_mm; + double body_diameter_mm; + double total_length_mm; + double bore_diameter_mm; // 0 for solid + bool is_hollow; + double press_fit_interference_mm; // diametral + double press_fit_force_kN; + double surface_roughness_Ra_um; +}; + +struct BearingSpec { + BearingType type; + double inner_diameter_mm; + double outer_diameter_mm; + double width_mm; + double dynamic_load_rating_C_kN; + double static_load_rating_C0_kN; + double fatigue_load_limit_Pu_kN; + double grease_fill_pct; + std::string grease_type; + double axial_clearance_mm; + bool sealed_for_life; +}; + +struct WheelsetSpec { + std::string wheelset_id; + std::string vehicle_id; + WheelProfileSpec wheel; + AxleSpec axle; + BearingSpec bearing_left; + BearingSpec bearing_right; + double wheelset_mass_kg; + double nominal_axle_load_kg; + double max_design_speed_kmh; + double gauge_mm; +}; + +struct WheelsetState { + WheelState wheel_left; + WheelState wheel_right; + double axle_bending_stress_MPa; + double bearing_temperature_left_C; + double bearing_temperature_right_C; + double bearing_vibration_rms_mm_per_s2; // overall vibration level + double wheelset_lateral_displacement_mm; + bool bearing_alarm_active; + bool wheel_wear_alarm_active; +}; + +struct WheelsetPerformance { + double contact_pressure_max_MPa; + double contact_ellipse_semi_axis_a_mm; + double contact_ellipse_semi_axis_b_mm; + double equivalent_conicity; + double wheel_wear_rate_mm3_per_1000km; + double bearing_life_L10mh_hours; + double bearing_life_million_km; + double axle_safety_factor_fatigue; + double reprofiling_interval_km; + bool en13260_wheelset_pass; + bool en13261_axle_pass; + bool en13262_wheel_pass; +}; + +WheelProfileSpec design_wheel_profile( + double nominal_diameter_mm, TreadProfile profile_type, WheelMaterial material, double max_axle_load_kg); + +AxleSpec design_axle( + AxleMaterial material, double axle_load_kg, double journal_span_mm, bool hollow, double target_safety_factor); + +BearingSpec design_bearing( + BearingType type, double axle_load_kN, double wheel_diameter_mm, double target_life_million_km, double max_speed_kmh); + +WheelsetSpec design_wheelset( + double axle_load_kg, double wheel_diameter_mm, double max_speed_kmh, TreadProfile profile, AxleMaterial axle_mat, WheelMaterial wheel_mat); + +WheelsetState initialize_wheelset_state(const WheelsetSpec& spec); + +WheelsetPerformance simulate_wheelset_operation( + const WheelsetSpec& spec, WheelsetState& state, double curve_radius_m, double speed_kmh, double km_travelled); + +double calculate_contact_pressure( + double wheel_load_N, double wheel_radius_mm, double rail_crown_radius_mm, double wheel_E_GPa, double rail_E_GPa); + +double calculate_equivalent_conicity( + const TreadProfile profile, double lateral_displacement_mm, double wheel_diameter_mm, double rail_cant); + +double estimate_wear_rate( + double contact_pressure_MPa, double sliding_velocity_m_per_s, double material_hardness_HB, WearMechanism mechanism); + +double calculate_bearing_life_ISO281( + double C_kN, double P_kN, double rpm, double viscosity_ratio_kappa, double contamination_factor, double Pu_kN, double reliability_pct); + +double calculate_axle_fatigue_safety( + AxleMaterial material, double M_b_Nmm, double d_journal_mm, double d_wheel_seat_mm, double notch_factor, bool is_hollow); + +double estimate_reprofiling_interval_km( + double flange_wear_limit_mm, double wear_rate_mm_per_1000km, double allowable_flange_thickness_loss_mm); + +} // namespace vde::railway_metro +``` + + +### 6. Brake System (P1) + +#### 6.1 EP Brake Control, Disc/Tread Brakes, and WSP + +``` +Brake system overview: + Railway braking systems must provide safe, reliable stopping across all + load conditions, speeds, and adhesion states. Modern trains use electro- + pneumatic (EP) brake control with microprocessors per car, blending + regenerative (rheostatic) braking, friction braking (disc or tread), and + parking brake. The brake control unit (BCU) receives brake commands from + train control and applies pressure to brake cylinders via proportional + valves. Wheel slide protection (WSP) prevents wheel lockup. + +Brake system architecture: + Brake types in blending hierarchy: + Priority 1: Regenerative (rheostatic) brake (electric) + Recovers kinetic energy → electrical energy + Available down to ~5 km/h (fading effectiveness) + Typical contribution: 60–80% of total brake energy + Priority 2: Friction brake (pneumatic) + Fills in when regenerative cannot provide sufficient braking + Available to zero speed + Priority 3: Parking brake (spring-applied, air-released) + Holds train stationary on gradient (1.5× max gradient safety) + Emergency: direct pneumatic application (bypassing electronics) + + Brake pipe (BP, main reservoir pipe MRP): + BP nominal pressure: 5.0 bar (UIC) or 5.7 bar (AAR) + MRP nominal pressure: 8–10 bar (supply for EP valves) + Emergency brake: BP vented to atmosphere → max brake application + Passenger alarm (communication cord): applies penalty brake + +Electro-pneumatic (EP) brake control: + Brake Control Unit (BCU): + Per-car microprocessor brake controller + Receives: brake command (% or deceleration m/s²) from train control via MVB/WTB + Load weighing: variable load relay (VLR) adjusts brake force per vehicle mass + + Brake cylinder pressure control: + P_bc = P_command × k_load × k_blending [bar] + P_command = brake demand pressure from BCU logic + k_load = load compensation factor (0.5–1.25 range, AW0 to AW3) + k_load = M_actual / M_tare (normalized to tare weight) + k_blending = friction brake fraction (0.0–1.0) + At high speed: k_blending ≈ 0.2 (80% regenerative) + At low speed: k_blending ≈ 1.0 (regenerative faded, all friction) + + Proportional valve: PWM-controlled solenoid, output pressure follows command + Relay valve: high-flow amplifier, receives pilot pressure from proportional valve + + Brake cylinder (per disc or per tread unit): + Nominal pressure: 3.5–4.5 bar (max service brake) + Emergency pressure: 5.0–7.5 bar (full main reservoir pressure) + Cylinder diameter: φ152mm (6"), φ178mm (7"), φ203mm (8") + Piston stroke: 40–80 mm (must compensate for pad/block wear) + + Brake force calculation (per disc or tread unit): + F_b = P_bc × A_piston × η_mech × R_lever [N] + P_bc = brake cylinder pressure [Pa] + A_piston = cylinder piston area [m²] + η_mech = mechanical efficiency (0.85–0.95 for caliper, 0.75–0.85 for tread linkage) + R_lever = lever ratio (typical 2:1 to 5:1 for tread brakes) + + For disc brake: + F_clamp = F_b × R_lever [N] (clamping force at pad-disc interface) + F_friction = 2 × F_clamp × μ_pad [N] (2 pads per disc) + Brake torque: T_b = F_friction × r_eff [N·m] + r_eff = effective radius (disc radius − pad radial centroid offset) + +Disc brake: + Brake disc: + Axle-mounted disc: + Material: cast steel (EN-GJS-400-15) or compacted graphite iron (CGI) + CGI: better thermal conductivity, lower weight + Diameter: φ610–φ720 mm (IC/MC), φ640–φ750 mm (high-speed) + Thickness: 80–110 mm (vented with radial cooling fins) + Mounting: bolted to wheel web or hub + Number per axle: 2 (one per wheel) or 3 (high-speed, 2 wheel + 1 shaft) + + Wheel-mounted disc: + Integrated into wheel design + Advantage: reduces unsprung mass + Disadvantage: conducts heat to wheel (potential thermal cracking) + + Disc thermal requirements (UIC 541-3): + Drag brake test: 45 min at 40 km/h, 0.6 m/s² → T_disc < 500°C (cast iron) + Stop brake test: emergency from V_max → T_disc < 550°C peak + Heat dissipation: + dQ/dt = h × A × (T_disc − T_ambient) [W] + h = convective heat transfer coefficient + h_forced = 20–50 W/(m²·K) (at 160 km/h, vented disc) + h_natural = 5–15 W/(m²·K) (stationary) + + Brake pad: + Material: + Sintered (metallic): Cu-Fe based, μ = 0.30–0.40 (wet/dry, stable) + Organic (composite): for lower noise/VOC + Ceramic-carbon: ultra-high performance (aircraft-derived) + Friction coefficient: + Instantaneous μ: function of speed, temperature, pressure, humidity + Nominal: μ = 0.35 (dimensioning value per UIC 541-3) + Wear rate: 0.5–1.5 cm³/MJ (depending on material and pad temperature) + Pad area: 200–400 cm² per pad set + Pad thickness: 15–25 mm (new), 5 mm (minimum/backing plate contact) + +Tread brake: + Brake block applied directly to wheel tread + Used on: freight (cast iron/composite), older passenger stock + + Brake block: + Grey cast iron (CI): traditional, μ ≈ 0.10 (low), high wear + Composite (K-block, LL-block): μ ≈ 0.25–0.35, less wheel wear + Sintered: similar to pad, μ ≈ 0.30–0.38 + + Block force: F_block = F_b × R_lever [N] + Friction force at tread: F_friction = F_block × μ_block [N] + Brake torque: T_b = F_block × μ_block × R_wheel [N·m] + +Deceleration performance (UIC 544-1 / EN 14531): + Service brake: + Nominal deceleration: a_service = 0.8–1.2 m/s² (loaded, AW2) + Maximum deceleration: a_max = 1.2–1.5 m/s² (emergency, AW2) + Brake weight percentage: + λ = ΣF_block × μ / (M_train × g) × 100 [%] + Required λ > 60% (R-brake, rapid transit), λ > 140% (P-brake, passenger) + + Stopping distance: + s = v²/(2 × a_eff) + v × t_reaction [m] + v = initial speed [m/s] + a_eff = effective deceleration (average, including build-up) + t_reaction = brake build-up time (0.5–1.5 s EP, 2–4 s pneumatic) + + Adhesion limit check: + a_max < μ_adhesion × g + μ_adhesion = 0.08–0.12 (wet rail / poor conditions) + μ_adhesion = 0.15–0.25 (dry rail / good conditions) + μ_adhesion = 0.25–0.35 (sand + optimal conditions) + +Wheel Slide Protection (WSP): + Function: prevents wheel lockup during braking (analogous to automotive ABS) + + Speed sensing: + Phonic wheel (toothed ring) + Hall effect / inductive sensor + Teeth per axle: 60–120 teeth (higher = better resolution at low speed) + Speed resolution: Δv = 2π × R_wheel / (N_teeth × Δt) [m/s] + + Slide detection: + Wheel deceleration threshold: + Immediate slide: dv/dt > 6–8 m/s² (or 6–8% of instantaneous speed) per 100ms + Slip detection: Δv/v > 5–10% (difference between wheel speed and reference) + v_ref = max(v_1, v_2, v_3, v_4) (in 4-axle bogie) → "select-high" principle + + Rail speed reference estimation: + v_train = max( v_all_wheels ) × correction_factor + Correction for wheel wear: diameter calibration via GPS/Doppler/balise + + WSP control cycle (~10 ms): + Hold phase: dump valve closed, hold valve closed → pressure held constant + Dump phase: detected slide → dump valve opens, release pressure quickly (0.5–1.0 s) + Apply phase: wheel recovering → apply valve opens, gradual pressure re-apply (0.3–0.8 s) + Step-down: if repeated sliding, apply to lower pressure (step reduction 0.3–0.5 bar) + + WSP valves (per axle or per bogie): + Dump valve: NC solenoid, large orifice (φ6–8mm) for fast air release + Hold valve: NC solenoid, blocks supply from relay valve + Apply valve (optional): NC solenoid for controlled pressure re-application + + Performance: + Adhesion utilization: ε = a_braking / a_max_possible at μ_peak + Must achieve ε > 0.75 per UIC 541-05 (WSP standard) + Speed measurement accuracy: ±0.5 km/h at V < 40 km/h + +Brake system capacity calculation (per vehicle): + Heat capacity: + Thermal energy per stop: + E_thermal = ½ × M_vehicle × V² [J] + M_vehicle = vehicle mass [kg] + V = speed at brake init [m/s] + + Example: 50t vehicle, 160 km/h (44.4 m/s): + E = ½ × 50,000 × (44.4)² = 49.3 MJ + + Distributed among friction brake components: + Per disc: E_disc = E_thermal × k_blending / N_discs × k_distribution + k_distribution: per-axle distribution factor (depends on load per axle) + + Continuous rating (repeated braking): + Brake duty cycle (metro, typical peak hour): + Station spacing: 800–1,500m + Between stops: acceleration ~1.0 m/s², coast, brake ~1.0 m/s² + Cycle time: 60–120 seconds + Metre per stop: F_b × distance → energy → disc temperature + Max disc temperature: must not exceed material limit (500°C for CGI on repeated service) + +Parking brake: + Spring-actuator (spring-applied, air-released): + Spring force: 5–15 kN (applied to brake caliper linkage) + Release pressure: >4.0 bar (air overcomes spring to release) + Application: at zero pressure (train parked, air leaks off over time) + Gradient holding: 4% (1 in 25) minimum, typical design 5% (1 in 20) + Handbrake (mechanical): secondary parking, manual wheel/crank +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class BrakeType { Tread_Brake, AxleDisc_Brake, WheelDisc_Brake, Combined }; +enum class BrakeDiscMaterial { GJS400_CastSteel, CGI_CompactedGraphite, SteelForged, CMC_CeramicComposite }; +enum class BrakePadMaterial { Sintered_Metallic, Organic_Composite, Ceramic_Carbon, SemiMetallic }; +enum class BrakeControlMode { EP_Direct, EP_Indirect, Pneumatic_UIC, Pneumatic_AAR }; +enum class WSP_Mode { Axle_WSP, Bogie_WSP, PerWheel_WSP, No_WSP }; +enum class BrakeBlendingMode { Regenerative_First, Rheostatic_First, Friction_Only }; + +struct BrakeDiscSpec { + BrakeDiscMaterial material; + double outer_diameter_mm; + double inner_diameter_mm; + double thickness_mm; + bool vented; + int num_cooling_fins; + int discs_per_axle; + double max_allowable_temp_C; + double heat_capacity_J_per_K; + double convective_coefficient_W_per_m2K; +}; + +struct BrakePadSpec { + BrakePadMaterial material; + double friction_coefficient_nominal; + double friction_coefficient_min; + double friction_coefficient_max; + double pad_area_cm2; + double pad_thickness_new_mm; + double pad_thickness_min_mm; + double wear_rate_cm3_per_MJ; + double max_operating_temp_C; +}; + +struct BrakeCylinderSpec { + double cylinder_diameter_mm; + double piston_area_cm2; + double piston_stroke_max_mm; + double piston_stroke_min_mm; + double lever_ratio; + double mechanical_efficiency; +}; + +struct BrakeControlSpec { + BrakeControlMode control_mode; + BrakeBlendingMode blending_mode; + double brake_pipe_nominal_pressure_bar; + double main_reservoir_pressure_bar; + double service_brake_deceleration_m_per_s2; + double emergency_brake_deceleration_m_per_s2; + double brake_build_up_time_s; + double brake_release_time_s; + double load_compensation_k_mass_ratio; + double regenerative_fade_speed_kmh; // below this speed, regen fades to zero +}; + +struct WSP_Spec { + WSP_Mode mode; + int teeth_per_phonic_wheel; + double slide_detection_deceleration_m_per_s2; + double slip_threshold_pct; // Δv/v threshold + double dump_valve_orifice_diameter_mm; + double apply_valve_orifice_diameter_mm; + double control_cycle_time_ms; + double step_down_pressure_bar; + double adhesion_utilization_target; // ε per UIC 541-05 +}; + +struct ParkingBrakeSpec { + double spring_force_kN; + double release_pressure_bar; + double max_gradient_holding_pct; + bool manual_handbrake_secondary; +}; + +struct BrakeSystemSpec { + std::string vehicle_id; + BrakeType brake_type; + int axles_per_vehicle; + int discs_per_vehicle; + BrakeDiscSpec disc; + BrakePadSpec pad; + BrakeCylinderSpec cylinder; + BrakeControlSpec control; + WSP_Spec wsp; + ParkingBrakeSpec parking; + double vehicle_tare_mass_kg; + double vehicle_max_mass_kg; + double max_speed_kmh; +}; + +struct BrakeState { + double brake_cylinder_pressure_bar; + double current_deceleration_m_per_s2; + double regenerative_brake_force_kN; + double friction_brake_force_kN; + double disc_temperature_C; + double pad_temperature_C; + double pad_thickness_remaining_mm; + bool wheel_slide_detected; + double wheel_speed_kmh_per_wheel[4]; + double reference_speed_kmh; + bool parking_brake_applied; + int total_brake_applications; + double energy_dissipated_total_GJ; +}; + +struct BrakePerformance { + double stopping_distance_emergency_m; + double stopping_distance_service_m; + double average_deceleration_service_m_per_s2; + double max_disc_temperature_achieved_C; + double pad_wear_rate_cm3_per_1000km; + double adhesion_utilization_pct; + double braking_distance_at_sliding_conditions_m; + double gradient_holding_verified_pct; + bool uic544_1_compliant; + bool uic541_05_wsp_compliant; + bool en14531_brake_pass; +}; + +BrakeSystemSpec design_brake_system( + BrakeType type, double vehicle_mass_kg, double max_speed_kmh, BrakeControlMode control_mode, BrakeBlendingMode blending); + +BrakeDiscSpec design_brake_disc( + BrakeDiscMaterial material, double energy_per_stop_kJ, double max_speed_kmh, double wheel_diameter_mm); + +BrakePadSpec design_brake_pad( + BrakePadMaterial material, double friction_coefficient_target, double max_temperature_C); + +BrakeState initialize_brake_state(const BrakeSystemSpec& spec); + +BrakePerformance simulate_brake_cycle( + const BrakeSystemSpec& spec, BrakeState& state, double initial_speed_kmh, double target_deceleration_m_per_s2, double adhesion_available); + +void simulate_wsp_cycle( + const WSP_Spec& wsp, BrakeState& state, double rail_adhesion, double speed_kmh); + +double calculate_braking_distance( + double initial_speed_m_per_s, double deceleration_m_per_s2, double reaction_time_s); + +double calculate_disc_thermal_energy( + double vehicle_mass_kg, double initial_speed_m_per_s, double regenerative_fraction, int num_discs); + +double estimate_disc_temperature( + double initial_temp_C, double energy_absorbed_J, double heat_capacity_J_per_K, double cooling_time_s, double convective_coefficient, double disc_surface_area_m2); + +double calculate_brake_cylinder_pressure( + double target_deceleration_m_per_s2, double vehicle_mass_kg, double wheel_radius_m, double disc_radius_eff_m, double pad_friction, double cylinder_area_m2, double lever_ratio, double efficiency); + +} // namespace vde::railway_metro +``` + +--- + +### 7. Signaling & CBTC (P1) + +#### 7.1 CBTC Architecture, ATP/ATO, Eurobalise, and Interlocking + +``` +Signaling & CBTC overview: + Modern metro and mainline signaling has evolved from fixed block track circuits + to Communication-Based Train Control (CBTC) with moving block. The system + architecture comprises wayside zone controllers (ZC), carborne VOBC, computer + interlocking (CI), and automatic train supervision (ATS). Automatic Train + Protection (ATP) enforces safe separation; Automatic Train Operation (ATO) + handles driving automation. + +CBTC system architecture: + Zone Controller (ZC): + Computes Movement Authority Limit (MAL) for each train in its zone + Receives: train position reports, CI route/switch status, ATS timetable + Transmits: MAL point (location up to which train is authorized), speed limits + + Movement Authority Limit (MAL) calculation: + MAL = min(Next_obstacle_position, End_of_route) + Obstacle: preceding train tail + safety margin + positioning error + Safety margin (moving block): + S_margin = S_position_uncertainty + S_ATP_overrun [m] + S_position_uncertainty: typically 5–25m (odometry error accumulation) + + Carborne Controller (VOBC): + Functions: + - Localization: fuses odometry, balise references, Doppler radar, accelerometer + - ATP supervision: enforces speed/distance limits from ZC + - ATO driving: speed regulation, station stop, door control + - Train integrity monitoring + + Localization (Kalman filter sensor fusion): + State vector x = [position, velocity, accelerometer_bias]^T + + Prediction (odometry): + x̂_k|k-1 = F × x̂_k-1 + P_k|k-1 = F × P_k-1 × F^T + Q + + Where: + F = [[1, Δt, 0.5Δt²], [0, 1, Δt], [0, 0, 1]] + Q = process noise from wheel slip/slide, accelerometer drift + + Update (balise detection at known position): + y_k = H × x + v_k (v_k = measurement noise) + K = P_k|k-1 × H^T × (H × P_k|k-1 × H^T + R)^(-1) + x̂_k = x̂_k|k-1 + K × (y_k − H × x̂_k|k-1) + P_k = (I − K × H) × P_k|k-1 + + Balise re-reference: every 200–500m (clears accumulated odometry error) + Position accuracy: ±5m (95% confidence) between balises, ±0.5m at balise + + Computer Interlocking (CI): + Fundamental interlocking principles: + 1. Route locking: points locked in position once route set + 2. Flank protection: conflicting routes prevented (derailers, trap points) + 3. Overlap: protection distance beyond signal (50–200m) + 4. Approach locking: route locked when train approaching + 5. Route release: sectional release (track circuit by track circuit) + + Switch (points) control: + Detection: point machine detects correct position (left/right) + Locking: mechanical locking prevents movement under train + Gap tolerance: <4mm between stock rail and switch rail + Transit time: <3 seconds for switch throw + + Automatic Train Supervision (ATS): + Functions: + - Timetable regulation: adjust dwell/running time to recover delay + - Junction management: schedule trains through conflicting routes + - Energy optimization: coasting recommendations, reduced acceleration + - Passenger information: next station, delay announcements + - Alarm management: system fault annunciation + + Headway regulation: + Target headway: 90–150 seconds (metro), 120–300 seconds (mainline) + +ATP (Automatic Train Protection): + Overspeed protection curve: + Service brake intervention curve: + v_sbi(s) = sqrt(v_target² + 2 × a_service × (s_target − s)) + + Emergency brake intervention curve: + v_ebi(s) = sqrt(v_target² + 2 × a_emergency × (s_target − s)) + + Where: + v_target = target speed at restriction [m/s] + s_target = location of speed restriction [m] + a_service = guaranteed service brake deceleration [m/s²] + a_emergency = guaranteed emergency brake deceleration [m/s²] + + Speed supervision thresholds: + Warning: v_actual > v_permitted + 2 km/h → audible alarm + Service brake: v_actual > v_permitted + 5 km/h → full service brake + Emergency brake: v_actual > v_permitted + 10 km/h → emergency brake + + EBIC (Emergency Brake Intervention Curve) with reaction time: + v_ebi(s) requires adding train reaction time t_r: + Distance travelled during reaction: s_r = v × t_r + Effective EBIC shifted forward by s_r + + Worst-case parameters for safety analysis: + t_reaction = 0.5–1.0 s (ATP processing + brake build-up) + a_emergency_guaranteed = a_emergency_nominal × 0.7 (worst adhesion) + +ATO (Automatic Train Operation): + Speed profile optimization: + Objective: minimize energy consumption subject to timetable constraints + + Optimal driving strategy: + Phase 1 — Maximum acceleration: a = a_max (traction limit) + Phase 2 — Cruising: v = v_cruise (constant speed) + Phase 3 — Coasting: a = −R(v) / m (resistance only, no traction) + Phase 4 — Braking: a = −a_brake (service brake deceleration) + + Coasting optimization: + Earlier coast → more energy saving but longer trip time + Later coast → shorter trip time but higher energy consumption + + Station stop precision: + Target: ±0.3m from stopping mark (platform screen door alignment) + Brake control: closed-loop position error correction + e_pos = s_target − s_actual [m] + v_command = sqrt(2 × a_brake × e_pos) + + Grades of Automation (GoA per IEC 62290): + GoA 1: Manual driving with ATP supervision + GoA 2: Semi-automated (ATO driving, driver in cab, door control manual) + GoA 3: Driverless train operation (DTO, attendant on board) + GoA 4: Unattended train operation (UTO, fully automated) + +Wayside-to-train radio: + LTE-M (1.8 GHz, 3GPP Release 13+): + Bandwidth: 5–20 MHz (dedicated or shared with public LTE) + Latency: <50ms end-to-end (MA message delivery) + Handover: <100ms between radio cells + Availability: >99.999% (five nines) + + WiFi (IEEE 802.11ac/ax at 5 GHz): + Used in legacy CBTC deployments + Handover: fast roaming 802.11r (FT — Fast Transition) + +Eurobalise: + Balise types: + Fixed data balise: transmits fixed information (balise group ID, location, + gradient, speed limit, link to next balise group) + Transparent data balise: programmed via LEU from signal aspect + Infill balise: additional balise for early signal aspect update + + Telegram structure: + Up-link telegram (balise → train): 1,023 bits + 50-bit header: telegram type, balise group ID, direction + 913-bit user data: packetized (ETCS language) + Packet 5: Linking information + Packet 12: Level 1 Movement Authority + Packet 21: Gradient profile + Packet 27: International Static Speed Profile (SSP) + 60-bit CRC + check bits + + Positioning principle: + Balise group defines absolute position reference + Between balises: odometry-based dead reckoning + Position confidence interval grows linearly: + σ_pos(s) = σ_balise + k_odo × s + Where k_odo ≈ 1–2% of distance travelled + +Headway and capacity analysis: + Minimum headway (moving block): + H_min = (L_train + L_safety + L_brake) / v_line [seconds] + + Where: + L_train = train length [m] + L_safety = safety distance (ATP margin + position uncertainty) [m] + L_brake = v²/(2 × a_service) (braking distance at line speed) + + Line capacity: + C = 3,600 / H_min [trains per hour per direction] + Typical metro capacity: 30–40 tph (train per hour) per direction + +Fixed block signaling (legacy comparison): + Block section: track circuit or axle counter section + Block length: 100–2,000m + + Headway (3-aspect signaling): + H_fixed = (3 × L_block + L_train) / v_line + +Axle counter: + Count-in / Count-out: axle count at entry = axle count at exit → block clear + Advantage: no insulated rail joints, works on rusty rail + Disadvantage: no broken rail detection + +Track circuit (traditional): + Audio frequency (AF) track circuits: + Frequencies: 1,700/2,000/2,300/2,600 Hz + Jointless: tuned zones at block boundaries + Shunt sensitivity: 0.25–0.50 Ω + Broken rail detection: fail-safe open circuit + +Point machine (switch machine): + Electric point machine: + Motor power: 1.5–3.0 kW, throw force: 3–6 kN + Gap tolerance: <4mm + Transit time: <2.5 seconds + + Hydraulic point machine (clamplock): + Lock force: >40 kN + Obstruction test: 20mm obstruction → must not detect locked + +Train detection integrity: + Safety Integrity Level (SIL 4): + Probability of dangerous failure per hour: <10⁻⁸ + Architecture: 2oo3 or 2×2oo2 with diagnosis for SIL 4 +``` + +#### 7.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class GoA_Level { GoA1, GoA2, GoA3, GoA4 }; +enum class BlockType { FixedBlock_3Aspect, FixedBlock_4Aspect, MovingBlock }; +enum class RadioType { LTE_M, WiFi_5GHz, LeakyFeeder, TETRA }; +enum class BaliseType { FixedData, TransparentData, Infill }; +enum class TrainDetectionType { AF_TrackCircuit, AxleCounter, Hybrid }; +enum class PointMachineType { Electric, Hydraulic_Clamplock, ElectroHydraulic }; +enum class ATP_InterventionLevel { Warning, ServiceBrake, EmergencyBrake }; + +struct CBTC_ArchitectureSpec { + GoA_Level goa; + BlockType block_type; + RadioType radio_type; + double radio_latency_ms; + double mal_update_interval_ms; + int zc_count; + double zc_overlap_m; + int ci_interlocking_zones; +}; + +struct ATP_Spec { + double service_brake_deceleration_m_per_s2; + double emergency_brake_deceleration_m_per_s2; + double brake_build_up_time_s; + double atp_reaction_time_s; + double warning_margin_kmh; + double service_brake_margin_kmh; + double emergency_brake_margin_kmh; + double position_uncertainty_per_100m_m; + double balise_reference_interval_m; +}; + +struct ATO_Spec { + double max_acceleration_m_per_s2; + double max_jerk_m_per_s3; + double cruising_speed_kmh; + double coasting_strategy; // 0=minimum time, 1=minimum energy + double station_stop_tolerance_m; // ±m from target + double dwell_time_s; + double door_open_time_s; + double door_close_time_s; +}; + +struct BaliseSpec { + BaliseType type; + double group_position_km; + std::string telegram_packet_ids; // "5,12,21,27" + bool is_linking_balise; + int nid_c; // country ID + int nid_bg; // balise group ID + double linking_distance_to_next_m; +}; + +struct PointMachineSpec { + PointMachineType type; + double throw_time_s; + double lock_force_kN; + double detection_voltage_V; + bool clamplock_external; + double obstruction_test_mm; // max obstruction still safe +}; + +struct SignalSpec { + int signal_id; + bool is_auto_signal; + double position_km; + bool approach_locked; + bool route_locked; + double overlap_distance_m; + int aspect_count; // 2, 3, or 4 +}; + +struct TrackSectionSpec { + std::string section_id; + TrainDetectionType detection_type; + double section_length_m; + double max_speed_kmh; + double gradient_percent; // positive = uphill + bool is_junction_section; + PointMachineSpec point_machine; // if junction section + double track_circuit_frequency_Hz; // if track circuit +}; + +struct SignalingState { + ATP_InterventionLevel atp_level; + double current_mal_position_km; + double current_mal_speed_kmh; + double train_position_km; + double position_uncertainty_m; + double odometry_distance_since_balise_m; + int last_balise_group_id; + int next_balise_group_id; + double target_speed_kmh; + double target_distance_m; + bool emergency_brake_triggered; + bool station_stop_achieved; +}; + +struct SignalingPerformance { + double headway_s; // achievable minimum headway + double capacity_tph; // trains per hour per direction + double atp_safety_margin_m; // margin between SBI and EBI + double station_stop_deviation_m; // actual vs target + double energy_consumption_kWh_per_km; // per train + double junction_delay_penalty_s; + double radio_availability_pct; + bool sil4_compliant; +}; + +CBTC_ArchitectureSpec design_cbtc_system( + GoA_Level goa, + double target_headway_s, + int trains_per_hour, + double line_length_km, + RadioType radio +); + +ATP_Spec design_atp_system( + double line_speed_kmh, + double train_brake_rate_m_per_s2, + double headway_target_s +); + +ATO_Spec design_ato_system( + GoA_Level goa, + double schedule_adherence_tolerance_s, + double energy_optimization_weight +); + +SignalingState initialize_signaling_state(const ATP_Spec& atp, const ATO_Spec& ato); + +ATP_InterventionLevel atp_supervision( + const ATP_Spec& spec, + double actual_speed_kmh, + double permitted_speed_kmh, + double distance_to_target_m, + double target_speed_kmh +); + +double compute_ebic( + const ATP_Spec& spec, + double current_speed_kmh, + double distance_to_target_m, + double target_speed_kmh +); + +double compute_service_brake_curve( + const ATP_Spec& spec, + double current_speed_kmh, + double distance_to_target_m, + double target_speed_kmh +); + +double estimate_headway( + BlockType block_type, + double train_length_m, + double line_speed_kmh, + double block_length_m, + double atp_margin_m +); + +SignalingPerformance simulate_signaling_section( + const CBTC_ArchitectureSpec& arch, + const ATP_Spec& atp, + const ATO_Spec& ato, + const TrackSectionSpec& section, + SignalingState& state, + double entry_speed_kmh +); + +double calculate_position_uncertainty( + double distance_since_balise_m, + double uncertainty_per_100m_m, + double balise_uncertainty_m +); + +bool verify_point_machine_lock( + const PointMachineSpec& spec, + double obstruction_mm +); + +double compute_junction_headway_penalty( + double switch_throw_time_s, + double approach_speed_kmh, + double junction_clearance_distance_m +); + +} // namespace vde::railway_metro +``` + + +### 8. Traction Power & Track (P1) + +#### 8.1 Overhead Catenary, Third Rail, Pantograph, and Track Structure + +``` +Traction power & track overview: + Traction power is delivered to trains either via overhead catenary + systems (OCS) at AC 25kV/50Hz (mainline) or DC 1.5kV/3kV (legacy), + or via third rail at DC 750V (metro). Track structure supports and + guides the train, comprising rails, fastening, sleepers/ties, ballast + or slab track, and switches/crossings. Substations convert grid power + to traction supply with 12/24-pulse rectifiers or IGBT front-ends. + +Overhead Catenary System (OCS): + Electrification standards: + AC 25 kV / 50 Hz: standard mainline (UIC, TSI ENE), also 15kV/16.7Hz (D-A-CH) + AC 2×25 kV: autotransformer system (reduced voltage drop, substation ×50km) + DC 1.5 kV: legacy (SNCF Netherlands, parts of France, India) + DC 3.0 kV: legacy (Italy, Spain, Belgium, Poland, Russia) + DC 750 V: third rail (UK Southern, metro systems) + + Catenary geometry: + Contact wire height (above rail, nominal): + Mainline (25kV): 5.08–5.50 m + Low-height (tunnel/bridge): 4.95 m (minimum) + UK DC third rail: not applicable (contact wire replaced by conductor rail) + System height (contact wire to messenger wire): 0.9–1.8 m + Dropper spacing: 5–12 m (depending on span length) + Registration arm: ±200–300mm stagger (zigzag) to distribute contact wire wear + + Contact wire: + Material: Cu-Ag (0.1% Ag) for AC, Cu-Mg (0.5%Mg) for DC/high current + Cross-section: 120 mm² (Cu-Ag, standard), 150 mm² (Cu-Mg, high current) + Tensile strength: 350–395 MPa (annealed Cu-Ag), 500+ MPa (Cu-Mg) + Tension: 10–20 kN (per wire, autotensioned) + Wear limit: 20% reduction from original cross-section → replacement + Wave propagation speed: c_w = sqrt(T / ρ) [m/s] + T = tension [N], ρ = mass per unit length [kg/m] + For Cu-Ag 120mm² at 15kN: c_w ≈ 470 km/h + Train speed must stay below 0.7 × c_w (avoid contact loss) + + Messenger (catenary) wire: + Material: Bronze (Cu-Sn) or AlMgSi, 70–150 mm² + Tension: 10–20 kN (autotensioned) + Span length: 63 m (standard), 45–55 m (tunnel) + + Autotensioning (compensation): + Purpose: maintain constant wire tension despite thermal expansion + Weight tensioner (gravity type) or spring tensioner (hydraulic) + Tension variation: <3% for full temperature range (−20°C to +60°C) + Balance weight: ratio 1:3 (wire tension / counterweight mass × g) + Weight stack mass: 500–1,000 kg (per wire, per tensioning section) + + Catenary dynamic behavior: + Pantograph contact force: F_contact = F_static + F_aero + F_dynamic [N] + F_static: nominal uplift force (70–90 N for AC high-speed) + F_aero: aerodynamic uplift (proportional to v², significant >200 km/h) + F_dynamic: from catenary wave reflection, dropper passage + + Contact force standard deviation: + σ_F < 30 N (UIC 794, for V ≤ 200 km/h) + σ_F < 0.00097 × V² (for V > 200 km/h, minimum standard deviation varies) + Maximum contact force: + F_max < 200 N (prevent excessive local wear) + F_max < 350 N (short peak, e.g., registration arm passage) + Percentage contact loss: <0.2% (arcing > 5ms counted as loss) + + Dropper passage frequency: + f_dropper = V / L_dropper [Hz] + At 350 km/h, L_dropper = 8m: f ≈ 12.2 Hz + Must avoid resonance with pantograph natural frequency (typically 5–15 Hz) + + Neutral section: + Phase break: ~10m neutral zone between different power supply sections + Train passes coasting (no power, no regeneration) + Detection: trackside magnets trigger auto power-off/on + At 350 km/h: passes neutral section in ~0.1s → acceptable current interruption + +Pantograph: + Collector head: + Carbon strip (collector / contact strip): + Plain carbon (pure): μ = 0.15–0.25 (on Cu contact wire) + Metal-impregnated carbon (Cu impregnated): better conductivity, lower wear + C-C composite: lightweight, long life + Strip width: 35–60 mm, length: 800–1,950 mm (AC, double strip 2×1,700mm) + Wear rate: 0.5–2.0 mm/1,000 km (carbon strip on Cu wire) + Replacement: at 5–10 mm remaining height (from 25–30mm new) + + Pan head suspension: + Primary suspension (collector head): leaf springs, rubber elements + Secondary suspension (frame): pneumatic actuator (raise/lower) + coil spring + Raise mechanism: pneumatic cylinder, nominal force 70–90 N (adjustable) + Automatic Dropping Device (ADD): + Pneumatic valve triggers "drop pantograph" if carbon strip breaks + Break detection: loss of pressure in pneumatic collector head tube + Drop time: <1.5 seconds (from detection to fully lowered) + + Pantograph frame: + Single-arm (Faiveley/Schunk/Breaknell Willis type): + Articulated parallelogram linkage + Material: aluminum alloy (6082/7075) tubes + Raise height: 400–2,800 mm above mounting point + Operating range: 1,200–2,600 mm contact wire height + + Dynamic behavior: + Mass: 120–250 kg (complete assembly, excluding base frame) + Natural frequency: 5–12 Hz (vertical, depends on working height) + Damping: 10–20% of critical damping (ζ = 0.10–0.20) + +Third rail (DC conductor rail): + Configuration: + Top contact (UK Southern, Merseyrail): shoe slides on top of rail + Bottom contact (most modern): shoe contacts underside (safer, protected) + Side contact (limited use): shoe contacts side of rail + + Composite conductor rail: + Aluminum body (high conductivity) + stainless steel cap (wear surface) + Resistance: ~7 mΩ/km (Al-steel composite, 6,000A rating) + Weight: 15–22 kg/m + Length: standard 18.3m (60ft) per length + + Current collection: + Collector shoe: carbon or copper-impregnated carbon + Shoe contact force: 120–200 N (spring-loaded, trailing arm) + Gap at rail joints: <2mm (to prevent arcing) + End ramp: inclined approach/departure (prevents shoe damage) + + Section gaps: + Isolation gap: 2–3m (power supply sections) + Gapping: loss of traction power at gaps → speed drop (handled by onboard energy storage or coasting) + +Traction substation: + AC 25kV substation: + Grid supply: 110/132/220 kV (typically two independent feeders for N-1) + Transformer: 110kV / 2×25kV (autotransformer), 25–40 MVA rating + Autotransformer: 25-0-25 kV, centre-tapped, rated 10–15 MVA + Feeder spacing: 40–60 km (2×25kV), 25–35 km (1×25kV) + Voltage regulation: ±10% at pantograph (no-load to full-load, per TSI ENE) + + DC traction substation (for metro / tram): + Transformer: 11/22/33kV → 585V or 1,200V (no-load) + Rectifier: 12-pulse (two 3-phase bridge in series, 30° phase shift) + 24-pulse rectifier (four bridges, 15° shift): lower harmonics (THD < 5%) + IGBT Active Front End (AFE): 4-quadrant, near-unity PF, regenerative + Rated output: 2–5 MW per rectifier unit + Spacing: 1.5–3.5 km (DC 750V), 2.5–5.0 km (DC 1.5kV) + + Voltage drop calculation (DC third rail or OCS): + ΔV = I × R × L [V] + I = train current draw [A] (~2,000–4,000A per train, metro) + R = total circuit resistance (feed + return) [Ω/km] + L = distance from feeder point [km] + Minimum permissible voltage: −33% of nominal (EN 50163) + For DC 750V: V_min = 500V at pantograph/shoe + +Return current: + Running rails as return conductor (for both AC and DC) + Return current in rails: typically 50% (AC) or 100% (DC traction) + Touch potential: rail-to-ground voltage < 60V (AC), < 120V (DC) per EN 50122 + Stray current protection: + DC stray current → electrolytic corrosion of buried structures + Mitigation: rail-to-earth insulation, stray current collection mat + Rail-to-earth resistance: >10 Ω·km (new construction) + +Track structure: + Rail: + Profile (UIC 60 / E1): + Mass: 60.3 kg/m + Head width: 72 mm + Height: 172 mm + Foot width: 150 mm + Steel grade: R260 (standard carbon-manganese), R350HT (head hardened, premium) + Tensile strength: R260 ≥ 880 MPa, R350HT ≥ 1,175 MPa + Hardness: R260 260–300 HB, R350HT 350–400 HB (at running surface) + + Rail welding: + Flash-butt welding (FBW): + Rail ends pressed together while electric current flows → molten joint + Pressure: 30–50 MPa, upset: 10–15mm + Heat-affected zone (HAZ): ~50mm each side + Post-weld heat treatment: normalizing at 850–900°C + + Aluminothermic (Thermit) welding: + Al + Fe₂O₃ → Al₂O₃ + 2Fe + heat (exothermic reaction at ~2,500°C) + Preheating: 5–10 minutes with propane torch + Reaction time: 20–30 seconds + Cooling: slow cooling hood, 30+ minutes + Used for: field joints, repair, closure rails + + Rail fastening: + Elastic fastening: + Vossloh W-tension clamp (SKL type): + Clamping force: 9–12 kN per clip + Toe load: 10–18 kN (per rail seat) + Spring travel: 9–11 mm + Anti-vandalism: requires special tool for removal + + Pandrol Fastclip (e-clip): + Clamping force: 8.5–12.5 kN per clip + Toe load: 11–14 kN per assembly + Housing: cast ductile iron shoulder + + Rail pad (between rail and sleeper): + Material: EVA, HDPE, or rubber (for vibration attenuation) + Static stiffness: 50–500 kN/mm (soft pads for slab track vibration isolation) + Thickness: 5–10 mm + + Baseplate (for slab track): + Cast iron or fabricated steel, bolted to sleeper/plinth + Rail inclination: 1:40 or 1:20 (cant, distributes contact to inner face) + + Sleeper (tie): + Ballasted track: + Prestressed concrete monobloc sleeper: + Length: 2.5–2.6 m + Mass: 280–320 kg + Spacing: 600 mm (standard), 545–650 mm range + Prestressing wires: 8–10 wires, φ7mm, tensioned to 70% UTS + + Timber sleeper (limited use, secondary lines): + Hardwood (oak, jarrah): creosote-treated + Life: 20–40 years (vs. 40–60 years for concrete) + + Slab track: + Ballastless track, concrete track slab: + CRTS I (China Railway Track System, slab track): + Prefabricated slabs: 6.45m × 2.55m × 0.19m + CAM (cement asphalt mortar) infill: 40–50mm beneath slab + Application: high-speed >300 km/h + + CRTS II (continuous slab): + In-situ cast on hydraulically bonded base layer (HBL) + Continuous without expansion joints (constrained shrinkage) + + CRTS III (unit slab, self-compacting concrete infill): + Prefabricated slab + SCC (self-compacting concrete) infill + Chinese patent, improved crack resistance + + Rheda 2000 / Rheda City (German): + In-situ cast bi-block sleepers in concrete trough + + Advantages: + Reduced maintenance (no tamping) + Higher lateral resistance + Better geometry retention + Disadvantages: + Higher initial cost (2–3× ballasted) + Noise reflection (requires absorptive panels) + + Ballast (for ballasted track): + Grading: 22.4–63 mm (EN 13450, category A) + Depth (below sleeper): 300–350 mm (mainline), 250 mm (secondary) + Shoulder width: 500 mm beyond sleeper end + Maintenance: tamping every 50–100 MGT (million gross tonnes) + Ballast life: 10–15 years before renewal (contamination + particle breakage) + + Track geometry: + Gauge: 1,435 mm (standard), tolerance +6/−3 mm (EN 13848-1) + Cant (superelevation): + D = 11.8 × V² / R [mm] + V = speed [km/h], R = curve radius [m] + Maximum cant: 150 mm (UIC), 180 mm (HS) + Cant deficiency (non-compensated lateral acceleration): + I_cd = 11.8 × V² / R − D [mm] + Maximum I_cd: 100 mm (conventional), 130 mm (tilting train) + + Twist (track warp): + Rate of change of cross-level over 3m base: <1:300 (2‰, g = 7mm) + Exception: 1:250 (bad track), design value 7‰ over 3m base + + Alignment (lateral): + Straight line: ±2mm over 10m chord + Curves: transition (clothoid/spiral) with constant rate of curvature change + +Switch and crossing (S&C): + Switch (turnout) components: + Stock rail: straight or curved through-route rail, fixed + Switch rail (point blade): movable tapered rail, switches between routes + Crossing (frog): where two rails intersect, flangeway gap + Check rail: guides wheel through frog gap, prevents wrong-side flange contact + + Switch geometry: + Tangent or semi-tangent geometry + Radius: 190–760 m (depending on turnout number) + Turnout number N: N = cot(α) (tangent of crossing angle) + No. 6 (simple, yard): crossing angle 1:6 → R ≈ 190m, V_diverging ≈ 30 km/h + No. 12 (medium, metro): crossing angle 1:12 → R ≈ 500m, V_diverging ≈ 60 km/h + No. 18 (high-speed): crossing angle 1:18 → R ≈ 1,200m, V_diverging ≈ 120 km/h + No. 42 (very HS): crossing angle 1:42 → R ≈ 5,000m, V_diverging ≈ 200 km/h + + Crossing flangeway: + Gap width: 48–54 mm (varies with frog angle) + Flangeway depth: minimum 38 mm (allow flange tip passage) + + Switch operation: + Point machine: electro-mechanical (same as signaling Section 7) + Detection: switch rail position confirmed before signaling permits entry +``` + +#### 8.2 Proposed API + +```cpp +namespace vde::railway_metro { + +enum class ElectrificationType { AC_25kV_50Hz, AC_15kV_16_7Hz, AC_2x25kV_50Hz, DC_1_5kV, DC_3kV, DC_750V_ThirdRail }; +enum class ContactWireMaterial { CuAg_120mm2, CuMg_150mm2, CuSn_Bronze, HDGC_Copper }; +enum class ContactStripMaterial { PlainCarbon, MetalImpregCarbon, CC_Composite }; +enum class RailProfile { UIC60_E1, UIC54_E2, AREMA_136RE, JIS_60K }; +enum class RailGrade { R260, R350HT, R400HT, Special_HeadHardened }; +enum class FasteningType { Vossloh_SKL, Pandrol_Fastclip, Nabla, KPO_Spring }; +enum class TrackType { Ballasted, SlabTrack_CRTS_I, SlabTrack_CRTS_II, SlabTrack_CRTS_III, SlabTrack_Rheda, EmbeddedRail }; +enum class SleeperType { Concrete_Monobloc, Concrete_BiBlock, Timber, Steel, Composite }; +enum class TrackGauge { Standard_1435mm, Broad_1520mm, Meter_1000mm, Narrow_1067mm }; +enum class SwitchTurnoutNumber { N6, N8, N10, N12, N15, N18, N26, N42 }; +enum class SubstationTopology { Diode_12Pulse, Diode_24Pulse, IGBT_AFE, Thyristor_Controlled }; + +struct CatenaryGeometry { + double contact_wire_height_nominal_mm; // above rail level + double system_height_mm; // contact to messenger + double span_length_m; + double dropper_spacing_m; + double stagger_mm; // ± zigzag offset + double encumbrance_mm; // pole to track center +}; + +struct ContactWireSpec { + ContactWireMaterial material; + double cross_section_mm2; + double tensile_strength_MPa; + double tension_kN; + double specific_weight_kg_per_m; + double wear_limit_cross_section_pct; // % reduction → replace + double wave_propagation_speed_kmh; // c_w +}; + +struct MessengerWireSpec { + std::string material; // "CuSn_bronze", "AlMgSi" + double cross_section_mm2; + double tension_kN; + double specific_weight_kg_per_m; +}; + +struct AutotensionSpec { + bool active; + double tension_variation_pct; // over full temperature range + std::string tensioner_type; // "gravity_weight", "spring_hydraulic" + double balance_weight_mass_kg; + double ratio; +}; + +struct PantographSpec { + std::string pantograph_type; // "single_arm", "double_arm_diamond" + double carbon_strip_count; + ContactStripMaterial strip_material; + double strip_length_mm; + double strip_width_mm; + double strip_thickness_new_mm; + double strip_wear_rate_mm_per_1000km; + double static_contact_force_N; + double aerodynamic_uplift_coefficient_Ns2_per_m2; + double total_mass_kg; + double natural_frequency_Hz; + double damping_ratio; + bool has_add; // Automatic Dropping Device + double add_response_time_s; + double max_working_height_mm; + double min_working_height_mm; +}; + +struct ThirdRailSpec { + std::string contact_type; // "top", "bottom", "side" + double conductor_rail_resistance_mOhm_per_km; + double current_rating_A; + double rail_weight_kg_per_m; + double collector_shoe_force_N; + double min_collector_shoe_voltage_V; +}; + +struct SubstationSpec { + SubstationTopology topology; + ElectrificationType electrification_type; + double supply_voltage_input_kV; + double output_voltage_no_load_V; + double rated_power_MW; + double spacing_km; + double efficiency_pct; + double voltage_drop_at_rated_load_pct; + double short_circuit_current_kA; + bool regenerative_receptive; +}; + +struct CatenarySpec { + ElectrificationType electrification_type; + CatenaryGeometry geometry; + ContactWireSpec contact_wire; + MessengerWireSpec messenger_wire; + AutotensionSpec autotension; + double neutral_section_length_m; + bool double_wire; // twin contact wires for high current +}; + +struct TrackRailSpec { + RailProfile profile; + RailGrade grade; + double mass_kg_per_m; + int rail_length_per_piece_m; +}; + +struct FasteningSpec { + FasteningType type; + double clamping_force_per_clip_kN; + double toe_load_kN; + double rail_pad_stiffness_kN_per_mm; + double rail_pad_thickness_mm; + double rail_inclination; // 1:40 or 1:20 +}; + +struct SleeperSpec { + SleeperType type; + double length_m; + double mass_kg; + double spacing_mm; +}; + +struct BallastSpec { + double depth_below_sleeper_mm; + double shoulder_width_mm; + double gradation_min_mm; + double gradation_max_mm; +}; + +struct SlabTrackSpec { + std::string slab_type; // "CRTS_I", "CRTS_II", "CRTS_III", "Rheda" + double slab_length_m; + double slab_width_m; + double slab_thickness_mm; + std::string infill_material; // "CAM", "SCC", "HBL" + double infill_thickness_mm; +}; + +struct TrackSectionGeometry { + TrackGauge gauge; + double gauge_tolerance_plus_mm; + double gauge_tolerance_minus_mm; + double curvature_radius_m; // INF for straight + double cant_mm; + double cant_deficiency_mm; + double twist_per_3m_base_mm; + double design_speed_kmh; +}; + +struct SwitchSpec { + SwitchTurnoutNumber turnout_number; + double crossing_angle_ratio; // 1:N + double diverging_radius_m; + double diverging_speed_kmh; + double flangeway_gap_width_mm; + double flangeway_depth_mm; + double switch_rail_travel_mm; + bool has_moveable_point_frog; +}; + +struct TractionPowerState { + double contact_wire_height_measured_mm; + double pantograph_contact_force_N; + double contact_force_std_dev_N; + double contact_loss_pct; + double catenary_voltage_at_panto_V; + double voltage_drop_from_substation_pct; + double carbon_strip_wear_mm; + double rail_wear_profile_area_mm2; + double track_settlement_mm; +}; + +struct TractionPowerPerformance { + double max_train_speed_with_quality_kmh; // limited by catenary wave speed + double contact_loss_pct_at_max_speed; + double pantograph_contact_force_range_N; + double voltage_at_furthest_point_V; + double substation_voltage_regulation_pct; + double track_quality_index_tqi; // standard deviation of geometry per 200m + bool en50119_catenary_pass; + bool en50163_voltage_pass; + bool en13848_track_geometry_pass; +}; + +CatenarySpec design_overhead_catenary( + ElectrificationType type, double target_speed_kmh, double contact_wire_height_mm, double span_length_m); + +PantographSpec design_pantograph( + ElectrificationType type, double max_speed_kmh, int num_carbon_strips, ContactStripMaterial strip_mat); + +PantographState initialize_pantograph_state(const PantographSpec& spec); + +CatenaryState initialize_catenary_state(const CatenarySpec& spec); + +TractionPowerState initialize_traction_power_state(); + +TractionPowerPerformance simulate_catenary_pantograph_interaction( + const CatenarySpec& catenary, const PantographSpec& panto, CatenaryState& cat_state, PantographState& panto_state, double train_speed_kmh, SubstationSpec& substation, TractionPowerState& tpstate); + +SubstationSpec design_traction_substation( + ElectrificationType type, double average_power_demand_MW, double section_length_km, SubstationTopology topology); + +TrackRailSpec design_rail( + RailProfile profile, RailGrade grade, double axle_load_tonnes, double traffic_MGT_per_year); + +FasteningSpec design_fastening(FasteningType type, double clamping_force_target_kN); + +TrackSectionGeometry design_track_alignment( + double design_speed_kmh, double curve_radius_m, TrackGauge gauge, double max_cant_mm, double max_cant_deficiency_mm); + +SwitchSpec design_turnout( + SwitchTurnoutNumber turnout_number, double through_speed_kmh); + +double calculate_contact_wire_wave_speed( + double tension_kN, double mass_per_unit_length_kg_per_m); + +double estimate_voltage_drop( + ElectrificationType type, double current_A, double distance_km, double conductor_resistance_Ohm_per_km); + +double calculate_cant(double speed_kmh, double curve_radius_m, double gauge_mm); + +double estimate_track_maintenance_interval_MGT( + TrackType track_type, double axle_load_tonnes, double traffic_speed_kmh, RailGrade grade); + +double calculate_contact_force_deviation( + double train_speed_kmh, double wave_speed_kmh, double static_force_N, double aerodynamic_coefficient); + +} // namespace vde::railway_metro +``` + + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Key Types | +|---|---|---| +| `vde::railway_metro` | `car_body.h` | `CarBodySpec`, `AluminumExtrusionSpec`, `FSW_Spec`, `UnderframeSpec`, `CrashCategory`, `EN12663_Category` | +| `vde::railway_metro` | `interior.h` | `SeatingLayoutSpec`, `HVACDesignInput`, `HVACDesignOutput`, `AuxPowerSpec`, `LightingSpec`, `InteriorState` | +| `vde::railway_metro` | `door.h` | `DoorSystemSpec`, `DoorLeafSpec`, `DoorDriveSpec`, `DoorLockSpec`, `GangwaySpec`, `DoorState` | +| `vde::railway_metro` | `bogie.h` | `BogieSpec`, `BogieFrameSpec`, `PrimarySuspensionSpec`, `SecondarySuspensionSpec`, `DamperSpec`, `AntiRollBarSpec`, `BogieState` | +| `vde::railway_metro` | `wheelset.h` | `WheelsetSpec`, `WheelProfileSpec`, `AxleSpec`, `BearingSpec`, `WheelsetState`, `WheelState` | +| `vde::railway_metro` | `brake.h` | `BrakeSystemSpec`, `BrakeDiscSpec`, `BrakePadSpec`, `WSP_Spec`, `BrakeControlSpec`, `BrakeState` | +| `vde::railway_metro` | `signaling.h` | `CBTC_ArchitectureSpec`, `ATP_Spec`, `ATO_Spec`, `BaliseSpec`, `TrackSectionSpec`, `SignalingState` | +| `vde::railway_metro` | `traction_power.h` | `CatenarySpec`, `PantographSpec`, `ThirdRailSpec`, `SubstationSpec`, `TrackRailSpec`, `SwitchSpec`, `TractionPowerState` | + +--- + +## Industry Standards + +| Standard | Title | Relevance | +|---|---|---| +| EN 12663-1 | Structural requirements of railway vehicle bodies | Car body static/dynamic load cases | +| EN 15227 | Crashworthiness requirements for railway vehicle bodies | Underframe energy absorption categories C-I/II/III | +| EN 45545-2 | Fire protection — Materials and components | Interior panel fire rating HL1/HL2/HL3 | +| EN 14752 | Door systems — Safety requirements | Obstacle detection, emergency egress | +| EN 13749 | Railway applications — Wheelsets and bogies — Bogie frame structural requirements | Bogie frame static/fatigue analysis | +| EN 14363 / UIC 518 | Testing and simulation for acceptance of running characteristics | Derailment criteria, ride quality | +| EN 13260 | Wheelsets — Requirements | Wheelset assembly quality | +| EN 13261 | Axles — Requirements | Axle material, fatigue design | +| EN 13262 | Wheels — Requirements | Wheel material grades ER7/ER8/ER9 | +| EN 13103/13104 | Axles — Design method | Fatigue strength calculation | +| EN 13979-1 | Wheels — Technical approval procedure | Wheel material test requirements | +| UIC 541-3 | Brakes — Disc brakes and their application | Disc brake thermal performance | +| UIC 541-05 | Brakes — Wheel Slide Protection (WSP) | WSP adhesion utilization >75% | +| UIC 544-1 | Brakes — Braking power | Brake weight percentage | +| EN 14531 | Braking systems — Performance | Stopping distance and deceleration | +| ISO 281:2007 | Rolling bearings — Dynamic load ratings and rating life | TBU bearing life calculation L_10mh | +| EN 12082 | Axlebox — Performance testing | TBU bearing test requirements | +| EN 50126 / IEC 62278 | RAMS for railway applications | System reliability/availability targets | +| EN 50128 | Software for railway control and protection | Signaling software SIL requirements | +| EN 50129 | Safety-related electronic systems for signaling | Safety case for CBTC | +| EN 50159 | Communication for safety-related systems | Radio transmission for CBTC | +| IEC 62290 | Urban guided transport management — UGTMS | Grades of Automation GoA1–GoA4 | +| EN 50119 | Overhead contact lines | OCS design and quality | +| EN 50163 | Traction supply voltages | Voltage tolerances at pantograph | +| EN 50122 | Protective provisions — Stray current and touch potential | Return current and earthing | +| EN 50388 | Interface between rolling stock and traction systems | Pantograph-catenary interface | +| UIC 794 | Pantograph-catenary dynamic interaction | Contact force, contact loss limits | +| EN 13848 | Track geometry quality | Track geometry tolerances TQI | +| EN 13450 | Aggregates for railway ballast | Ballast gradation | +| EN 13674 | Railway rails — Vignole rails | Rail profiles UIC60/E1 | +| EN 13715 | Wheels — Tread profiles | S1002, XP55 tread geometry | +| EN 15313 | Wheels — In-service maintenance | Wheel wear limits and reprofiling | +| EN 14750-1 | Air conditioning for urban and suburban rolling stock | HVAC noise and performance | +| EN 13272 | Emergency lighting in railway vehicles | Emergency lighting autonomy | +| TSI ENE (EU 1301/2014) | Technical Specification for Interoperability — Energy | Catenary voltage, pantograph interface | +| TSI LOC&PAS (EU 1302/2014) | TSI — Locomotives and passenger rolling stock | Vehicle compliance requirements | +| TSI PRM (EU 1300/2014) | TSI — Persons with Reduced Mobility | Accessibility, wheelchair access | +| EN 10025 | Hot rolled products of structural steels | S355J2, S500Q for bogie frame | +| EN 10213 | Steel castings for pressure purposes | G20Mn5 cast bogie frame | +| EN 10089 | Hot-rolled steels for quenched and tempered springs | 51CrV4 spring steel | +| EN 15663 | Definition of vehicle reference masses | AW0/AW1/AW2/AW3/AW4 load states | +| EN 15220 | Interface between vehicle and infrastructure | Wheel-rail kinematic gauge | +| EN 12299 | Ride comfort for passengers | NMV ride comfort index | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| High-Speed Train | Alstom | TGV M (Avelia Horizon) | 350 km/h, distributed power, Al body | +| High-Speed Train | Siemens Mobility | Velaro Novo | 360 km/h, 15% less energy, Al extrusion body | +| High-Speed Train | CRRC | CR400AF/BF Fuxinghao 复兴号 | 350 km/h, 16-car, Al body FSW | +| Regional EMU | Alstom | Coradia Stream/iLint | 160 km/h, Al body, H₂ fuel cell option | +| Regional EMU | Siemens | Mireo | 140–200 km/h, lightweight, SiC traction | +| Regional EMU | Stadler | FLIRT / KISS | 160–200 km/h, modular platform | +| Metro | CRRC | Standardized Metro (Type A/B) | 80–100 km/h, Al extrusion body | +| Metro | Alstom | Metropolis | 80–100 km/h, modular interior | +| Metro | Siemens | Inspiro | 90 km/h, lightweight Al body | +| Bogie (HS Powered) | Alstom | TGV bogie (Y237) | 320–350 km/h, yaw damper, anti-roll | +| Bogie (HS Trailer) | Siemens | SF500 | 350 km/h, bolsterless, air spring | +| Bogie (Metro) | CRRC | ZM series | 80–100 km/h, rubber chevron primary | +| Bogie (Metro) | Bombardier/Alstom | FLEXX Metro | 80–100 km/h, inside-frame bearing | +| Wheelset | Lucchini RS (Jinxi Axle) | Forged monobloc ER8/ER9 | φ920mm, S1002/XP55 profile | +| Wheelset | Bonatrans GHH | Monobloc wheel + hollow axle | High-speed, <17t axle load | +| Bearing (TBU) | SKF / FAG (Schaeffler) | TBU 130×230 / TBU 150×270 | Sealed cartridge, L_10mh > 3M km | +| Bearing | NTN / NSK | Tapered roller TBU | Japan Shinkansen certified | +| Brake Disc (HS) | Knorr-Bremse | Axle-mounted, vented CGI | φ640–φ720mm, 550°C max | +| Brake Pad | Knorr-Bremse / Wabtec | Sintered Cu-Fe | μ = 0.35, <500°C continuous | +| Brake Control | Knorr-Bremse | EP2002 / EP Compact | Per-axle WSP, regenerative blending | +| Brake Control | Wabtec / Faiveley | EP-A / EP Cap | UIC/AAR compatible | +| WSP System | Knorr-Bremse | MGS2 / MGS3 | Axle/bogie WSP, ε > 0.75 | +| HVAC | Liebherr Transportation | DVKS | 30–50kW, R513A, CO₂ DCV | +| HVAC | Merak (Knorr-Bremse) | Aquarius | Rooftop packaged, COP > 2.5 | +| Door System | Knorr-Bremse / IFE | S1000 / RLS sliding plug | 1M cycles MCBF, <150N obstacle | +| Door System | Wabtec / Faiveley | Citylink / Rubis | Sliding plug, EN 14752 certified | +| Gangway | Huebner / Deliner | Corrugated bellows / U-shaped | ±15° yaw, HL2/HL3 fire rated | +| Signaling (CBTC) | Thales | SelTrac G8 | Moving block, 90s headway, LTE/WiFi | +| Signaling (CBTC) | Siemens | Trainguard MT | CBTC + ATO, GoA4 capable | +| Signaling (CBTC) | Alstom | Urbalis 400 | CBTC, WiFi/LTE, station stop ±0.3m | +| Signaling (CBTC) | CRSC (Casco) | TACS / FAO | Fully automatic operation, GoA4 | +| Signaling (ETCS) | Alstom / Siemens / Thales | ETCS L2 Baseline 3 | Eurobalise + GSM-R/FRMCS | +| Pantograph | Schunk / Faiveley | WBL / GPU | Carbon strip, ADD, 70–90N | +| Pantograph | Stemmann (Wabtec) | DSA series | Single-arm, high-speed 350 km/h | +| Catenary (HS) | Siemens / Alstom / CRRC | Re250 / SICAT H | Autotensioned, Cu-Ag 120mm² | +| Rail | voestalpine Railway Systems | UIC60/E1 R350HT | Head hardened, 120m lengths | +| Rail | British Steel / Tata | R260/R350HT | 108m lengths, FBW welded | +| Fastening | Vossloh | System 300 (SKL W-tension) | 10kN clamping, elastic | +| Fastening | Pandrol | Fastclip FE / e-Clip | 11–14kN toe load | +| Slab Track | CRTS / Rheda | CRTS III / Rheda 2000 | Ballastless, HS >350 km/h | +| Substation (AC) | Siemens / ABB / CRRC | 25kV traction transformer | 25–40 MVA, 50Hz | +| Substation (DC) | Siemens / Sécheron / CRRC | 12/24-pulse rectifier | 750V/1.5kV, 2–5MW | + +--- + +## Acceptance Criteria + +1. **Car Body Structure & Assembly (必选):** Engine shall design car body with configurable aluminum alloy (6005A/6082/7020) or stainless steel (1.4003/301L) per EN 12663 categories P-I through P-V. FSW welding parameters (tool RPM, traverse speed, axial force, double-sided overlap) shall compute weld strength >70% of parent material. Underframe crash energy absorption per EN 15227 C-I/II/III with collapsible zone energy absorption and Euler buckling check (P_cr = π²EI/(KL)²) shall be verified. Driver cab windshield laminate (EN 15152) and modular cab crash structure shall be configurable. + +2. **Interior & Auxiliary Systems (必选):** Engine shall design seating layouts (2+2, 2+1, longitudinal bench) per EN 14752 ergonomics with configurable pitch (430–1,300mm), width, and H-point. HVAC system shall calculate heat load (solar + transmission + ventilation + passenger) and size cooling/heating capacity with refrigerant R407C/R513A and CO₂ DCV. Auxiliary power converter (IGBT topology, >92% efficiency) with battery sizing (NiCd/LiFePO₄) for 90-minute emergency autonomy shall be designed. Interior panel fire rating HL2/HL3 per EN 45545-2 shall be validated. Standing density AW2/AW3/AW4 per EN 15663 shall be reported. + +3. **Door & Gangway Systems (必选):** Engine shall design sliding plug doors with BLDC drive (50–150W), solenoid lock, and sensitive edge obstacle detection (<150N activation, <300N peak). Door open/close time (<3.0s), MCBF (>1M cycles), and pressure seal leakage (<0.05 m² equivalent at 1,000 Pa) shall be verified. Inflatable seal activation for high-speed (>200 km/h) shall be configurable. Gangway designs (corrugated bellows, articulated frame, wide-body) with articulation range (±15° yaw, ±5° roll, ±50mm longitudinal) and HL2/HL3 fire rating shall be provided. Emergency egress compliance per EN 14752 and TSI PRM shall be checked. + +4. **Bogie Frame & Suspension (必选):** Engine shall design welded box-section bogie frames (S355J2 or S500Q) with static/dynamic load cases per EN 13749. Primary suspension (steel coil 51CrV4 or rubber chevron) with configurable stiffness per axis and natural frequency (1.5–3.0 Hz). Secondary air spring (convoluted or rolling lobe) with auxiliary reservoir (50–100L), 3-position levelling valve (±3–5mm deadband, 2–5s delay), and emergency rubber spring. Anti-roll torsion bar, yaw damper (hydraulic telescopic), and traction linkage (center pivot or Z-link) shall be designed. Hunting stability (Klingel formula, V_crit > 1.2 × V_max) and derailment safety (Nadal Y/Q, Prud'homme ΣY, wheel unloading <60%) shall be verified per EN 14363 / UIC 518. + +5. **Wheelset & Bearing (必选):** Engine shall design monobloc forged wheels (ER7/ER8/ER9) with configurable tread profiles (S1002, XP55) and rolling circle diameter (φ730–φ920mm). Axle design (EA1N or EA4T, solid or hollow) with fatigue safety verification per EN 13103/13104 using Haigh/Goodman diagram (n > 1.5). Double-row tapered roller bearing TBU with ISO 281:2007 L_10mh life calculation (>2.0–4.0M km) including viscosity ratio κ, contamination factor η_c, and fatigue load limit P_u. Wheel-rail contact ellipse (Hertzian), contact pressure (<1,100 MPa), equivalent conicity (0.10–0.40), and wear rate (Archard law) shall be computed. Wheel reprofiling interval and bearing life shall be estimated. + +6. **Brake System (必选):** Engine shall design EP brake control with load weighing (k_load), regenerative/friction blending (k_blending), and brake cylinder pressure control via proportional valve. Disc brake (CGI, φ610–φ750mm, vented) with sintered pads (μ = 0.35) per UIC 541-3, including thermal analysis (convective cooling, repeated stop temperature check <500°C). Tread brake with composite blocks (K/LL-block, μ = 0.25–0.35). Stopping distance calculation (v²/(2×a_eff) + v×t_reaction) for service (0.8–1.2 m/s²) and emergency (>1.2 m/s²) per UIC 544-1. WSP with phonic wheel speed sensing, slide detection (deceleration 6–8 m/s²), dump/hold/apply cycle control, and adhesion utilization ε > 0.75 per UIC 541-05. Parking brake spring-applied on 5% gradient shall be verified. + +7. **Signaling & CBTC (必选):** Engine shall design CBTC architecture (ZC, VOBC, CI, ATS) with moving block movement authority (MAL). ATP shall compute emergency brake intervention curve (EBIC) with reaction time, service brake curve (SBI), and speed supervision thresholds (warning +2 km/h, service brake +5 km/h, emergency +10 km/h). ATO shall model 4-phase optimal driving (acceleration/cruising/coasting/braking) with station stop precision ±0.3m. Eurobalise telegrams (1,023-bit, Packets 5/12/21/27) and odometry Kalman filter localization (±5m, balise re-reference every 200–500m) shall be supported. GoA levels 1–4 with LTE-M radio (<50ms latency, >99.999% availability). Headway calculation (H_min = (L_train + L_safety + L_brake) / v_line) for moving block and 3-aspect fixed block, capacity (C = 3600/H_min tph), junction penalty, and SIL 4 train detection integrity shall be verified. + +8. **Traction Power & Track (必选):** Engine shall design overhead catenary (AC 25kV, contact wire Cu-Ag 120mm²/Cu-Mg 150mm², 10–20 kN autotensioned) with pantograph dynamic interaction (F_contact, σ_F < 30 N for V≤200 km/h, σ_F < 0.00097×V² for V>200 km/h) per UIC 794. Wave propagation speed c_w = sqrt(T/ρ) must exceed 1/train speed ratio > 0.7. Third rail DC 750V with composite conductor rail and carbon collector shoe. Traction substation (12/24-pulse or IGBT AFE) with voltage drop calculation and minimum voltage check per EN 50163. Track design with UIC60/E1 rail (R260/R350HT), elastic fastening (Vossloh SKL/Pandrol Fastclip, 9–12 kN clamping), ballasted or slab track (CRTS I/II/III, Rheda), geometry (gauge ± tolerances, cant = 11.8×V²/R, twist <1:300), and turnout design (No. 6 through No. 42, diverging speed, flangeway gap). Rail welding (FBW and Thermit aluminothermic) and track maintenance interval MGT shall be estimated. + +9. **Performance Integration (必选):** Engine shall support end-to-end railway engineering workflow: car body design → interior layout → door integration → bogie design → wheelset selection → brake configuration → signaling design → traction power & track layout. All tolerances, load distributions, and material properties shall propagate through the chain. Design-to-build traceability, axle load management (tare/AW0/AW1/AW2/AW3), and configuration control shall be maintained. + +10. **Unit Consistency (必选):** All functions shall accept and return SI-derived units with railway conventions: dimensions in mm (structure) or m (alignment/track length), force in N or kN, mass in kg, pressure in bar (pneumatics) or Pa (structure), speed in km/h (vehicle) or m/s (physics), temperature in °C, frequency in Hz, torque in N·m, energy in J/kJ/MJ, stress in MPa, stiffness in N/mm or kN/mm, electrical power in kW or MW, voltage in V or kV, current in A, resistance in Ω, angular measurements in degrees or radians as appropriate for formula context. + +11. **Regulatory Compliance (必选):** Engine shall verify compliance with key regulatory frameworks: EN 12663 (body structure), EN 15227 (crashworthiness), EN 45545-2 (fire safety), EN 14752 (doors), EN 13749 (bogie frame), EN 14363/UIC 518 (dynamics/derailment), EN 13260/13261/13262 (wheelset), UIC 541-3/541-05/544-1 (brakes), EN 14531 (braking), ISO 281 (bearings), EN 50126/128/129 (RAMS/signaling), IEC 62290 (GoA), EN 50119/50163/50388 (energy/power), UIC 794 (catenary-pantograph), EN 13848 (track geometry), EN 15313 (wheel maintenance), EN 14750-1 (HVAC), EN 13272 (emergency lighting), EN 15663 (load states), EN 12299 (ride comfort), and TSI ENE/LOC&PAS/PRM (interoperability). diff --git a/docs/feedback/VDE-1147.md b/docs/feedback/VDE-1147.md new file mode 100644 index 000000000..7090070c6 --- /dev/null +++ b/docs/feedback/VDE-1147.md @@ -0,0 +1,3418 @@ +# VDE-1147: Shipbuilding Equipment Engine Requirements (船舶建造设备引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign ShipbuildingEngine — hull structure & block assembly, marine propulsion & shafting, piping & fluid systems, accommodation & outfitting, electrical & power systems, navigation & automation, cargo handling systems, launching/docking & sea trials +**Module**: `vde/shipbuilding/hull_assembly.h`, `vde/shipbuilding/propulsion.h`, `vde/shipbuilding/outfitting.h`, `vde/shipbuilding/marine_systems.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Shipbuilding / Marine / Hull / Propulsion / Outfitting / Cargo + +--- + +## Background + +Shipbuilding is one of the oldest and most complex heavy industries, producing vessels ranging from small coastal craft to ultra-large container ships (ULCS, 24,000+ TEU), Very Large Crude Carriers (VLCC, 300,000+ DWT), LNG carriers (266,000 m³), cruise ships (6,000+ passengers), and naval combatants. The global shipbuilding industry is dominated by the "Big Three" — China (CSSC: Dalian, Jiangnan, Hudong-Zhonghua), South Korea (HD Hyundai Heavy, Samsung Heavy, Hanwha Ocean/DSME), and Japan (Mitsubishi, Imabari, JMU) — which together account for over 90% of global tonnage output. Ship construction follows a block assembly methodology where the hull is divided into hundreds of mid-size "blocks" (200–500 tonnes each) fabricated in covered workshops, then erected in the dry dock or on the slipway in a carefully sequenced build strategy. + +Hull structure design begins with the midship section scantling per classification society rules (Lloyd's Register, DNV, ABS, BV, CCS, ClassNK) based on IACS Common Structural Rules (CSR). Steel plates (EH36, DH36, AH36 high-tensile steel, 6–80mm thickness) are cut by CNC plasma/oxyfuel or laser, edge-prepared by milling/grinding, and formed by 3-roll pyramid/4-roll plate bending rolls or hydraulic frame presses. Stiffener profiles (T-bars, bulb flats, angle bars) are fillet-welded to panels on automated panel lines with flux-cored arc welding (FCAW) or submerged arc welding (SAW). Blocks are assembled on jigs with ±2–3mm dimensional tolerance, and the completed hull undergoes dimensional survey using total stations and laser scanning. + +Marine propulsion systems range from low-speed two-stroke crosshead diesel engines (MAN B&W ME-GI, WinGD X-DF, 50,000–108,920 BHP at 70–105 RPM) directly coupled to fixed-pitch propellers via intermediate shafts and stern tube bearings, to medium-speed four-stroke engines (Wärtsilä 31/46, MaK, Rolls-Royce Bergen) driving controllable-pitch propellers (CPP) through reduction gearboxes. LNG dual-fuel engines (ME-GI Diesel cycle, X-DF Otto cycle) meet IMO Tier III NOx with EGR or SCR. Electric propulsion with azimuth thrusters (ABB Azipod, Rolls-Royce Mermaid, Schottel) offers superior maneuverability for cruise ships, icebreakers, and offshore vessels. The shafting system includes intermediate shafts (forged steel, 300–900mm diameter), plummer block bearings (white metal, forced lubrication), stern tube with seawater-lubricated Thordon/Water-lubricated or oil-lubricated white metal bearings, and the propeller (Ni-Al-Bronze, 4–7 blades, 5–11m diameter, skewed design for cavitation reduction). + +Ship piping and fluid systems form the vascular network of the vessel, transporting seawater, freshwater, fuel oil, lube oil, bilge water, ballast water, firefighting water, compressed air, steam, and exhaust. Ballast systems manage vessel trim and stability with capacities of 50,000–200,000 m³ for large tankers, using ballast pumps (1,000–5,000 m³/h centrifugal), remote-operated butterfly valves, and water treatment (BWTS: UV + filtration or electro-chlorination) per IMO D-2 standard. Bilge systems with oily water separators (OWS, 15 ppm alarm) handle engine room and cargo hold drainage. Fuel oil systems include HFO heated storage/settling/service tanks, purifiers (Alfa Laval/Westfalia centrifugal), and viscosity control for injection. Firefighting systems span CO₂ total flooding (engine room), water mist (Hi-Fog, Marioff), foam (deck foam monitors), and sprinkler/drencher systems. + +Accommodation and outfitting cover the living quarters (crew cabins, mess rooms, recreation), navigation bridge, machinery control room (MCR), and public spaces (on cruise ships/passenger ferries). Accommodation blocks are typically prefabricated as modular cabins (steel sandwich panel or GRP) with integrated MEP (mechanical, electrical, plumbing), lifted onboard as complete units. Interior outfitting must meet SOLAS fire safety (A-60/A-30/A-15 fire divisions), IMO noise limits (<60 dB(A) in cabins, <65 dB(A) in mess rooms), and vibration criteria (ISO 6954). HVAC systems provide heating, ventilation, and air conditioning with chilled water plants (200–5,000 kW cooling capacity) and air handling units with fire/smoke dampers at zone boundaries. Sound and vibration isolation uses floating floors, resilient mounts, and acoustic insulation. + +Electrical and power systems on modern vessels are MVAC (6.6kV/11kV) generation and distribution, driven by diesel generators (3–6 units, 500–20,000 kWe each) or shaft generators (PTO/PTI). The main switchboard distributes to emergency switchboard, section boards, and sub-distribution panels with air circuit breakers (ACB) and molded case circuit breakers (MCCB). Integrated automation systems (IAS) provide machinery monitoring (5,000–20,000 I/O points), alarm management, and PMS (Power Management System) for generator load sharing and blackout prevention. Navigation systems include ECDIS (Electronic Chart Display), radar (X-band 9.4GHz + S-band 3.0GHz), DGPS/GNSS, AIS, gyrocompass, autopilot (heading/track control), echo sounder, speed log (Doppler/electromagnetic), and GMDSS radio communications. + +Cargo handling systems differ dramatically by vessel type: tankers use cargo oil pumps (steam turbine/electro-hydraulic, 2,000–5,000 m³/h), inert gas systems (IGS with flue gas or N₂ generator, O₂ < 5%), and crude oil washing (COW). LNG carriers use membrane (GTT Mark III/NO96) or Moss spherical Type-B tanks with cryogenic cargo pumps (submerged electric, 1,500–2,000 m³/h), reliquefaction or boil-off gas management. Container ships use cell guides (50–100mm flat bar, ±3mm tolerance) and lashing bridges with twistlock foundations. Bulk carriers use self-unloading systems (hopper + conveyor belt, up to 6,000 t/h) or grab cranes. Ro-Ro/Ro-Pax ferries use stern/bow ramps (25–60 tonnes capacity), hoistable car decks, and internal ramp systems. + +Launching methods include floating-out from dry dock (most modern large vessels), end/side launching from slipway with launch cradle and trigger mechanism, and float-off from semi-submersible heavy-lift ships for very large offshore structures. Sea trials verify speed (at design/ballast draft, measured mile, DGPS speed trial per ISO 15016), endurance, manoeuvrability (turning circle, zigzag 10°/10°, crash stop per IMO Resolution MSC.137), noise/vibration, machinery performance, and cargo system commissioning. After delivery, dry docking occurs every 2.5–5 years (per class) for hull survey, blasting/painting, sea chest inspection, propeller/rudder inspection, and shaft withdrawal. + +Leading benchmarks include shipbuilders: HD Hyundai Heavy Industries (Ulsan, world's largest shipyard, VLCC/ULCS/LNG), Samsung Heavy Industries (Geoje, LNG carriers/FLNG/drillships), Hanwha Ocean/DSME (Okpo, LNG/ULCS/submarines), CSSC Jiangnan (Shanghai, LNG/ULCS/warships), CSSC Dalian (VLCC/ULCS), CSSC Hudong-Zhonghua (Shanghai, LNG carriers), Mitsubishi Heavy Industries (Nagasaki/Kobe), Imabari Shipbuilding (Japan's largest, bulk/car carriers/containers), Fincantieri (Monfalcone/Marghera/Sestri, cruise ships/naval), Meyer Werft (Papenburg/Turku, cruise ships, largest under-cover building docks), Chantiers de l'Atlantique (St. Nazaire, cruise ships), Damen (standardized workboats/offshore/frigates). Marine equipment: MAN Energy Solutions (2-stroke ME engines, 4-stroke GenSets), WinGD/Wärtsilä (2-stroke X-DF/RT-flex, 4-stroke, propulsion packages), ABB Marine (Azipod electric propulsion, IAS automation), Rolls-Royce Marine (now Kongsberg Maritime: propellers, thrusters, automation), Kongsberg Maritime (K-Chief IAS, DP, navigation), Schottel (azimuth thrusters, CPP propellers), Wärtsilä (ballast water treatment, scrubbers, cargo handling), Alfa Laval (separators, BWTS, heat exchangers), MacGregor (cargo cranes, hatch covers, Ro-Ro equipment), TTS (now MacGregor), and class societies: Lloyd's Register, DNV, ABS, Bureau Veritas, CCS, ClassNK, RINA. + +VDE currently lacks: +- Hull structure & block assembly design (mid-ship section scantling per IACS CSR, plate nesting/NC cutting optimization, panel line stiffener fillet welding parameters, block dimensional tolerance stack-up, hull erection sequence/network, welding distortion prediction with inherent strain method, dimensional survey with total station/laser scanning) +- Marine propulsion & shafting design (2-stroke low-speed diesel engine performance curves and SFOC/SEC maps, shaft alignment per classification rules (bearing reactions, bending stress, slope), propeller design (B-series Wageningen, Kaplan, controllable-pitch mechanism), stern tube bearing analysis (oil film or water lubricated), vibration analysis (torsional, axial, lateral/whirling), reduction gear design (single/double helical, epicyclic) +- Piping & fluid systems design (pipe routing optimization, pressure drop calculation per Darcy-Weisbach, pump sizing/selection, valve Cv-sizing, pipe stress analysis per ASME B31.3, ballast water management per IMO D-2 with treatment capacity, bilge/OWS system 15 ppm compliance, firefighting system hydraulic calculations, exhaust gas backpressure limits) +- Accommodation & outfitting design (modular cabin manufacturing with MEP integration, accommodation block lifting/lashing, fire insulation A-60/A-30/A-15 per SOLAS II-2, HVAC cooling load/chilled water plant design, noise prediction per SEA (Statistical Energy Analysis), vibration criteria ISO 6954, public space layout for cruise/passenger vessels, galley/laundry/sanitary system design) +- Electrical & power systems design (diesel generator load sharing/parallel operation, short-circuit current calculation per IEC 61363, protection coordination/discrimination, harmonic analysis with AFE/VFD drives, power management system PMS load-dependent start/stop, shaft generator PTO/PTI with frequency converter, emergency power system per SOLAS II-1/D.2, EMC/shielding for sensitive navigation equipment) +- Navigation & automation design (IAS integrated automation system channel/loop count, ECDIS ENC/SENC chart management, radar clutter/sensitivity time control STC curve, DP dynamic positioning capability plot per IMCA M 140, autopilot PID tuning with yaw rate feedback, GMDSS area A1/A2/A3/A4 equipment configuration, gyrocompass heading accuracy <0.1° secant latitude) +- Cargo handling systems design (tanker cargo pump/pipe hydraulic analysis, inert gas generator capacity O₂ < 5%, LNG membrane tank sloshing analysis, LNG boil-off rate 0.10–0.15%/day, container cell guide tolerance stack, Ro-Ro ramp hydraulic/power unit design, bulk carrier cargo hold FEM structural analysis, hatch cover hydraulic/electric drive design, crane pedestal fatigue analysis) +- Launching/docking & sea trials design (floating dock/submerged dock buoyancy/stability calculations, slipway launching kinematics (pivoting at rocker, tilting moment), dry dock block arrangement/layout, sea trial speed-power curve per ISO 15016 with wind/wave/current correction, manoeuvring trial IMO standards (advance/transfer, tactical diameter), crash stop distance from full ahead to full astern, shaft power measurement with strain gauge/torsion meter) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native shipbuilding equipment engine. + +--- + +## Detailed Requirements + + +### 1. Hull Structure & Block Assembly (P1) + +#### 1.1 Steel Plate Processing, Panel Line, Block Assembly, and Hull Erection + +``` +Hull structure & block assembly overview: + Modern shipbuilding uses block construction method where hull is divided + into blocks (200–500 tonnes) fabricated in covered workshops with + automated panel lines, then erected in dry dock in keel-to-superstructure + sequence. Steel plates (EH36/DH36/AH36) are NC-cut, formed, and welded + with SAW/FCAW processes. Classification society rules (IACS CSR) govern + scantlings, material grades, and inspection. + +Steel plate stockyard and processing: + Material grades: + AH36: normal strength, R_eH ≥ 355 MPa, for non-critical structures + DH36: higher toughness, Charpy at −20°C, for shell/bottom/deck + EH36: extra toughness, Charpy at −40°C, for Arctic/ice-class + FH36: −60°C Charpy, cryogenic (LNG tank boundary) + H40/H47: ultra-high tensile, R_eH ≥ 390/460 MPa, for ULCS/containers + + Plate dimensions: + Length: 6–25 m (limited by rolling mill and transport) + Width: 1.5–5 m (standard 3–4m for automated panel line) + Thickness: 6–80 mm (bottom shell 15–25mm, side shell 12–20mm, deck 12–40mm, + sheer strake 25–40mm, hatch coaming 30–60mm) + + NC plate cutting: + Plasma cutting (dry): + Cutting speed: 500–3,000 mm/min (depends on plate thickness and amperage) + Kerf width: 2–4 mm (taken into account by nesting software) + Pierce delay: 0.5–2.0 s (for initial penetration) + + Oxyfuel cutting: + For carbon steel >10mm thickness + Cutting speed: 300–700 mm/min (25mm plate: ~500 mm/min) + Preheat flame + cutting oxygen jet + + Laser cutting (HAL): + Fiber laser 6–25 kW + Cutting speed: 2,000–8,000 mm/min (10mm plate) + Kerf: 0.5–1.5 mm (narrower, better precision) + Mainly for thin plate (<20mm) + + Marking: + Inkjet or plasma marking for: part ID, weld seam numbers, block number + CNC marking head integrated with cutting torch + + Nesting optimization: + Objective: maximize material utilization (target >85% for large block, >75% for small parts) + Constraints: part spacing (5–10mm between parts), skeleton width, no-overlap + Algorithm: heuristic (bottom-left-fill) or genetic algorithm + Common cut (shared path between adjacent parts) reduces kerf waste + + Plate forming: + 3-roll pyramid bending: + Top roll (fixed), two bottom rolls (adjustable height) + Workpiece fed back-and-forth, incremental bending + Minimum bending radius: R_min = (t × E) / (2 × σ_y) (elastic recovery included) + Typical radii: R = 500–3,000mm (shell plate curvature) + + 4-roll plate bending (pinch-pyramid): + Two central driven rolls pinch plate, two side rolls bend + Single pass forming (more productive than 3-roll) + CNC-controlled roll positions for compound curvature + + Frame press (hydraulic): + Stroke: 200–800mm, force: 1,000–5,000 tonnes + Male/female die sets for curved stiffener profiles + Press brake for 90° flange bending + + Line heating (manual/robot): + Oxy-acetylene torch applies linear heat pattern + Local thermal expansion/contraction → permanent curvature + Temperature: 650–750°C (below melting, austenitic range) + Heat line spacing: 20–50mm + Speed: 5–15 mm/s + Robot line heating: laser + water cooling, CNC controlled + +Panel line (automated stiffened panel production): + Panel assembly sequence: + Step 1: Butt welding of plates into larger panel + Single-side SAW (Submerged Arc Welding) with flux backing + Two-side SAW (turnover + second pass) for thicker plates + Weld parameters: + Current: 600–1,200 A (DC+ for penetration, AC for fill) + Voltage: 28–36 V + Travel speed: 400–800 mm/min + Wire diameter: φ3.2–φ4.8mm + Weld bead: flush ground after completion + + Step 2: Stiffener positioning + Gantry or robotic placement + Stiffener types: T-bar (built-up), bulb flat (hot-rolled), angle bar, flat bar + Magnetic/pneumatic clamping + Tack weld: MIG/MAG, 50–100mm length, every 500mm + + Step 3: Fillet welding of stiffeners to plate + FCAW (Flux-Cored Arc Welding): + Position: PB/PA (horizontal-vertical fillet) + Current: 250–400 A, voltage: 26–34 V + Travel speed: 300–600 mm/min + Deposition rate: 8–15 kg/h + Twin-wire SAW for long longitudinal stiffeners: + Higher deposition rate (15–25 kg/h) + Reduced distortion (balanced heat input) + + Step 4: Inspection + Visual (VT): surface cracks, undercut, overlap, porosity + Ultrasonic (UT): butt weld internal defects (phased array for speed) + Magnetic particle (MT): surface/subsurface cracks (for surface-breaking) + Radiography (RT): for critical butt welds (e.g., sheer strake, bilge keel) + +Block assembly: + Block types: + Flat block: bottom shell, deck, longitudinal bulkhead panels + Curved block: bow/stern sections (compound curvature) + Sub-assembly: smaller units (3D) before mega-block joining + + Block jig: + Pin jig: matrix of adjustable-height support pins (100–200mm pitch) + Master jig: fixed frame for repetitive blocks (series production) + Alignment: laser level + total station + Tolerance: length ±3mm, breadth ±2mm, squareness ±2mm over 10m diagonal + + Block welding sequence: + Stiffener-to-panel fillet welds → transverse frame to stiffener → + side shell + longitudinal BHD + deck joining → block stiffening + + Distortion control: + Pre-set: opposite direction camber to compensate welding shrinkage + Angular distortion of fillet weld: + φ = 0.1–0.3 × (Q_net / t²)^0.5 [rad] (simplified empirical) + Q_net = net heat input [J/mm] = η × U × I / v + η = 0.8 (SAW), 0.85 (FCAW) + Transverse shrinkage of butt weld: + ΔL_t = 0.15 × A_w / t + b [mm] + A_w = cross-sectional area of weld [mm²], t = plate thickness [mm], b ≈ 0.2–0.5mm + Longitudinal shrinkage: + ε_L = 0.2 × A_w × L / (A_plate × E) [mm/mm] + + Welding sequence: + Back-step welding: short segments, reverse direction + Skip welding: alternate locations (distribute shrinkage) + Symmetric welding: two welders simultaneously on opposite sides + + Strong-back/stiffening: + Temporary stiffeners (flat bar/angle) bolted/welded across free edges + Prevent buckling during lifting/turning + Removed after block completion + +Block painting: + Surface preparation: SA 2½ (near-white blast cleaning, ISO 8501-1) + Profile: 30–75 µm (R_z) + Coating system: + Shop primer (pre-construction): zinc silicate, 15–25 µm DFT + Block coating: epoxy anti-corrosive (2×100–150 µm DFT) + PU topcoat (50 µm) + Ballast tank: light-colored epoxy (2×160 µm DFT, stripe coat at edges) + Stripe coating: brush-applied extra coat at free edges, scallops, stiffener ends + +Hull erection in dry dock: + Erection sequence: + Keel laying → bottom blocks → side shell blocks → longitudinal bulkheads → + inner bottom → deck blocks → superstructure blocks + + Keel block arrangement: + Concrete keel blocks at 1.0–1.5m spacing along centerline + Height: 1.2–1.8m (working clearance underneath) + Load capacity: 100–300 tonnes per block + + Block erection joint: + Butt joint alignment: ±2mm plate edge mismatch + Root gap: 2–4 mm (for ceramic backing), 4–6 mm (for manual root pass) + Strong-backs: welded across joint at 500–800mm spacing + Dog/lug plate: for pulling/pushing blocks into position + Hydraulic ram: 10–50 tonnes, stroke 50–150mm for fine adjustment + + Erection welding: + Joint preparation: single-V (30–35° included angle, root face 1–2mm) + Ceramic backing bar: enables one-side SAW welding + Weld sequence: root pass (FCAW) → fill (SAW) → cap (SAW) + Weld shrinkage allowance: 2–4mm per joint (included in block dimension) + + Dimensional control: + Total station (Leica TS60, accuracy ±0.6mm + 1ppm): + Measure control points on block (reflector targets or reflectorless) + Compare to CAD model (3D deviation analysis) + Laser tracker (hexagon AT960): for critical alignment (stern tube, rudder horn) + Photogrammetry: for large-area hull form measurement + +Block lifting: + Lifting lugs: + Design per classification rules: pad eye, pinhole, or trunnion type + Capacity: 1.5× block weight (lifting, safety factor 4:1 on yield) + Material: EH36, through-thickness (Z-quality) for tensile loads + Finite element analysis (FEA): check local stress at lug attachment + + Goliath gantry crane: + Lifting capacity: 600–1,600 tonnes (for mega-block) + Span: 150–200 m (across dry dock width) + Hook arrangement: main hook (800t) + auxiliary hook (200t) + Spreader beam: triangular frame for 3-point or 4-point lift + Sling: wire rope (φ52–100mm) or synthetic (Dyneema, lighter) + + Multi-crane tandem lift: + For blocks exceeding single crane capacity + Load sharing controlled by load cells and synchronized control + Safety factor increased for tandem: >1.7× block weight per crane + +Block erection sequence logic (network): + Each block has: + - Predecessor blocks (must be in place before this block) + - Erection window (earliest/latest date) + - Duration (positioning + welding + inspection = 2–5 days per block) + - Resource requirement (crane, welding teams, staging) + + Critical path: longest chain through block network + Mega-block pre-outfitting: maximize work completed before erection + Outfitting ratio (at block stage): >85% for series production +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class SteelGrade { AH36, DH36, EH36, FH36, H40, H47, Mild_Steel_A }; +enum class CuttingMethod { Plasma_Dry, Plasma_Underwater, Oxyfuel, FiberLaser }; +enum class FormingMethod { PressBrake, RollBend_3Roll, RollBend_4Roll, LineHeating, FramePress }; +enum class WeldProcess_Block { FCAW_SingleWire, FCAW_Tandem, SAW_SingleWire, SAW_TwinWire, + MIG_SolidWire, ManualSMAW }; +enum class BlockType { Flat_Bottom, Curved_Bow, Curved_Stern, Deck, LongitudinalBHD, + TransverseBHD, Superstructure, SubAssembly }; +enum class NDT_Method { Visual_VT, Ultrasonic_UT, MagneticParticle_MT, Radiography_RT, + PhasedArray_UT, Penetrant_PT }; +enum class SurfacePrep { SA1_BrushBlast, SA2_Commercial, SA2_5_NearWhite, SA3_WhiteMetal }; + +struct PlateSpec { + SteelGrade grade; + double thickness_mm; + double width_mm; + double length_mm; + double yield_strength_MPa; + double tensile_strength_MPa; + int charpy_temperature_C; // −20, −40, −60 +}; + +struct NCOperationSpec { + CuttingMethod method; + double cutting_speed_mm_per_min; + double kerf_mm; + double pierce_delay_s; + std::string part_id; + std::string dxf_geometry_path; + bool requires_bevel; // weld edge preparation + double bevel_angle_deg; +}; + +struct NestingResult { + std::string plate_id; + double utilization_pct; + int num_parts_per_plate; + double total_cutting_length_m; + double estimated_cutting_time_min; + std::string nc_code_output_path; // G-code file +}; + +struct FormingSpec { + FormingMethod method; + double target_radius_mm; // negative for concave + double plate_thickness_mm; + double plate_width_mm; + double rolling_pass_count; // for roll bending + bool compound_curvature; // requires multi-axis forming + double line_heating_temp_C; // for line heating + double line_heating_speed_mm_per_s; +}; + +struct PanelSpec { + std::string panel_id; + std::string block_id; + double panel_length_mm; + double panel_width_mm; + std::vector plate_thicknesses; // for multi-plate butt-welded panel + int num_longitudinal_stiffeners; + std::string stiffener_type; // "T-bar", "bulb_flat", "angle_bar" + double stiffener_spacing_mm; + double stiffener_height_mm; + WeldProcess_Block welding_process; + double panel_mass_kg; +}; + +struct PanelWeldParams { + WeldProcess_Block process; + double current_A; + double voltage_V; + double travel_speed_mm_per_min; + double wire_diameter_mm; + double heat_input_kJ_per_mm; // Q_net = η×U×I/v + int num_passes; + double interpass_temp_C; +}; + +struct BlockAssemblySpec { + std::string block_id; + BlockType type; + double length_mm; + double breadth_mm; + double height_mm; + double mass_tonnes; + int num_sub_panels; + std::vector panels; + double design_tolerance_length_mm; + double design_tolerance_breadth_mm; + double welding_shrinkage_allowance_length_mm; + double welding_shrinkage_allowance_height_mm; + std::string erection_sequence_position; // "keel", "bottom", "side", "deck" +}; + +struct ErectionJointSpec { + std::string joint_id; + std::string block_id_a; + std::string block_id_b; + double root_gap_mm; + double edge_mismatch_tolerance_mm; + double weld_length_mm; + WeldProcess_Block joint_weld_process; + int num_strongbacks; + double strongback_spacing_mm; +}; + +struct HullErectionSequence { + std::string dock_id; + int total_blocks; + std::vector block_order; + double total_duration_days; + double critical_path_duration_days; + double outfitting_completion_pct_at_erection; +}; + +struct HullState { + std::string current_block_id; + bool block_positioned; + bool root_pass_complete; + bool filling_passes_complete; + bool final_inspection_passed; + double dimensional_deviation_length_mm; + double dimensional_deviation_breadth_mm; + double dimensional_deviation_height_mm; + bool ndt_accepted; +}; + +struct HullPerformance { + double panel_line_productivity_m2_per_h; + double erection_productivity_tonnes_per_day; + double material_utilization_pct; + int weld_defect_rate_per_100m; + double average_block_cycle_days; + double erection_weld_finish_rate_m_per_day; + bool iacs_csr_scantling_pass; + bool class_society_inspection_pass; +}; + +NestingResult optimize_plate_nesting( + std::vector& part_cutting_specs, double plate_length_mm, double plate_width_mm, double plate_thickness_mm); + +PanelSpec design_stiffened_panel( + double length_mm, double width_mm, double thickness_mm, SteelGrade grade, int num_stiffeners, std::string stiffener_type); + +PanelWeldParams design_panel_welding( + WeldProcess_Block process, double plate_thickness_mm, double stiffener_throat_thickness_mm); + +BlockAssemblySpec design_block( + BlockType type, double length_mm, double breadth_mm, double height_mm, SteelGrade grade, double target_tolerance_mm); + +HullErectionSequence optimize_erection_sequence( + std::vector& blocks, double dock_length_m, double gantry_crane_capacity_t); + +HullState initialize_hull_state(); + +HullPerformance simulate_hull_erection( + const HullErectionSequence& seq, HullState& state, double crane_capacity_t, int welding_teams); + +double calculate_welding_distortion_angular( + double heat_input_kJ_per_mm, double plate_thickness_mm, double stiffener_spacing_mm); + +double calculate_welding_shrinkage_transverse( + double weld_area_mm2, double plate_thickness_mm, int num_passes); + +double estimate_panel_line_productivity( + int num_welding_stations, int num_robots, WeldProcess_Block process, double avg_weld_length_per_panel_m); + +double evaluate_class_scantling( + double L_pp_m, double B_m, double D_m, double T_scantling_m, SteelGrade grade); + +} // namespace vde::shipbuilding +``` + + +### 2. Marine Propulsion & Shafting (P1) + +#### 2.1 2-Stroke/4-Stroke Diesels, Shafting, Propellers, and Thrusters + +``` +Marine propulsion & shafting overview: + Marine propulsion spans low-speed 2-stroke crosshead diesels (MAN B&W, + WinGD) directly driving fixed-pitch propellers, medium-speed 4-stroke + engines (Wärtsilä, MaK) through reduction gears, and diesel-electric + systems with azimuth thrusters. Shafting must transmit up to 100 MW + through a series of intermediate shafts, plummer bearings, stern tube, + and propeller. Propeller design balances thrust, cavitation, and + efficiency for the vessel's operating profile. + +2-Stroke low-speed diesel engine: + Engine parameters (MAN B&W G-type, WinGD X-DF): + Bore: 300–980 mm + Stroke/bore ratio: 3.5–5.0 (ultra-long stroke for direct propeller drive) + Speed: 60–167 RPM (largest engines at 70–84 RPM) + Power: 3,000–108,920 BHP (~80,080 kW, 14RTA-flex96C) + Mean effective pressure (MEP): ~20 bar (high MEP design) + SFOC (Specific Fuel Oil Consumption): 155–175 g/kWh (at MCR point) + SEC (Specific Emission of CO₂): SFOC × 3.114 → ~480–545 gCO₂/kWh + + Engine performance curve (propeller law): + P = c × n³ (propeller law for fixed-pitch propeller) + Engine output follows propeller curve: + P(n) = P_MCR × (n / n_MCR)³ + Torque: M(n) = M_MCR × (n / n_MCR)² + + Operating envelope: + Light running margin (LRM): 3–7% (design allows engine to run slightly under-propped at design speed) + Heavy running margin (HRM): 0–5% (safety margin for fouling / adverse weather) + Continuous service rating (CSR): typically 75–90% MCR + Recommended operating range: 65–100% MCR, above 60% MCR for best SFOC + + Fuel and emissions: + HFO (Heavy Fuel Oil): 380/500/700 cSt at 50°C, heated to 135–140°C for injection + MDO/MGO (Marine Diesel/Gas Oil): <11 cSt, no heating needed + LNG dual-fuel (ME-GI): Diesel cycle, high-pressure gas injection (~300 bar) + Methane slip: <0.2% (Diesel combustion, very low) + LNG dual-fuel (X-DF): Otto cycle, low-pressure gas admission (~16 bar) + Methane slip: 1.5–2.0% (Otto cycle, higher but simpler injection) + + IMO Tier III NOx limits (emission control areas, ECA): + <3.4 g/kWh (n < 130 RPM) → EGR or SCR required + Tier II: <14.4 g/kWh (n < 130 RPM) → achievable with engine tuning + + EGR (Exhaust Gas Recirculation): + Recirculates ~40% of exhaust (cooled, water-washed) to intake + Reduces O₂ → lower peak temperature → reduced NOx + + SCR (Selective Catalytic Reduction): + Urea injection (AdBlue/AUS40) into exhaust upstream of catalyst + NOx reduction: >80% (Tier III compliance with ~0.5 g/kWh) + Urea consumption: ~15–20 g/kWh (40% urea solution) + + Turbocharger: + Axial/radial flow, single-stage or two-stage + Pressure ratio: up to 4.5:1 (single-stage), up to 6:1 (two-stage) + Charge air cooler: reduces temperature from 180–220°C to 35–55°C + Scavenge air pressure: 2.5–4.0 bar(g) (for adequate cylinder filling) + Turbocharger matching: compressor must not surge at part load + +4-Stroke medium-speed engine: + Engine parameters: + Bore: 160–510 mm + Stroke/bore: 1.3–1.7 + Speed: 500–1,200 RPM (for generator: 720/750/900 RPM for 50Hz, 720/900 RPM for 60Hz) + Power: 500–20,000 kW per unit + SFOC: 175–195 g/kWh + + V-engine configuration: 12V, 16V, 20V (for compact installation) + + Reduction gear: + Ratio: 2:1 to 7:1 (engine 750 RPM → propeller 107–200 RPM) + Type: single helical (efficiency ~98.5%) or double helical (~98.7%) + Epicyclic: compact, lower weight (LNG carriers, naval) + Noise: <85 dB(A) at 1m + + GenSet application: + Constant speed (720/750/900 RPM for 50/60Hz) + Load sharing between parallel generators + Governing: isochronous (constant frequency) or droop (3–5%) + G3-G4 frequency recovery: 0.5–1.5% recovery within 5s (class requirement) + +Shafting: + Shaft line design (per classification rules): + Intermediate shaft: + Material: forged steel, R_m 600–800 MPa, YS > 350 MPa + Diameter per rule: d = F × k × (P × 1000 / (n × σ_allowable))^(1/3) [mm] + F = factor for propulsion type (95 for diesel direct, 100 for turbine) + k = shaft design feature factor (1.0 for straight, >1.0 for keyway) + P = rated power [kW], n = shaft speed [RPM] + σ_allowable = allowable stress (typically 60–80 MPa for intermediate shaft) + + Bearing span: 6–12 m (between plummer block bearings) + Maximum bending stress: σ_b = M / Z < 25–40 MPa + Z = π × d³ / 32 (section modulus) + + Critical speed (whirling): + n_crit = (60 / 2π) × (π / L)² × sqrt(E × I / (ρ × A)) [RPM] + I = π × d⁴ / 64 (second moment of area) + Must satisfy: n_MCR < 0.8 × n_crit (or n_MCR > 1.4 × n_crit for flexible shaft) + + Stern tube: + Oil-lubricated white metal bearing: + Bearing length: 2× shaft diameter + Oil film pressure: up to 2–4 MPa + Lubrication: gravity tank 5–10m above waterline → ~0.5–1.0 bar(g) + Stern tube seal: lip seal (forward + aft, 3–4 lips), Simplex type + Leakage: <6 L/day (per class, oil-to-sea) + + Water-lubricated bearing: + Material: Thordon COMPAC (elastomeric polymer), ThordonXL (composite) + Open seawater lubrication (no oil pollution risk) + Groove geometry: V-shaped water channels, 8–16 grooves per bearing + Wear rate: 0.1–0.3 mm/1,000 hrs + Temperature limit: <60°C (elastomer), <80°C (composite) + + Propeller shaft: + Tapered end: 1:10 or 1:15 taper for propeller hub mounting + Keyless fitting: hydraulic press-fit (SKF Oil Injection Method) + + Push-up force: + F_push = p × A × μ [N] + p = contact pressure at hub/shaft interface [MPa] (from interference fit) + A = contact area = π × d_mean × L_hub [mm²] + μ = friction coefficient (~0.14 for oil injection, ~0.18 for dry) + + Push-up distance: + δ = interference + hub expansion (from Lamé thick-wall cylinder theory) + Required push-up length: 3–8 mm (controlled per class rules) + + Thrust bearing (main): + Integrated in main engine (2-stroke direct) or separate housing (geared plant) + Thrust collar diameter: 400–1,200mm + Thrust pads: white metal, tilting pad type (Michell bearing) + Number of pads: 6–12 (forward + astern) + Pressure: <2.5 MPa (specific thrust pad pressure) + Oil film thickness: 15–50 μm + Thrust capacity: up to 3,000 kN (for large container ship) + + Shaft alignment analysis: + Objectives: + - Bearing reactions within allowable range (no unloading or overload) + - Bending stress in shaft within limit + - Slope at bearings <3.5 × 10⁻⁴ rad (for oil-lubricated white metal) + - Slope at stern bearing aft end <3.0 × 10⁻⁴ rad + + Method: finite element beam model (gap elements at bearings) + Variables: bearing vertical offsets (from straight line alignment) + Constraints: + R_i > 0 (no bearing unloading) + R_i < R_max (maximum allowable per bearing) + σ_bend < σ_allowable (shaft bending stress limit) + θ_i < θ_allowable (bearing slope) + 0.15 < R_aft / R_fwd < 1.0 (load distribution at stern bearing) + + Straight alignment (light load, no stern bearing unloading): + Shaft and bearings along a single straight line + Only static weight distribution, no bending from bearing offset + + Slope alignment: + Intentional bearing height offset to redistribute loads + Reduce aft stern bearing peak pressure + + Torsional vibration analysis: + Mass-elastic system model: + J_i = polar moment of inertia of each mass [kg·m²] + k_i = torsional stiffness of connecting shaft segment [N·m/rad] + k = G × J / L (G = shear modulus for steel = 81,000 MPa) + + Equation of motion: + [J] × {θ̈} + [C] × {θ̇} + [K] × {θ} = {T(t)} + + Natural frequencies (free vibration): + | [K] − ω² × [J] | = 0 + ω_i [rad/s], f_i = ω_i / (2π) [Hz] + + Excitation: + Engine: gas pressure torque harmonics (orders: 0.5, 1.0, 1.5, ...) + For 2-stroke: 1×, 2×, 3×, ... engine RPM + For 4-stroke: 0.5×, 1.0×, 1.5×, 2.0×, ... engine RPM + Propeller: blade passing frequency (BPF = n × Z_blades) + + Barred speed range: + RPM bands where torsional stress exceeds allowable + Must pass through quickly or be avoided + + Axial vibration: + Thrust bearing stiffness + shaft column + propeller mass + Excitation: propeller axial force fluctuations (blade rate, inflow distortion) + Damping: thrust bearing oil film squeeze film + +Propeller: + Fixed-pitch propeller (FPP): + Material: Ni-Al-Bronze (NAB, CuAl10Ni5Fe4 or Cu3 variation) + Tensile: >590 MPa, YS: >245 MPa, Elongation: >16% + Seawater corrosion fatigue limit: ±120 MPa at 10⁸ cycles + Manufacturing: casting (sand or centrifugal) → machining → hand grinding/polishing + Number of blades: 3–7 (4–5 most common for merchant vessels) + Diameter: 4.5–11.0 m (limited by draft and hull clearance) + Pitch: P/D = 0.60–1.40 (pitch at 0.7R) + Expanded area ratio (EAR = A_E / A_0): 0.35–0.80 + Higher EAR → better cavitation performance, lower efficiency + Skew: up to 40° (reduces unsteady cavitation and pressure pulses) + Rake: 0–10° aft (tip clearance adjustment) + + Wageningen B-series propeller design: + K_T = T / (ρ × n² × D⁴) [thrust coefficient] + K_Q = Q / (ρ × n² × D⁵) [torque coefficient] + J = V_A / (n × D) [advance coefficient] + η_o = (J / 2π) × (K_T / K_Q) [open water efficiency] + + V_A = V_s × (1 − w) [speed of advance, m/s] + w = wake fraction (0.05–0.35, depends on hull form) + t = thrust deduction factor (0.10–0.25) + + B-series regression coefficients (polynomials in P/D, EAR, Z): + K_T = Σ C_Tijk × J^i × (P/D)^j × EAR^k + K_Q = Σ C_Qijk × J^i × (P/D)^j × EAR^k + + Cavitation: + Cavitation number: + σ_n = (p_0 + ρ × g × h − p_v) / (½ × ρ × U²) + p_0 = atmospheric pressure (101,325 Pa) + h = shaft immersion depth [m] + p_v = vapor pressure (~2,340 Pa for water at 20°C) + U = characteristic velocity at 0.7R = sqrt(V_A² + (0.7 × π × n × D)²) + + Cavitation inception: σ_n < σ_i (cavitation inception number, from profile data) + Cavitation bucket diagram: σ vs. angle of attack → acceptable operating range + Tip vortex cavitation: strongest at high load, low σ + + Pressure pulse on hull (above propeller): + Δp_max per class limits (LR Rule Part 3, Chap 10): + < 8 kPa (for unrestricted), < 12 kPa (for strengthened) + Estimated per Huse method or Holden method + + Controllable-pitch propeller (CPP): + Blade turning mechanism: + Hub: hydraulic servo cylinder, 20–100 bar operating pressure + Blade bearing: spherical roller bearing + thrust pad + Pitch range: full ahead to full astern (−25° to +25° typical) + Response time: 10–30 seconds for full range + + Advantages: + - Reversible without engine reversal + - Constant-speed operation (for shaft generator PTO) + - Fuel optimization at off-design conditions (combinator curve) + + Combinator curve (CPP pitch + RPM schedule): + Low speed: fixed RPM (700–800 RPM idle), pitch varies + Mid speed: both pitch and RPM increase (optimized for SFOC) + High speed: fixed pitch (design pitch), RPM varies + Curve defined by (RPM, pitch) pairs per vessel speed + +Azimuth thruster: + ABB Azipod / Rolls-Royce Mermaid / Schottel: + Electric motor in pod (underwater housing) + Direct drive: PM motor or induction motor + Power range: 1.5–25 MW per pod + Propeller: fixed-pitch, pulling type (ahead of pod body) + 360° steering for DP and manoeuvring + + Thrust: T = K_T × ρ × n² × D⁴ [N] (same as propeller) + Steering rate: 5–10°/s + + L-drive / Z-drive (mechanical): + Mechanical shafting from inboard engine through bevel gears + Power to 7 MW + High-efficiency mechanical transmission (~97%) + +Rudder: + Semi-spade (semi-balanced) rudder (most common): + Horn (fixed) + movable blade (lower part) + Taper ratio: 0.5–0.7 + Area ratio (A_R / L×T): 1.2–2.5% (of L×T) + Stock diameter: per class rule, up to 1,000mm for large vessels + Max rudder angle: ±35° (hard over), ±45° (stops) + + Rudder turning: + Steering gear: electro-hydraulic (2 or 4 cylinders, Rapson slide or rotary vane) + Torque: up to 5,000 kN·m (for fast, large vessels) + Response time: 28s from 35° Port → 30° Stbd (SOLAS requirement) + + Flap rudder (Becker / Schilling): + Trailing edge flap linked to rudder angle (higher lift) + Lift coefficient: C_L up to 1.5 (vs. ~0.8 for conventional) + + Rudder-propeller interaction: + Propeller race over rudder → increased rudder effectiveness + Asymmetric thrust: rudder angle + propeller rotation direction → side forces +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class EngineType { TwoStroke_LowSpeed, FourStroke_MediumSpeed, DualFuel_ME_GI, DualFuel_X_DF, + PureGas_Otto, SteamTurbine, GasTurbine }; +enum class EngineFuelType { HFO_380, HFO_500, MDO_DMA, MGO_DMB, LNG, Methanol, Ammonia, LPG }; +enum class TurbochargerType { SingleStage_Axial, SingleStage_Radial, TwoStage_Series }; +enum class PropellerType { FPP_NiAlBronze, CPP_4Blade, CPP_5Blade, AzimuthPuller, TunnelThruster }; +enum class PropellerSeries { Wageningen_B4, Wageningen_B5, Kaplan_K4, Gawn }; +enum class SternTubeType { OilLubricated_WhiteMetal, WaterLubricated_Thordon, WaterLubricated_Rubber }; +enum class RudderType { SemiSpade_Balanced, FullSpade, Flap_Becker, Schilling_Fishtail }; +enum class ReductionGearType { SingleHelical, DoubleHelical, Epicyclic, Hybrid_Coflex }; + +struct EngineSpec { + EngineType type; + double bore_mm; + double stroke_mm; + double mcr_power_kW; + double mcr_speed_RPM; + double sfc_g_per_kWh; // at MCR + double sec_gCO2_per_kWh; // specific CO₂ emission + EngineFuelType fuel_type; + int num_cylinders; + double mean_effective_pressure_bar; + TurbochargerType turbocharger; + double emmision_tier; // IMO Tier II or III + bool has_egr; + bool has_scr; + double nox_g_per_kWh; +}; + +struct EnginePerformanceMap { + std::vector speed_RPM; + std::vector power_kW; + std::vector> sfc_map; // sfc[speed_idx][power_idx] g/kWh + double light_running_margin_pct; + double heavy_running_margin_pct; + double recommended_min_continuous_power_pct; +}; + +struct ShaftLineSpec { + double total_length_m; + int num_intermediate_shafts; + double intermediate_shaft_diameter_mm; + double propeller_shaft_diameter_mm; + double stern_tube_shaft_diameter_mm; + SternTubeType stern_tube_type; + int num_plummer_bearings; + std::vector bearing_positions_m; // from engine flange + std::vector bearing_offsets_mm; // vertical offset from straight + ReductionGearType gear_type; + double gear_ratio; // engine RPM / propeller RPM + std::string shaft_material; + double shaft_yield_strength_MPa; +}; + +struct ShaftAlignmentResults { + std::vector bearing_reactions_kN; + std::vector bearing_max_allowable_kN; + std::vector shaft_bending_stress_MPa; + std::vector bearing_slope_rad; // at each bearing + double stern_bearing_aft_end_slope_rad; + bool alignment_pass; + double torsional_natural_freq_Hz[5]; // first 5 modes + double barred_speed_range_start_RPM[3]; + double barred_speed_range_end_RPM[3]; +}; + +struct PropellerDesignInput { + double vessel_design_speed_kn; + double effective_power_kW; // P_E at design speed + double propeller_diameter_limit_m; // max allowed by hull clearance + double shaft_immersion_depth_m; + PropellerSeries series; + int num_blades; + double expanded_area_ratio_min; +}; + +struct PropellerDesignOutput { + PropellerType type; + double diameter_m; + double pitch_ratio_PD; // P/D at 0.7R + double expanded_area_ratio; + double open_water_efficiency; + double advance_coefficient_J; + double thrust_coefficient_KT; + double torque_coefficient_KQ; + double design_RPM; + double design_power_kW; + double cavitation_number_sigma_07R; + bool cavitation_acceptable; + double hull_pressure_pulse_kPa; +}; + +struct AzimuthThrusterSpec { + double input_power_kW; + double propeller_diameter_m; + int num_blades; + double nominal_thrust_kN; + double steering_rate_deg_per_s; + std::string motor_type; // "PM", "induction", "sync" + double motor_efficiency; + double azimuth_angle_range_deg; // typically 360 or ±180 +}; + +struct RudderSpec { + RudderType type; + double rudder_area_m2; + double rudder_height_m; + double rudder_chord_m; + double flap_chord_ratio; // for flap rudder + double stock_diameter_mm; + double max_rudder_angle_deg; + double steering_gear_torque_kNm; + int num_hydraulic_cylinders; +}; + +struct PropulsionState { + double engine_power_kW; + double engine_speed_RPM; + double propeller_RPM; + double propeller_pitch_deg; // for CPP + double vessel_speed_kn; + double fuel_consumption_kg_per_h; + double sfc_g_per_kWh; + double thrust_kN; + bool engine_overloaded; + bool cavitation_detected; +}; + +struct PropulsionPerformance { + double achieved_speed_at_MCR_kn; + double sea_margin_pct; // power margin for wind/waves/fouling + double propeller_efficiency; + double transmission_efficiency; + double overall_propulsive_efficiency; // η_D = η_o × η_H × η_R + double shaft_alignment_pass; + double torsional_vibration_pass; + double sfoc_at_design_speed_g_per_kWh; + double daily_fuel_consumption_t_per_day; + bool imo_tier_iii_compliant; +}; + +EngineSpec select_main_engine( + EngineType type, double required_MCR_kW, double propeller_RPM, std::string fuel_preference); + +EnginePerformanceMap generate_engine_performance_map( + const EngineSpec& spec, double ambient_temp_C, double seawater_temp_C); + +PropellerDesignOutput design_propeller(const PropellerDesignInput& input); + +ShaftLineSpec design_shaft_line( + double engine_power_kW, double shaft_speed_RPM, double shaft_length_m, double propeller_mass_kg, int num_bearings); + +ShaftAlignmentResults analyze_shaft_alignment(const ShaftLineSpec& shaft, double thrust_kN); + +RudderSpec design_rudder( + RudderType type, double L_pp_m, double T_design_m, double vessel_speed_kn, double propeller_diameter_m); + +PropulsionState initialize_propulsion_state(const EngineSpec& eng, const PropellerDesignOutput& prop); + +PropulsionPerformance simulate_propulsion_system( + const EngineSpec& eng, const PropellerDesignOutput& prop, const ShaftLineSpec& shaft, PropulsionState& state, double target_speed_kn, double sea_margin_pct); + +double calculate_propeller_efficiency_B_series( + double J, double PD, double EAR, int Z); + +double estimate_cavitation_inception_speed( + double shaft_immersion_m, double propeller_diameter_m, double RPM, double PD, double EAR, int Z, double water_temp_C); + +double calculate_shaft_critical_speed( + double shaft_diameter_mm, double bearing_span_m, double steel_density_kg_per_m3, double E_GPa); + +double estimate_sfoc_from_load( + double current_load_pct_MCR, double design_sfc_g_per_kWh, EngineType type); + +} // namespace vde::shipbuilding +``` + + +### 3. Piping & Fluid Systems (P1) + +#### 3.1 Ballast, Bilge, Fuel, Cooling Water, and Firefighting Systems + +``` +Piping & fluid systems overview: + Ship piping systems form the vascular network of the vessel — transporting + seawater, freshwater, fuel, lubricating oil, bilge water, ballast water, + compressed air, steam, and exhaust. System design follows classification + society rules (DNV Pt.4 Ch.6, LR Pt.5), IMO conventions (MARPOL, SOLAS, + BWM Convention), and industry standards (ISO 14726 color coding, ASME B31.3 + process piping). + +Pipe material and sizing: + Materials: + Carbon steel (Schedule 40/80): general service, sea water (with galvanizing) + CuNi 90/10 (CuNi10Fe1Mn): seawater cooling, fire main, heat exchangers + Highly corrosion-resistant, biofouling-resistant in seawater + Max working temperature: 300°C + Cost: 4–6× carbon steel + Stainless steel 316L: potable water, compressed air, hydraulic oil + GRE (Glass Reinforced Epoxy): ballast, bilge (corrosion-free, lower weight) + PVC/CPVC: sanitary drainage (non-metallic, Class-approved for ≤ DN100) + + Pipe wall thickness per class rules: + t = (p × D_o) / (2 × σ_allowable × e + p) + c [mm] + p = design pressure [bar] + D_o = outside diameter [mm] + σ_allowable = allowable stress (yield / safety factor, typically 1.6–2.0) + e = weld joint efficiency (1.0 for seamless, 0.85–1.0 for welded) + c = corrosion allowance (1–3mm depending on service, pipe material) + + Pipe diameter sizing based on velocity: + D = sqrt(4 × Q / (π × v)) [m] + Q = flow rate [m³/s] + v = recommended velocity range: + Suction: 0.5–2.0 m/s (low velocity to avoid cavitation at pump suction) + Discharge: 1.5–4.0 m/s (typical) + Compressed air: 15–25 m/s + Steam: 25–40 m/s + + Pressure drop (Darcy-Weisbach): + Δp = f × (L/D) × (ρ × v² / 2) [Pa] + f = Darcy friction factor + Laminar (Re < 2,300): f = 64 / Re + Turbulent (Colebrook-White): + 1/sqrt(f) = −2 × log₁₀(ε/(3.7×D) + 2.51/(Re×sqrt(f))) + Or Swamee-Jain approximation: + f = 0.25 / [log₁₀(ε/(3.7×D) + 5.74/Re^0.9)]² + ε = absolute roughness [mm] (0.046mm for new steel, 0.6mm for corroded) + Re = ρ × v × D / μ + + Minor losses: + Δp_minor = K × (ρ × v² / 2) [Pa] + K-values: gate valve 0.15, globe valve 10, check valve 2.5, + 90° elbow 0.75, tee (branch) 1.5, entrance 0.5, exit 1.0 + +Ballast system: + Purpose: maintain stability and trim during loading/unloading + and ballast voyage (empty ship must have sufficient draft) + + Ballast capacity: + Tankers: 25–45% of DWT (dedicated ballast tanks, SBT per MARPOL Annex I) + Containers: variable ballast for trim (fore/aft peak + wing tanks + DB tanks) + Bulk carriers: 30–40% DWT (heavy ballast for empty voyage stability) + + Ballast pump: + Type: vertical centrifugal, double-suction (for low NPSH) + Capacity per pump: 1,000–5,000 m³/h + Head: 15–30 m (low head, high flow) + Number: typically 2 (main + reserve, each sized for ballast exchange in 12–18h) + + Ballast Water Treatment (BWTS) per IMO D-2: + Performance standard (D-2): + Organisms >50µm: <10 viable organisms/m³ + Organisms 10–50µm: <10 viable organisms/mL + Toxicogenic Vibrio cholerae: <1 CFU/100mL + Escherichia coli: <250 CFU/100mL + Intestinal enterococci: <100 CFU/100mL + + Treatment technologies: + UV + filtration: 40 µm auto-backwash filter + medium-pressure UV (TRO < control limit) + UV dose: >200 mJ/cm² (for inactivation of phytoplankton and bacteria) + Filter backwash: 1–3% of treated flow returned to sea at uptake point + Electro-chlorination (side-stream type): + NaCl + H₂O + electricity → NaOCl + H₂ (sodium hypochlorite) + Active substance: 6–12 mg/L TRO (Total Residual Oxidant) + De-chlorination: sodium bisulfite NaHSO₃ injection at discharge + Power: 30–60 kW per 1,000 m³/h treatment + + System sizing: + Q_BWTS = V_ballast_max / T_exchange [m³/h] + V_ballast_max = max ballast capacity per tank pair + T_exchange: typically 12 hours (for ballast exchange at sea) + +Bilge system: + Purpose: collect and discharge water accumulating in machinery spaces, + cargo holds, and other compartments (leakage, condensation, washdown) + + Bilge pump: + Each machinery space: 2 power pumps (main + emergency) + Main: electric motor-driven centrifugal, self-priming + Emergency: may be engine-driven (diesel) for blackout scenario + Bilge main diameter per SOLAS: + d = 25 + 1.68 × sqrt(L × (B + D)) [mm] (minimum) + d = 1.68 × sqrt(L × (B + D)) [mm] (minimum for L ≥ 30m) + + Oily Water Separator (OWS, 15ppm): + Purpose: treat bilge water before overboard discharge (MARPOL Annex I, Reg.14) + Max oil content after treatment: 15 ppm (parts per million) + Monitoring: Oil Content Meter (OCM), auto-stop at >15ppm, GPS position logging + + OWS technologies: + Gravity separation (1st stage): + Plate pack coalescer: inclined parallel plates 20–30mm spacing + Oil droplets rise per Stokes' law: + v_rise = g × d_droplet² × (ρ_water − ρ_oil) / (18 × μ_water) [m/s] + d_droplet > 60–100 µm separated in 1st stage + Coalescence (2nd stage): + Oleophilic media (polypropylene fibers) → tiny droplets agglomerate + Effluent: 5–15 ppm oil + Polishing (3rd stage, if needed, for <5ppm): + Activated carbon or membrane (UF/MF) + + OWS capacity: + Q_OWS = 0.25–5.0 m³/h (depends on vessel size) + Holding tank: 5–15 m³ (for bilge water storage before treatment) + +Fuel oil system: + Bunker station: + Bunker manifold: DN150–DN400, 2–4 connections per side + Bunker rate: 500–2,000 m³/h (VLCC, bulk) + + Storage tanks: + HFO storage: heated to 40–50°C (to pump, 380 cSt → <100 cSt at 50°C) + MDO/MGO storage: ambient temperature + Settling tank: heated to 60–80°C, 12–24h residence for water/sludge separation + Drain: water + sludge every 4–8h (manual or auto-drain valve) + + Purifier (centrifugal separator): + Alfa Laval S-type / Mitsubishi Selfjector + Capacity: 2,000–15,000 L/h (per unit, based on engine consumption × 1.5) + + Separation process: + Bowl speed: 7,000–12,000 RPM (generating centrifugal force) + Centrifugal force: F_c = m × ω² × r (thousands of g) + Gravity ring: controls oil/water interface position + Separation efficiency per Stokes' Law (centrifugal): + v_sep = (ρ_water − ρ_oil) × g × ω² × r × d² / (18 × μ) + + Sludge discharge: + Automatically when sludge space full (optical/turbidity sensor) + Discharge volume: 2–5 L per cycle + Cycle frequency: every 2–4 hours (dirty fuel), 8–24 hours (clean fuel) + + Service tank: + Daily service tank per main engine + GenSet + Heated to 90–98°C (to achieve ~12 cSt at injector, per engine spec) + Capacity: 8–24h consumption at MCR + + Viscosity control: + Viscometer (in-line, heated capillary tube or vibrating element type) + PID control of heater steam/electric input + Viscosity setpoint: 10–15 cSt (engine manufacturer recommendation) + Over-temperature alarm at 150°C (prevents fuel cracking) + +Sea water cooling system: + Central cooling (modern): + Low-temperature (LT) circuit: 36°C sea water → plate heat exchangers → 25°C fresh water → various consumers + High-temperature (HT) circuit: engine jacket water at 80–90°C (separate from LT) + Sea water pump: centrifugal, 500–2,000 m³/h per pump + Sea chest: high + low (high sea chest in rough weather, low in port/shallow) + Grating: 10mm bar spacing (debris prevention) + Cathodic protection: impressed current or sacrificial anode + Heat exchanger: plate type (Ti plates for seawater), compact, high heat transfer + + Direct cooling (traditional, less common): + Sea water directly to consumers (corrosion + fouling risks) + Replaced by central cooling with LT fresh water intermediate + +Fresh water system: + Fresh water generator (FWG, evaporator/RO): + Reverse Osmosis (RO) — modern: + Membranes: spiral-wound polyamide thin-film composite (TFC) + Feed: sea water at 55–70 bar (pressure exceeds osmotic pressure) + Recovery rate: 30–50% permeate + Permeate quality: TDS < 500 ppm (WHO drinking water <1,000ppm) + Capacity: 5–50 m³/day per unit (cruise: 2,000+ m³/day total) + + Plate evaporator (vacuum distillation) — traditional: + Uses engine jacket water waste heat (~80°C) + Vacuum: 90–95% (boiling at ~40–50°C) + Capacity: 10–60 m³/day per unit + Gained Output Ratio (GOR): 3–5 (kg distillate per kg heating steam equivalent) + + Hydrophore (pressure tank): + Maintains constant pressure in fresh water distribution + Pump cut-in/cut-out controlled by pressure switches + Setpoint: 3.5–5.0 bar(g) + Tank: 500–2,000 L (for surge absorption) + +Firefighting systems: + Fire main: + Piping: DN50–DN200, galvanized steel or CuNi + Pressure at hydrant: 2.5–4.0 bar(g) (minimum at furthest/highest hydrant) + Number of fire pumps: 2 (cargo), 2 + emergency (passenger) + Capacity of each fire pump per SOLAS: + Q = 0.25 × d² [m³/h] (where d = bilge main diameter [mm]) + + Fire hydrant / hose: + Hydrant spacing: <20m apart (so any point can be reached by 2 hoses) + Hose: 15–20m length, φ38/φ45/φ64 mm + Nozzle: jet/spray, 12mm (φ38 hose) or 16/19mm (φ64 hose) + Throw length: >12m (horizontal jet, still air) + + Fixed CO₂ system (engine room total flooding): + CO₂ quantity: 40% of gross volume of largest protected space + CO₂ cylinders: 45 kg each, manifolded + Discharge time: <2 minutes for 85% of designed quantity + Pre-discharge alarm: 20s minimum (for personnel evacuation) + + Water mist system (Hi-Fog, Marioff): + Fine droplets: D_v99 < 200µm (high cooling + inerting effect) + Operating pressure: 60–140 bar (high-pressure plunger pump) + Coverage: per IMO MSC/Circ.1165 (machinery space) + Water consumption: 50–80% less than traditional sprinkler + Pump unit: 2 × 100% redundancy (each pump set for full capacity) + Accumulator: 20–50 L for immediate response before pump starts + + Deck foam system (for tankers): + Foam concentrate: AFFF (Aqueous Film Forming Foam) 3% or 6% type + Foam monitors: 2–4 per deck, 500–2,000 L/min foam solution each + Foam tank: 5–15 m³ concentrate (for 20–30 min continuous application) + Proportioner: balanced pressure or inline venturi type + +Compressed air system: + Starting air: + Engine starting: 30 bar(g) (main engine) → air distributor to cylinders + Air receivers: 2 × 100% capacity (2×12 consecutive starts from dead ship) + Compressors: 2 (main + topping-up), capacity to fill receivers in 1h + + Control air: + 7–8 bar(g), dried (refrigerated or adsorption dryer, dewpoint −25°C or better) + For: pneumatic valves, actuators, instruments, whistle/foghorn + + Service air: + 7 bar(g), dried, for general workshop use, tooling +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class PipeMaterial { CarbonSteel_Sch40, CarbonSteel_Sch80, CuNi_90_10, SS316L, GRE, CuNi_70_30 }; +enum class PipeService { Ballast, Bilge, Fuel_HFO, Fuel_MDO, SeaWater_Cooling, FreshWater_Cooling, + FireMain, CompressedAir, Steam, PotableWater, Sanitary, Exhaust, HydraulicOil }; +enum class BWMS_Technology { UV_Filtration, ElectroChlorination, Ozone_Injection, Chemical_Injection, + Deoxygenation, Ultrasonic_Cavitation }; +enum class OWS_Stage { Gravity_PlatePack, Coalescence_Media, Membrane_UF, ActivatedCarbon_Polish }; +enum class CentrifugalPurifierType { SelfCleaning_AutoDesludge, Manual_Cleaning, DiscStack }; +enum class FixedFireSystem { CO2_TotalFlooding, WaterMist_HiFog, Foam_LowExpansion, DryPowder, + Novec1230_CleanAgent }; +enum class FreshWaterGeneratorType { ReverseOsmosis_RO, PlateEvaporator_Vacuum, MultiStageFlash }; + +struct PipeSpec { + PipeMaterial material; + PipeService service; + double nominal_diameter_mm; + double wall_thickness_mm; + double design_pressure_bar; + double max_flow_rate_m3_per_h; + double max_velocity_m_per_s; + double total_equivalent_length_m; // straight + fitting equivalent lengths + std::string iso_color_code; +}; + +struct PipeHydraulicResult { + double flow_velocity_m_per_s; + double reynolds_number; + double friction_factor_f; + double pressure_drop_straight_bar; + double pressure_drop_fittings_bar; + double total_pressure_drop_bar; + double pump_head_required_m; + bool velocity_within_recommended; + bool sizing_acceptable; +}; + +struct PumpSpec { + std::string pump_id; + PipeService service; + double rated_capacity_m3_per_h; + double rated_head_m; // meters of liquid column + double npsh_required_m; // Net Positive Suction Head required + double motor_power_kW; + int motor_speed_RPM; // 1,450 or 1,750 (4-pole), 2,900 or 3,500 (2-pole) + double efficiency_pct; + bool self_priming; + std::string impeller_type; // "closed", "semi_open", "recessed_vortex" +}; + +struct BallastSystemSpec { + double total_ballast_capacity_m3; + int num_ballast_pumps; + double pump_capacity_each_m3_per_h; + int num_ballast_tanks; + std::vector tank_capacities_m3; + BWMS_Technology bwms_type; + double bwms_capacity_m3_per_h; + double ballast_exchange_time_h; + double uv_dose_mJ_per_cm2; // for UV-based BWMS + double tro_setpoint_mg_per_L; // for electro-chlorination +}; + +struct BilgeSystemSpec { + int num_bilge_pumps; + double main_bilge_pump_capacity_m3_per_h; + double bilge_main_diameter_mm; + OWS_Stage ows_stages; + double ows_capacity_m3_per_h; + double ocm_alarm_threshold_ppm; // typically 15 ppm + double holding_tank_capacity_m3; +}; + +struct FuelOilSystemSpec { + EngineFuelType fuel_type; + double daily_consumption_t_per_day; + double storage_tank_capacity_m3; // typically for voyage + margin + double settling_tank_capacity_m3; + double service_tank_capacity_m3; + int num_purifiers; + CentrifugalPurifierType purifier_type; + double purifier_capacity_L_per_h; + double storage_heating_temp_C; + double settling_heating_temp_C; + double service_heating_temp_C; + double injection_viscosity_cSt; +}; + +struct CoolingSystemSpec { + double total_heat_rejection_kW; // engine + GenSets + auxiliaries + int num_seawater_pumps; + double sw_pump_capacity_m3_per_h; + double lt_circuit_temp_setpoint_C; // LT fresh water leaving heat exchangers + double ht_circuit_temp_C; // HT engine jacket water + double sea_chest_grating_gap_mm; + std::string heat_exchanger_type; // "plate", "shell_tube", "box" +}; + +struct FirefightingSystemSpec { + std::string fire_main_material; + double fire_main_min_diameter_mm; + int num_fire_pumps; + double fire_pump_capacity_m3_per_h; + double hydrant_min_pressure_bar; + double hydrant_max_spacing_m; + FixedFireSystem fixed_system_engine_room; + double co2_cylinder_count; + double co2_discharge_time_s; + bool has_deck_foam; // for tankers + double foam_concentrate_volume_m3; + double foam_monitor_capacity_L_per_min; +}; + +struct PipingState { + double ballast_flow_rate_m3_per_h; + double bilge_water_volume_m3; + double oily_water_ppm; + double fuel_service_tank_level_pct; + double fuel_viscometer_reading_cSt; + double lt_water_temp_at_he_outlet_C; + double fire_main_pressure_bar; + bool ows_overboard_valve_open; // must close at >15ppm + bool bwms_treatment_active; +}; + +struct PipingPerformance { + double total_piping_pressure_drop_max_bar; + double pump_efficiency_weighted_avg; + double bilge_ows_effluent_ppm; + double ballast_exchange_time_achieved_h; + double fire_pump_flow_at_furthest_hydrant_m3_per_h; + bool d2_ballast_water_compliant; + bool marpol_annex_i_bilge_compliant; + bool solas_firefighting_capacity_pass; +}; + +PipeSpec design_pipe( + PipeService service, PipeMaterial material, double flow_rate_m3_per_h, double design_pressure_bar); + +PipeHydraulicResult calculate_pipe_hydraulics(const PipeSpec& pipe, double fluid_density_kg_per_m3, double fluid_viscosity_cSt); + +PumpSpec select_pump( + PipeService service, double required_flow_m3_per_h, double total_head_m, double fluid_density_kg_per_m3, bool self_priming); + +BallastSystemSpec design_ballast_system( + double total_ballast_m3, BWMS_Technology bwms, double exchange_time_target_h, int num_tanks); + +BilgeSystemSpec design_bilge_system( + double L_pp_m, double B_m, double D_m, OWS_Stage ows, double ows_target_capacity_m3_per_h); + +FuelOilSystemSpec design_fuel_oil_system( + EngineFuelType fuel, double daily_consumption_t_per_day, double voyage_duration_days, CentrifugalPurifierType purifier); + +CoolingSystemSpec design_sea_water_cooling( + double total_heat_rejection_kW, double sea_water_temp_design_C, double lt_circuit_temp_C); + +FirefightingSystemSpec design_firefighting_system( + double L_pp_m, double B_m, double D_m, int num_decks, bool is_tanker); + +PipingState initialize_piping_state(); + +PipingPerformance simulate_piping_systems( + const PipeSpec& ballast, const PipeSpec& bilge, const PipeSpec& fuel, const PipeSpec& cooling, const PipeSpec& fire, PipingState& state); + +double calculate_ballast_exchange_time( + double ballast_capacity_m3, double pump_capacity_m3_per_h, int num_pumps_active); + +double estimate_purifier_sludge_generation( + double daily_fuel_consumption_t, double fuel_density_kg_per_m3, double ash_content_pct); + +} // namespace vde::shipbuilding +``` + + +### 4. Accommodation & Outfitting (P1) + +#### 4.1 Modular Cabins, Fire Insulation, HVAC, and Interior Systems + +``` +Accommodation & outfitting overview: + Ship accommodation covers crew living quarters, navigation bridge, + machinery control rooms, public spaces (cruise/passenger vessels), and + service areas (galley, laundry, hospital). Modern shipbuilding uses + modular cabin construction — complete cabins are prefabricated in a + workshop with integrated MEP (mechanical, electrical, plumbing), then + lifted and installed onboard as units. SOLAS fire divisions (A-60/A-30/ + A-15) govern fire integrity, and classification rules set minimum + requirements for crew habitability. + +Modular cabin construction: + Cabin structure: + Panel type: steel sandwich (0.7–1.0 mm steel face + 50mm mineral wool core) + or GRP (glass-reinforced plastic) sandwich with A-60 fire rating + Wall thickness: 50–60 mm (for sound and fire insulation) + Ceiling height: 2,100–2,300 mm (clear) + Cabin floor area: + Officer cabin: 12–18 m² (single occupancy) + Crew cabin: 8–12 m² (single or double) + Senior officer / captain: 20–35 m² (day room + bedroom) + Cruise passenger cabin: 15–60+ m² (inside to suite) + + Cabin prefabrication: + Each cabin module includes: + - 4 walls + door frame + - Ceiling panel with integrated lighting + - Sanitary unit (toilet, shower, washbasin) — GRP monobloc unit + - Furniture (bed, desk, wardrobe, sofa) fixed/bolted + - MEP connections (junction boxes, sprinkler, ventilation duct stubs) + - Flooring (vinyl/laminate with steel underlayment) + + Workshop assembly sequence: + 1. Floor panel laid on jig + 2. Wall panels erected and welded/bolted + 3. Sanitary unit lowered in from top + 4. Ceiling panel fixed + 5. Furniture installed + 6. Electrical termination (junction box → switches/lights/outlets) + 7. Piping connection (fresh water, hot water, drain, sprinkler) + 8. HVAC duct connection (supply + return spigots) + 9. Door hung + 10. Final cleaning, wrapping for transport + + Lifting: + 4-point lift (spreader beam), slings to corner D-rings + Cabin weight: 2.5–5.0 tonnes (complete with MEP + furniture) + Tolerances at module joints: ±5mm position, ±2mm floor flatness + + Onboard installation: + Cabin lowered through accommodation block opening (roof or side opening) + X/Y positioning: laser projection + guide pins + Connection: bolt to deck via adjustable feet → bolt to adjacent cabins + Inter-cabin gap: 10–15mm (fire sealant + acoustic caulk) + MEP connections: flexible spool pieces at module boundaries + +Fire insulation & SOLAS divisions: + Fire ratings: + A-60 (60 minutes): engine room boundaries, galley boundaries, stairway enclosures + Steel + 50–75mm mineral wool (Rockwool SeaRox SL 620/640, 80–120 kg/m³) + + A-30 (30 minutes): corridor bulkheads + Steel + 35–50mm mineral wool + + A-15 (15 minutes): cabin-to-cabin divisions (on some designs) + + B-15 (15 minutes): internal cabin divisions, non-structural + + C-class: non-combustible (no time rating), decorative panels + + Insulation fixing: + Pin welding: stainless steel stud pins, capacitor discharge (CD) welded + Pin spacing: 300–400 mm grid + Insulation slabs impaled on pins, secured with self-locking washers + Joint staggering: ≥100mm between layers + + Surface temperature (SOLAS requirement): + On unexposed side of A-class division: temperature rise < 140°C above ambient + At end of 60 min standard fire test (ISO 834 cellulosic fire curve) + + Fire dampers: + At duct penetrations through A-class divisions + Fusible link: melts at 70°C → spring-closes damper + Motorized: controlled by fire detection system + Type-approved per IMO FTP Code (Fire Test Procedures) + + Cable and pipe penetrations: + Multi-cable transit (MCT): Roxtec / Brattberg block system + Fire rating must match the division penetrated + Spare capacity: 20–30% for future cables + +HVAC system: + Cooling load calculation: + Q_total = Q_solar + Q_transmission + Q_ventilation + Q_people + Q_equipment + Q_lighting [kW] + Q_solar: larger for cruise ships (large window areas) + Q_solar = Σ A_window × G × SHGC × shading_factor [W] + Tropical design: G = 1,000 W/m² (peak solar radiation) + + Q_people: 150 W/person (sensible + latent, seated), 250 W/person (dancing/casino) + Q_transmission: U × A × (T_out − T_in) + U-value for accommodation walls: ~0.6 W/m²K (with 50mm mineral wool) + + Chilled water plant: + Chiller type: screw compressor (100–2,000 kW) or centrifugal (1,500–5,000 kW per unit) + Refrigerant: R-134a, R-513A (low GWP), or R-1234ze + Chilled water supply/return: 7°C/12°C (standard) + Sea water condenser: 32°C inlet (tropical), 38°C outlet + COP (Coefficient of Performance): 4.0–6.0 (water-cooled) + Number of chillers: 2–6 (for redundancy, cruise ship ~15,000 kW total cooling) + + Air handling unit (AHU): + Supply fan: centrifugal, V-belt or direct drive (EC motor) + Filter: G4 (coarse) + F7 (fine) per ISO 16890 + Cooling coil: chilled water 7/12°C, 6–10 row coil + Heating coil: hot water (60–80°C) or electric + Silencer section: 15–25 dB attenuation + Capacity: 2,000–20,000 m³/h per AHU + + Air distribution: + Supply: linear diffusers in ceiling + Return: door grilles to corridor → AHU return duct + Fresh air: 30–60 m³/h per person (per MLC 2006, for enclosed spaces) + Cabin air changes: 6–8 ACH (air changes per hour) + Public spaces: 8–12 ACH + Over-pressure: +25–50 Pa in stairways (smoke control) + + Galley ventilation: + Exhaust: canopy hoods, 2,000–5,000 m³/h per hood + Grease filter: UL-listed baffle or mesh type + Make-up air: 80–85% of exhaust (slightly negative galley pressure) + Fire damper: at duct penetration of galley boundary (A-60) + +Noise and vibration: + Noise limits (IMO Resolution MSC.337(91) Code on Noise Levels): + Cabins: <60 dB(A) (during the day), <55 dB(A) (night) + Mess rooms: <65 dB(A) + Recreation rooms: <65 dB(A) + Control rooms: <65 dB(A) + Bridge/Navigation: <65 dB(A) + Open deck recreation: <75 dB(A) + + Noise prediction (SEA — Statistical Energy Analysis): + Source-receiver matrix for accommodation + Airborne noise: from machinery through decks/bulkheads + Structure-borne noise: machinery vibration → mounts → hull → accommodation + Damping: viscoelastic constrained layer, floating floor, resilient mounts + + Vibration limits (ISO 6954:2000 mechanical vibration): + Habitability zone I (passenger cabins, hospital): + <4 mm/s RMS (1–80 Hz) + Habitability zone II (crew accommodation): + <6 mm/s RMS (1–80 Hz) + Working areas: + <8 mm/s RMS (1–80 Hz) + + Floating floor: + Mineral wool (50–75mm, 80–120 kg/m³) on steel deck + Plywood / calcium silicate board sheet covering (25–30mm) + Vinyl or carpet on top + Airborne noise reduction: ΔL_w ≈ 25–30 dB (IIC > 50) + Fire rating: A-60 capable (with additional fire barrier below) + + Resilient mounts: + For machinery: spring isolator (for low-frequency, >5 Hz natural frequency) + or rubber mount (higher natural frequency, 10–25 Hz) + Pipe supports: rubber-lined clamps + Duct connections: flexible canvas connectors + +Sanitary system: + Vacuum toilet (EVAC/Jets type): + Flush volume: 0.5–1.2 L per flush (vs. 6–10L for gravity toilet) + Vacuum: −0.4 to −0.6 bar(g) (generated by vacuum pumps or ejectors) + Pipe: DN40–DN50, PVC or CuNi, slope 1:200 toward collection tank + + Collection and treatment: + Holding tank: 5–50 m³ (per voyage and crew capacity) + Sewage treatment plant: IMO MEPC.227(64) certified (MARPOL Annex IV) + Biological treatment: activated sludge → settling → disinfection (UV/chlorine) + Effluent quality: TSS < 35 mg/L, BOD₅ < 25 mg/L, coliform < 100/100mL + + Grey water (washbasin, shower, galley, laundry): + Separate system from black water (toilet) + Holding tank or direct treatment + Overboard discharge: >3NM from shore (for untreated grey water) + +Galley and provisions: + Galley equipment: + Cooking range (electric): 10–30 kW per unit + Deep fat fryer: 15–25 kW, with fire suppression (Ansul R-102 wet chemical) + Combination oven: 10–20 kW + Dishwasher: 2–5 kW + Cold/frozen provision stores: + Temperature: +4°C (chill), −20°C (freeze) + Volume: per crew/passenger × voyage days × 0.03 m³/day/person + Refrigeration: R-404A/R-449A (commercial), separate condensing units +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class CabinType { Officer_Single, Crew_Single, Crew_Double, SeniorOfficer_Suite, Passenger_Inside, + Passenger_Balcony, Passenger_Suite }; +enum class FireRating { A_60, A_30, A_15, B_15, C_Class }; +enum class InsulationType { MineralWool_Rockwool, CeramicFiber, CalciumSilicate, Aerogel }; +enum class HVAC_ChillerType { ScrewCompressor, Centrifugal, Scroll, Absorption }; +enum class VentilationZone { Cabin, Corridor, PublicSpace, Galley, Bridge, EngineControlRoom, Hospital }; +enum class NoiseZone { Zone_I_CabinsHospital, Zone_II_CrewAccom, Zone_III_WorkingAreas }; +enum class ToiletType { Vacuum_EVAC, Gravity_Siphonic, Incinerating }; +enum class FloatingFloorType { MineralWool_Steel, RubberMat_Damped, ConstrainedLayer }; + +struct ModularCabinSpec { + CabinType type; + double length_mm; + double breadth_mm; + double clear_height_mm; + double floor_area_m2; + double cabin_weight_kg; // complete with MEP + furniture + FireRating rating_walls; + FireRating rating_ceiling; + FireRating rating_deck; + bool has_sanitary_unit; + bool has_window; // porthole or large window + double window_area_m2; + int num_electrical_outlets; + int num_lighting_fixtures; +}; + +struct CabinBlockSpec { + std::string block_id; + int num_cabins; + double block_length_mm; + double block_breadth_mm; + double block_height_mm; + double total_weight_tonnes; + int deck_number; + int num_mep_connections; +}; + +struct FireInsulationSpec { + FireRating achieved_rating; + InsulationType material; + double insulation_thickness_mm; + double density_kg_per_m3; + double pin_density_per_m2; + bool surface_temp_compliant; // <140°C rise per SOLAS + int standard_fire_resistance_min; // 15, 30, or 60 +}; + +struct HVAC_DesignInput { + double vessel_L_pp_m; + double accommodation_volume_m3; + int num_cabins; + int crew_count; + int passenger_count; // 0 for cargo ships + double window_area_total_m2; + double window_shgc; + HVAC_ChillerType chiller_type; + VentilationZone zone; + double outdoor_design_temp_dry_C; // tropical: 35°C + double outdoor_design_temp_wet_C; // tropical: 30°C + double indoor_design_temp_C; // 24°C + double indoor_design_RH_pct; // 50% RH +}; + +struct HVAC_DesignOutput { + double total_cooling_load_kW; + double sensible_load_kW; + double latent_load_kW; + double fresh_air_flow_m3_per_h; + double supply_air_flow_m3_per_h; + int num_chillers; + double chiller_capacity_each_kW; + double chiller_power_each_kW_electrical; + double cop_plant; + int num_ahus; + double ahu_capacity_each_m3_per_h; +}; + +struct CabinState { + bool cabin_positioned; + bool walls_aligned; + bool mep_connected; + bool fire_insulation_complete; + bool furniture_installed; + bool final_clean; + bool ready_for_handover; +}; + +struct OutfittingPerformance { + double cabin_installation_rate_per_day; + double average_cabin_cycle_time_h; + double mep_connection_time_per_cabin_h; + double temperature_deviation_from_setpoint_K; + double noise_level_dBA_in_cabin; + double cabin_floor_vibration_mm_per_s_RMS; + bool solas_fire_division_pass; + bool mlc_2006_crew_accommodation_pass; +}; + +ModularCabinSpec design_modular_cabin( + CabinType type, FireRating wall_rating, bool with_sanitary, bool with_window); + +CabinBlockSpec design_cabin_block( + int num_cabins, int deck, double block_length_mm, double block_breadth_mm); + +FireInsulationSpec design_fire_insulation( + FireRating target_rating, InsulationType material, double structural_deck_thickness_mm); + +HVAC_DesignOutput design_hvac_system(const HVAC_DesignInput& input); + +CabinState initialize_cabin_state(); + +OutfittingPerformance simulate_outfitting_installation( + std::vector& cabins, CabinBlockSpec& block, CabinState& state, double ambient_temp_C); + +double calculate_hvac_cooling_load( + double accommodation_volume_m3, int people_count, double window_area_m2, double outdoor_temp_C, double indoor_temp_C, double solar_radiation_W_per_m2); + +double estimate_noise_transmission( + double source_level_dB, double panel_mass_kg_per_m2, double frequency_Hz, double distance_m); + +double calculate_floating_floor_improvement( + double mineral_wool_thickness_mm, double density_kg_per_m3, double resilient_mount_deflection_mm); + +} // namespace vde::shipbuilding +``` + + +### 5. Electrical & Power Systems (P1) + +#### 5.1 MV/LV Generation and Distribution, PMS, and Emergency Power + +``` +Electrical & power systems overview: + Ships are isolated microgrids generating their own electricity through + diesel generators (3–6 units) and shaft generators (PTO/PTI). The power + system ranges from a few hundred kW (small cargo) to >100 MW (cruise ship + with electric propulsion). Medium-voltage (MV) at 6.6kV or 11kV is used + for large loads (>500 kW) and electric propulsion; low-voltage (LV) at + 440V/230V for general distribution. + +Power generation: + Diesel generator (GenSet): + Prime mover: 4-stroke medium-speed diesel (400–1,200 RPM) + Alternator: synchronous, brushless (PMG exciter), 3-phase + Voltage: 440V (LV), 6.6kV or 11kV (MV) + Frequency: 50Hz (IEC standard) or 60Hz (US/Japan convention) + Power factor: 0.8 lagging (rating), 0.85–0.95 (actual with motor loads) + Insulation class: F (155°C) winding, B (130°C) temperature rise + Enclosure: IP23/IP44 (drip-proof or splash-proof for marine) + + Generator sizing: + Total installed power = Σ (essential loads + service loads + future margin) + + Essential loads (must be supplied under any condition): + Steering gear, navigation/communication, fire/bilge pumps, emergency lighting + Service loads (can be shed for overload): + HVAC chillers (∼30–40% of total load) + Galley equipment + Cargo handling equipment + Future margin: 15–25% (for mid-life equipment additions) + + Load analysis (Electrical Load Balance): + Three operating conditions analyzed: + Condition 1: Sea going (normal cruise, all essential + most services) + Condition 2: Manoeuvring (bow/stern thrusters, steering gear, air compressors) + Condition 3: Port / Cargo handling (cargo pumps, cranes, ballast pumps) + + Each condition specifies load list with: + - Continuous load: motors running continuously (sea water pumps, FW pumps, fans) + - Intermittent load: motors run periodically (compressors, purifiers) + - Standby: motors available but not running (spare pump) + + Demand factor (diversity): + P_estimated = Σ (P_rated_i × D_i × U_i) + D_i = demand factor (0.3–1.0, an allowance for motor running below full load) + U_i = utilization factor (fraction of time running, 0.1–1.0) + Peak load typically 60–80% of total connected load + + Generator parallel operation: + Load sharing: + Isochronous governing (constant frequency regardless of load): + Proportional + integral controller + Reacts to: frequency deviation → adjust fuel rack + Droop governing (for load sharing between generators): + f = f_0 − m × P [Hz] + m = droop coefficient (3–5% at full load) + f_0 = no-load frequency setpoint (adjustable, for synch) + + Synchronization: + Conditions for breaker closure: + 1. Voltage difference < 5% (ΔV) + 2. Frequency difference < 0.2 Hz (Δf) + 3. Phase angle difference < 10° (Δφ) + 4. Phase sequence match (must be verified at commissioning) + Synchroscope: analog/digital meter for breaker close timing + Auto-synchronizer: electronic device controlling governor + AVR for closing + + Load-dependent start/stop (PMS function): + If load > 85% of running capacity → start next GenSet + If load < 30% of capacity with one GenSet stopped → stop GenSet + Hysteresis: prevents hunting (e.g., stop delay 5 minutes after condition met) + + AVR (Automatic Voltage Regulator): + Controls generator excitation current to maintain terminal voltage + Voltage: ±2.5% steady-state, ±15% transient (within 1.5s recovery) + Reactive power sharing: + Cross-current compensation (CT loop between AVRs of parallel generators) + Ensures proportional sharing of reactive load (kVAR) + Without compensation → circulating currents between generators + +Shaft generator (PTO/PTI): + PTO (Power Take-Off): + Main engine drives alternator via gearbox PTO + Constant frequency requires either: + - Controllable pitch propeller (constant main engine RPM at sea) + - Frequency converter (AC-DC-AC) for fixed pitch propeller + Advantages: lower SFOC (main engine vs. GenSet), reduced GenSet hours + + PTI (Power Take-In): + Electric motor on gearbox → assists main engine (booster mode) + Or: emergency propulsion (take-home mode) via electric motor only + Typical power: 10–30% of main engine MCR + + Frequency converter: + AFE (Active Front End): IGBT rectifier + inverter + Power range: 500–6,000 kW + Harmonics: <5% THDi (12-pulse equivalent or better) + Efficiency: ~96–97% + Regenerative capability (for PTI mode) + +MV switchboard: + Busbar: copper (rectangular bars), 1000–4000A rating + Short-circuit withstand: 50–100 kA for 1 second (per IEC 61439) + Insulation: air-insulated (metal-clad) for marine MV + IP rating: IP4X (front), IP2X (rear/side) + + Circuit breaker: + Vacuum circuit breaker (VCB): for MV (3.3–11 kV) + SF₆ CB: for higher voltages, but being phased out (GHG) + Rated current: 630–4,000A + Breaking capacity: 25–50 kA (symmetrical) + Protection relay: microprocessor-based (overcurrent, earth fault, differential) + + Bus tie: + Connects two bus sections for redundancy + Normally open (NO) for segregation + Auto-close on loss of one bus section + Check sync before closing (auto-synchronizer) + +LV switchboard: + Air circuit breaker (ACB): + Rated: 630–6,300A + Withdrawable type: can be racked out for maintenance + Protection: LSIG (Long-time, Short-time, Instantaneous, Ground fault) + + MCC (Motor Control Center): + Drawer-type starters (plug-in) + Contactor + thermal overload relay + MCB for short-circuit + Control voltage: 230VAC or 24VDC + + Protection coordination (selectivity): + Time-current curve analysis: + Upstream CB trip delay > downstream CB clearing time + Total discrimination: for critical circuits (steering gear, fire pump) + Partial discrimination: for non-critical (cabin outlets) + ELCI/ELCB (Earth Leakage): 30mA (personal protection), 300mA (fire prevention) + +Transformer: + MV/LV distribution transformer: + Primary: 6.6kV or 11kV + Secondary: 440V (3-phase, 3-wire) + 230V (1-phase via phase-to-neutral) + Vector group: Dyn11 (delta primary, star secondary with neutral) + Impedance: 4–6% (for fault current limitation) + Cooling: AN (air natural) or AF (air forced) + K-factor rating: K-4 to K-13 (for harmonic-rich loads, e.g., VFD drives) + Efficiency: >98% (at 50–100% load) + Enclosure: IP23 or better + +Harmonics: + Sources of harmonics: + VFD (Variable Frequency Drive): 6-pulse rectifier → 5th, 7th, 11th, 13th harmonics + THDi ~30% for 6-pulse without mitigation + 12-pulse rectifier: THDi ~10–12% (5th and 7th cancelled) + AFE rectifier: THDi <5% + UPS (Uninterruptible Power Supply) + LED lighting (switched mode power supplies) + Electronic ballast + + Effects: + Transformer overheating (eddy current losses proportional to h² I²) + Neutral conductor overloading (triplen harmonics: 3rd, 9th, 15th sum in neutral) + Capacitor bank resonance (LC circuit with transformer inductance) + Generator voltage distortion (avr response issues) + + Mitigation: + Passive filter (series LC tuned to 5th or 7th harmonic) + Active harmonic filter (injects equal-opposite harmonic current) + Phase-shifting transformer (12-pulse or 24-pulse multi-winding) + +Emergency power system (SOLAS II-1/Part D): + Emergency generator: + Location: above uppermost continuous deck (outside machinery space) + Fuel: dedicated tank (18h at full load for cargo, 36h for passenger) + Auto-start: within 45s of main power failure + Capacity: for all emergency loads simultaneously + + Emergency loads: + - Emergency lighting (escape routes, muster stations, boat stations) + - Navigation lights, signal lights + - Communication equipment (GMDSS) + - Fire detection and alarm + - One fire pump + - Steering gear (if electrically powered) + - Watertight door operation + - Elevator recall + + Transitional power: + Battery-backed UPS: 30 min autonomy (until emergency generator online) + For: emergency lighting in critical areas (engine control room, bridge, stairways) + +Cable and wiring: + Cable types per IEC 60092: + Flame retardant (IEC 60332-3 Cat A): for all interior cables + Fire resistant (IEC 60331, 750°C for 90 min): for emergency circuits + Halogen-free (IEC 60754): low smoke, non-toxic + Sheath: SHF1 (thermoset) or SHF2 (thermoplastic), mud-resistant for offshore + + Cable sizing: + Current-carrying capacity: per IEC 60364-5-52 tables (ampacity) + De-rating factors: + Grouping: 0.7–0.85 (for multiple cables in tray/conduit) + Ambient temperature: 0.85–1.0 (depending on installed location temp) + Thermal insulation: 0.5 (if cable completely surrounded by insulation) + + Voltage drop: + ΔV = I × L × (R × cos φ + X × sin φ) [V per conductor] + Per IEC: max 6% for power, max 4% for lighting (from main switchboard) + R = resistance per unit length [Ω/m] (at operating temperature) + X = reactance per unit length [Ω/m] (<0.1 mΩ/m for LV cables) + + Short-circuit withstand: + I²t rating must exceed let-through energy of upstream protective device + Minimum cable CSA: s = (I_sc × sqrt(t)) / k [mm²] + k = 143 (copper XLPE), k = 95 (copper PVC) + +Cathodic protection: + Hull corrosion prevention: + Impressed Current Cathodic Protection (ICCP): + DC power supply + inert anodes (MMO/Ti or platinized Ti/Nb) on hull + Reference electrode (Ag/AgCl or Zn) → controller → adjust current + Protection potential: −800 mV to −1050 mV vs. Ag/AgCl (for steel in seawater) + Output: 50–500 A (for large vessels) + + Sacrificial anodes (traditional): + Zinc or aluminum alloy anodes, welded/bolted to hull, rudder, sea chests + Anode mass calculation: + M = I_c × T × 8,760 / (Q × U) [kg] + I_c = total cathodic protection current demand [A] + T = design life [years] + Q = electrochemical capacity (780 Ah/kg for Zn, 2,500 Ah/kg for Al) + U = utilization factor (0.85–0.90) +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class GeneratorVoltage { LV_440V, MV_6_6kV, MV_11kV, HV_13_8kV }; +enum class GeneratorFrequency { Hz50, Hz60 }; +enum class BreakerType { ACB_LV, VCB_MV, SF6_HV, MCCB }; +enum class ProtectionFunction { L, S, I, G, Differential, REF_RestrictedEarthFault }; +enum class TransformerVector { Dyn11, Dyn5, Yyn0, YNd11 }; +enum class EmergencyStartType { AutoStart_45s, ManualStart, BatteryUPS_30min }; +enum class CableType { FlameRetardant_XLPE, FireResistant_MICC, HalogenFree_LSZH, MudResistant }; +enum class CathodicProtectionType { ICCP_MixedMetalOxide, Sacrificial_Zn, Sacrificial_Al }; + +struct GeneratorSpec { + std::string gen_id; + double rated_power_kWe; + double rated_power_kVA; + double rated_voltage_V; + GeneratorFrequency frequency; + double rated_power_factor; // 0.8 + double insulation_class_temp_C; + int engine_speed_RPM; // GenSet prime mover speed + double sfc_at_rated_load_g_per_kWh; + std::string excitation_type; // "brushless_PMG", "static_thyristor" +}; + +struct LoadAnalysisInput { + std::string condition; // "sea_going", "manoeuvring", "port" + std::vector load_names; + std::vector rated_power_kW; + std::vector demand_factor; + std::vector utilization_factor; + std::vector is_essential; +}; + +struct LoadAnalysisOutput { + double total_connected_kW; + double estimated_demand_kW; + double estimated_demand_kVA; // considering power factor + double peak_demand_kW; + double essential_load_kW; // for emergency generator sizing + int online_generators; + double generator_loading_pct; + bool has_sufficient_capacity; +}; + +struct PMS_Config { + double start_threshold_pct; // start next GenSet when load > 85% + double stop_threshold_pct; // stop GenSet when load < 30% + double stop_delay_minutes; // 5 min hysteresis + bool load_shedding_enabled; + std::vector sheddable_loads; // HVAC, galley, etc. + double frequency_tolerance_Hz; + double voltage_tolerance_pct; +}; + +struct SwitchboardSpec { + double rated_voltage_V; + double rated_busbar_current_A; + double short_circuit_withstand_kA_1s; + BreakerType incomer_breaker_type; + int num_feeder_breakers; + std::string bus_section; // "MSB-A", "MSB-B", "ESB" + bool has_bus_tie; + double bus_tie_rated_current_A; +}; + +struct TransformerSpec { + double primary_voltage_V; + double secondary_voltage_V; + TransformerVector vector_group; + double rated_power_kVA; + double impedance_pct; + double no_load_loss_kW; + double load_loss_at_rated_kW; + std::string cooling_type; // "AN", "AF" + double k_factor; +}; + +struct CableSpec { + CableType type; + double conductor_cross_section_mm2; + double current_carrying_capacity_A; + double resistance_per_m_Ohm; + double reactance_per_m_Ohm; + double de_rating_grouping_factor; + double de_rating_temperature_factor; + double insulation_temperature_rating_C; // 90°C for XLPE, 70°C for PVC +}; + +struct EmergencyPowerSpec { + double emergency_load_kW; + double emergency_gen_rated_kWe; + EmergencyStartType start_type; + double fuel_tank_autonomy_h; // 18h cargo, 36h passenger + double ups_backup_time_min; // 30 min for transitional + bool auto_start_test_pass; +}; + +struct ElectricalState { + double total_load_kW; + double generator_loading_pct; + double frequency_Hz; + double bus_voltage_V; + int online_generators; + bool blackout_detected; + bool emergency_gen_running; + double thd_v_pct; // voltage total harmonic distortion +}; + +struct ElectricalPerformance { + double fuel_consumption_at_sea_load_kg_per_h; + double generator_efficiency_weighted; + double voltage_drop_furthest_point_pct; + bool load_sharing_within_tolerance; + bool protection_discrimination_verified; + double short_circuit_current_at_MSB_kA; + bool emergency_start_time_achieve_45s; + bool solas_reg_ii_1_pass; +}; + +GeneratorSpec select_generator( + double required_power_kWe, GeneratorVoltage voltage, GeneratorFrequency freq); + +LoadAnalysisOutput analyze_electrical_load(const LoadAnalysisInput& input); + +SwitchboardSpec design_main_switchboard( + double rated_voltage_V, double total_demand_kW, int num_generator_bays, int num_feeder_bays); + +TransformerSpec design_distribution_transformer( + double primary_voltage_V, double secondary_voltage_V, double load_kVA, TransformerVector vector); + +CableSpec size_cable( + CableType type, double load_current_A, double length_m, double allowable_voltage_drop_pct, double system_voltage_V); + +EmergencyPowerSpec design_emergency_power( + double essential_load_kW, EmergencyStartType start, bool is_passenger_vessel); + +PMS_Config configure_power_management( + int total_generators, double generator_rating_kWe, bool load_shedding_enabled); + +ElectricalState initialize_electrical_state(const GeneratorSpec& gens); + +ElectricalPerformance simulate_power_system( + const GeneratorSpec& gens, const SwitchboardSpec& swbd, const PMS_Config& pms, ElectricalState& state, double load_demand_kW); + +double calculate_short_circuit_current( + double generator_rating_kVA, double subtransient_reactance_Xd_pp_pct, double transformer_impedance_pct, double cable_impedance_Ohm); + +double estimate_harmonic_distortion( + double vfd_load_pct, int pulse_rectifier, bool has_active_filter); + +double calculate_voltage_drop( + double load_current_A, double cable_length_m, double resistance_Ohm_per_m, double reactance_Ohm_per_m, double power_factor); + +} // namespace vde::shipbuilding +``` + + +### 6. Navigation & Automation (P1) + +#### 6.1 ECDIS, Radar, DP, IAS Integrated Automation, and GMDSS + +``` +Navigation & automation overview: + Modern ship navigation integrates electronic charts (ECDIS), radar + (X/S band), satellite positioning (GNSS/DGPS), and autopilot systems + for safe and efficient voyage execution. Integrated Automation Systems + (IAS) monitor and control machinery (5,000–20,000 I/O points), with + Power Management (PMS) and alarm/event logging. Dynamic Positioning + (DP) enables station-keeping for offshore vessels, and GMDSS provides + global maritime distress and safety communications. + +ECDIS (Electronic Chart Display and Information System): + Chart formats: + ENC (Electronic Navigational Chart): IHO S-57 / S-100 vector format + S-57 objects: depth areas, obstructions, buoys, traffic separation + S-100 (next-gen): richer data, S-101 ENC, S-102 bathymetry, S-104 water levels + RNC (Raster Navigational Chart): georeferenced scanned paper chart + SENC (System ENC): converted ENC for ECDIS internal use + + Display categories: + Base: coastline, own ship, safety contour + Standard: base + traffic separation, aids to navigation, restricted areas + All: all chart data (full display) + + Safety contour: + Depth contour selected by user (per vessel maximum draft + squat + UKC) + Highlights: unsafe water ( safety contour + + Route planning and monitoring: + Route check: ECDIS automatically checks route for navigational hazards + Cross-track error (XTE): perpendicular distance from planned route + Look-ahead: distance ahead to check (user-defined, typically 1–6 NM) + CPA/TCPA alarm: Closest Point of Approach / Time to CPA with other vessels + + Sensors feeding ECDIS: + Position: GNSS / DGPS (resolution 1m, accuracy <10m for GPS, <1m for DGPS) + Heading: Gyrocompass (0.1° secant latitude accuracy) + Speed: Speed log (Doppler or electromagnetic) + Depth: Echo sounder + +Marine radar: + Radar bands: + X-band (9.3–9.5 GHz, λ ≈ 3.2 cm): + Better resolution (shorter wavelength) + More affected by rain/sea clutter + Narrow beam: 0.7–2° (for 1.2–4m antenna) + S-band (2.9–3.1 GHz, λ ≈ 10 cm): + Better penetration through rain + Less sea clutter + Wider beam: 1.8–2.5° (for 3.7m antenna) + + Radar range equation: + R_max = (P_t × G² × λ² × σ / ((4π)³ × S_min))^(1/4) + P_t = transmitted peak power (25–30 kW for X-band, 30 kW for S-band) + G = antenna gain (~30 dBi for 2m antenna at X-band) + σ = target radar cross-section (RCS) [m²] + S_min = minimum detectable signal [W] + + Range resolution: + ΔR = c × τ / 2 [m] + τ = pulse duration: 0.05–1.2 µs (short for range accuracy, long for detection) + ΔR ≈ 7.5–180 m (for the pulse durations above) + + Azimuth resolution: + Δθ = θ_3dB (3dB beamwidth) [rad] + Δs = R × θ_3dB [m] (cross-range resolution at range R) + + STC (Sensitivity Time Control): + Reduces receiver gain at short ranges + Compensates for 1/R⁴ decay (radar equation) + STC curve: gain increases with range, flat after ~6–8 NM + + FTC (Fast Time Constant / Rain clutter): + Differentiates the video signal + Highlights pulse leading edges (targets), suppresses extended returns (rain) + + CFAR (Constant False Alarm Rate): + Adaptive threshold: background noise + clutter level → threshold + Maintains constant false alarm probability (typically 10⁻⁴ to 10⁻⁶) + Cell-averaging CFAR (CA-CFAR): sliding window average of adjacent range cells + + ARPA / MARPA (Automatic / Manual Radar Plotting Aid): + Tracked Targets: ARPA automatically acquires and tracks targets + Min tracked targets: 40–100 (per IMO performance standard) + Tracking filter: α-β or Kalman filter (estimate position + velocity) + Target vector: true (ground-referenced) or relative (own-ship-referenced) + Trial manoeuvre: simulate course/speed change → see effect on CPA/TCPA + + Radar performance standard (IMO Resolution MSC.192(79)): + Range accuracy: ±30m (or 1% of range scale, whichever greater) + Bearing accuracy: ±1° + CPA/TCPA accuracy: within ±0.5 NM / ±1 min + +Autopilot: + Heading control: + PID controller: + δ_cmd = Kp × e_ψ + Ki × ∫e_ψ dt + Kd × d(e_ψ)/dt [deg rudder angle] + e_ψ = ψ_set − ψ_actual [deg] (heading error) + + Rudder limiter: |δ_cmd| < δ_max (typically ±35°) + Rate limiter: |dδ/dt| < δ_dot_max (typically 2.5–5.0 °/s for steering gear) + + Auto-tuning: + Ship dynamics: Nomoto 1st-order model + T × dω/dt + ω = K × δ + T = time constant, K = rudder gain, ω = yaw rate + Ziegler-Nichols or relay feedback for PID parameter identification + + Track control: + Waypoint navigation: steer from waypoint A → B + Cross-track error (XTE): + e_x = cross-track distance from planned route [m] + Correction: yaw angle = ψ_route + atan(K_xte × e_x / V) + Waypoint change: + Wheel-over point: distance before waypoint where turn begins + Radius of turn: R = V² / (g × tan(φ_max)) [m] + + Fuel optimization: + Rudder motion minimization (each rudder deflection increases drag) + Adaptive deadband: wider deadband in calm sea, narrower in rough sea + Feedforward from rate-of-turn gyro + +GNSS / DGPS positioning: + GNSS constellations: + GPS (USA): 31 satellites, L1 1575.42 MHz (C/A code civil), L2 1227.60 MHz + GLONASS (Russia): 24 satellites, L1 1602 + k×0.5625 MHz + Galileo (EU): 30 satellites, E1 1575.42 MHz (interoperable with GPS) + BeiDou (China): 35 satellites, B1 1561.098 MHz + + Position accuracy: + Standalone GNSS: 3–10 m (95%, CEP) + DGPS (Differential GPS): <1 m (95%) + Reference station at known position → compute correction → broadcast via MF beacon + IALA beacon: 283.5–325 kHz, range 200–400 km + + Position dilution of precision (PDOP): + PDOP = sqrt(σ_x² + σ_y² + σ_z²) / σ_UERE + Good geometry: PDOP < 3 + +Gyrocompass: + Principle: earth rotation → gyroscopic precession → north-seeking + Alignment time: 3–6 hours (from cold) + Accuracy: <0.1° × secant (latitude) (heading), <0.2° (roll/pitch) + Settling time after power interruption: <1h + Output: heading, rate of turn, roll, pitch (via NMEA 0183 or serial) + +Speed log: + Doppler log: + Transmits acoustic pulses (1–4 beams, Janus configuration) + Frequency shift per Doppler effect: + Δf = 2 × V × f₀ × cos(θ) / c + f₀ = transmit frequency (typically 200–300 kHz for bottom track) + θ = beam depression angle (typically 60° from horizontal) + Ground speed (bottom track): depth < 200–300m + Water speed (water track): depth > 300m (volume reverberation, 10–30m below keel) + Accuracy: ±0.1 kn or 1% of speed + + Electromagnetic log: + Faraday principle: seawater conductor moves through magnetic field → induced voltage + V = B × L × v (B = magnetic field, L = electrode spacing, v = water velocity) + Only water speed (no bottom tracking) + Accuracy: ±0.1 kn + +Echo sounder: + Single-beam: 200 kHz for high resolution, 50 kHz for deeper penetration + Depth = c × t / 2 + c = sound velocity in water (~1,500 m/s, varies with temperature/salinity) + t = round-trip time + Minimum depth alarm: set at keel draft + UKC (Under Keel Clearance) + UKC minima: >20% of static draft (open sea), >10% of draft (restricted water, harbour) + +Integrated Automation System (IAS): + System architecture: + Field level: sensors (temperature, pressure, flow, level, vibration), actuators (valves, dampers) + Controller level: PLC (Programmable Logic Controller) or DCS (Distributed Control System) + Redundancy: dual CPU, hot standby + Supervisory level: SCADA (Supervisory Control and Data Acquisition) + HMI workstations (bridge, engine control room, cargo control room) + Operator stations: 2–4 screens, alarm bar, trend displays + Management level: ship server (data historian, reporting) + + I/O count: + Small vessel (offshore supply): 2,000–5,000 I/O + Medium vessel (container/tanker): 5,000–10,000 I/O + Large vessel (cruise/LNG): 10,000–20,000 I/O + + Communications: + Fieldbus: PROFIBUS DP, Modbus RTU, CANopen + Control network: Ethernet/IP, PROFINET, Modbus TCP + Backbone: redundant Ethernet ring (RSTP/MRP for <50ms failover) + + Alarm management per IMO / IEC 61924: + Priority levels: + Emergency: immediate danger (fire, flooding, blackout) → audible + visual + Alarm: equipment failure/trip requiring immediate action + Warning: abnormal condition not yet critical + Event: normal state change (pump start/stop), logged only + Alarm shelving: operator can temporarily suppress known alarms (time-limited) + Alarm flood prevention: dynamic alarm suppression (e.g., suppress all pump alarms on blackout) + +Dynamic Positioning (DP): + DP classes per IMO MSC/Circ.645 and IMCA M 140: + DP Class 1: no redundancy (loss of position on single fault) + DP Class 2: redundancy (no single fault causes position loss) + All components duplicated: 2× position references, 2× DP controllers, 2× thrusters per axis + DP Class 3: DP Class 2 + physical separation (fire/flood resilient) + A60 fire division between redundant equipment spaces + Watertight subdivision + + DP control algorithm: + Position control: PID + wind feedforward + τ_x = Kp_x × e_x + Ki_x × ∫e_x dt + Kd_x × (de_x/dt) + τ_wind_x [kN] + e_x = x_set − x_actual [m] + Heading control: PID + Thrust allocation: + Given total force demand τ = [F_x, F_y, M_z]^T + Find thruster commands u that minimize: + J = u^T × W × u (minimize power) + Subject to: B × u = τ (force balance) + u_min < u < u_max (thruster saturation) + Solve via: Quadratic Programming (QP) or pseudo-inverse with saturation + + Position reference systems: + DGPS: 2–3 receivers (independent) + Hydroacoustic (HPR, HIPAP): transponder on seabed, accuracy ±0.1% of range + Taut wire: mechanical wire at constant tension, inclination sensors + Laser (Fanbeam/CyScan): laser rangefinder tracking reflector on platform + Artemis: microwave ranging system (legacy) + + Capability plot: + Polar diagram of maximum environmental force vessel can withstand at each heading + Wind speed: 20–40 knots (depending on operational requirement) + Current: 0.5–2.0 knots + Wave height: 1.5–4.0 m significant + + Limiting factors: + Thruster force saturation (at each heading) + Power generation limit (total thruster power) + Single failure criterion (for DP Class 2/3 → worst remaining thruster config) + + Consequence analysis: + Worst-Case Failure (WCF): + Identify single fault causing worst position excursion + Must not exceed watch circle (usually 2–5m radius or percentage of water depth) + Time to drift-off: vessel capacity to survive worst fault + +GMDSS (Global Maritime Distress and Safety System): + Sea areas: + A1: VHF coast station range (20–30 NM) + A2: MF coast station range (100–150 NM) + A3: Inmarsat coverage (between 70°N and 70°S) + A4: Polar regions (outside A3), HF only + + Equipment per area: + A1: VHF DSC (Ch70), VHF radiotelephone (Ch16), NAVTEX, EPIRB (406MHz), SART + A2: A1 + MF DSC (2187.5kHz), MF radiotelephone + A3: A2 + Inmarsat-C (EGC for MSI) or HF DSC + NBDP + A4: A3 equipment + HF DSC + HF NBDP (no Inmarsat north of 70°N) + + EPIRB (Emergency Position-Indicating Radio Beacon): + COSPAS-SARSAT 406 MHz (global coverage) + GNSS position encoded in message + Location accuracy: <5 NM (without GNSS), <120m (with GNSS) + Battery: 48h transmit, 5-year life + + SART (Search and Rescue Transponder): + 9 GHz X-band radar transponder + Responds to vessel radar → series of 12 dots on radar screen + Standby: 96h, transmit: 8h after activation + Range: 5–10 NM (from ship radar) +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class RadarBand { X_Band_9_4GHz, S_Band_3_0GHz }; +enum class DP_Class { DP1_NoRedundancy, DP2_SingleFaultSafe, DP3_FireFloodResilient }; +enum class PositionRefType { DGPS, Hydroacoustic_HPR, TautWire, LaserRange_Fanbeam, Artemis_Microwave }; +enum class GMDSS_SeaArea { A1_VHF, A2_MF, A3_Inmarsat, A4_PolarHF }; +enum class AlarmPriority { Emergency, Alarm, Warning, Event_LogOnly }; +enum class NavigationSensor { GNSS_DGPS, Gyrocompass, DopplerLog, EM_Log, EchoSounder, WindSensor }; + +struct GyrocompassSpec { + double heading_accuracy_deg; // <0.1° × secant(lat) + double roll_pitch_accuracy_deg; + double alignment_time_h; // 3–6h from cold + double settling_time_after_interrupt_h; + std::string output_protocol; // "NMEA0183", "serial" +}; + +struct RadarSpec { + RadarBand band; + double peak_power_kW; + double antenna_length_m; // 1.2–4m (X), 3.7m (S) + double beamwidth_horizontal_deg; + double pulse_duration_short_ns; // for range resolution + double pulse_duration_long_ns; // for detection + int max_range_NM; + int max_arpa_targets; + bool has_trial_manoeuvre; +}; + +struct ECDIS_Spec { + bool dual_installation; // SOLAS requirement for ECDIS as paperless + bool s_100_compatible; // next-gen ENC + int max_route_waypoints; + double look_ahead_distance_NM; + double shallow_contour_m; + double safety_contour_m; + double safety_depth_m; + double xtc_alarm_limit_NM; // cross-track error alarm +}; + +struct AutopilotSpec { + double kp_heading; + double ki_heading; + double kd_heading; + double max_rudder_angle_deg; + double rudder_rate_limit_deg_per_s; + double adaptive_deadband_deg; // calm sea deadband + bool track_control_enabled; + double wheel_over_distance_NM; +}; + +struct DPSystemSpec { + DP_Class dp_class; + int num_position_ref_systems; + std::vector position_ref_types; + int num_thrusters; + std::vector thruster_max_thrust_kN; + double watch_circle_radius_m; + double heading_hold_accuracy_deg; + double wind_speed_design_kn; + double current_speed_design_kn; +}; + +struct IAS_Spec { + int io_point_count; + bool dual_hot_standby_controller; + std::string fieldbus_type; // "PROFIBUS_DP", "Modbus_RTU" + std::string control_network; // "Ethernet_IP", "PROFINET" + bool redundant_backbone; + int num_operator_stations; + int max_alarm_rate_per_min; +}; + +struct GMDSS_Spec { + GMDSS_SeaArea sea_area; + bool has_vhf_dsc; + bool has_mf_dsc; + bool has_hf_dsc_nbdp; + bool has_inmarsat_c; + bool has_navtex; + bool has_epirb_406mhz; + bool has_sart_9ghz; + bool has_vhf_handheld_gmdss; +}; + +struct NavigationState { + double latitude; + double longitude; + double sog_kn; // Speed Over Ground + double cog_deg; // Course Over Ground + double heading_deg; + double rudder_angle_deg; + double depth_below_keel_m; + double wind_speed_kn; + double wind_direction_deg; + int arpa_tracked_targets; + double closest_cpa_NM; + double closest_tcpa_min; + bool collision_alarm; + bool off_track_alarm; +}; + +struct NavigationPerformance { + double position_accuracy_m_95pct; + double heading_accuracy_deg; + double autopilot_heading_deviation_rms_deg; + double cross_track_error_rms_m; + double dp_position_excursion_max_m; + bool dp_capability_plot_pass; + bool gmds_fit_for_area; +}; + +GyrocompassSpec select_gyrocompass(double operating_latitude_deg, double accuracy_requirement_deg); + +RadarSpec design_radar(RadarBand band, bool solas_cat, int target_vessel_size_m, double required_range_NM); + +ECDIS_Spec configure_ecdis(bool paperless_primary, bool s_100, double vessel_draft_m); + +AutopilotSpec tune_autopilot(double vessel_length_m, double vessel_displacement_t, double rudder_area_m2, double design_speed_kn); + +DPSystemSpec design_dp_system(DP_Class dp_class, double vessel_length_m, double wind_area_m2, int num_thrusters, double total_thruster_power_kW); + +IAS_Spec design_ias(int estimated_io_points, bool dual_redundant, std::string preferred_bus); + +GMDSS_Spec configure_gmdss(GMDSS_SeaArea sea_area, bool passenger_vessel); + +NavigationState initialize_navigation_state(); + +NavigationPerformance simulate_navigation_system( + const ECDIS_Spec& ecdis, const RadarSpec& radar, const AutopilotSpec& ap, NavigationState& state, double set_heading_deg, double set_speed_kn); + +double estimate_radar_max_range(double peak_power_kW, double antenna_gain_dBi, double target_rcs_m2, double noise_figure_dB, double frequency_GHz); + +double calculate_position_dop(double sat_elevations_deg[], int num_satellites); + +double estimate_cpa_tcpa(double own_lat, double own_lon, double own_sog, double own_cog, double target_lat, double target_lon, double target_sog, double target_cog, double& cpa_NM, double& tcpa_min); + +double dp_capability_residual_thrust(double wind_speed_kn, double current_speed_kn, double heading_deg, double total_thrust_kN); + +} // namespace vde::shipbuilding +``` + + +### 7. Cargo Handling Systems (P1) + +#### 7.1 Tanker Cargo, LNG, Container Cell Guides, and Ro-Ro Ramp Systems + +``` +Cargo handling systems overview: + Cargo handling is vessel-type-specific, ranging from liquid cargo pumping + systems on tankers, cryogenic cargo containment on LNG carriers, cell guide + systems on container ships, to Ro-Ro ramp and deck systems. Each system + has unique engineering requirements for capacity, safety (especially + hazardous cargo), structural integration, and regulatory compliance. + +Tanker cargo system: + Cargo oil pump: + Type: + Steam turbine-driven centrifugal: traditional VLCC + Electro-hydraulic submerged: modern double-hull tankers + Hydraulic power pack + submerged pump in each tank (or group of tanks) + Electric deepwell pump: motor above deck, long shaft to impeller below + + Capacity per pump: 2,000–5,000 m³/h (for VLCC) + Number of pumps: 3–4 (can combine for max rate) + Total discharge rate: 10,000–15,000 m³/h (VLCC, 300m LOA) + Strip pump: small pump (~150 m³/h) for final stripping (residual <0.1% of tank) + + Cargo piping: + Material: carbon steel (with internal epoxy lining for product tankers) + Diameter: DN400–DN700 (main cargo line) + Manifold: midship port + starboard, DN400 + Valves: butterfly (remote hydraulic) or gate + + Hydraulic analysis: + Pipe pressure drop: Darcy-Weisbach (as per Section 3) + NPSH check: NPSH_available > NPSH_required + 0.5m margin + NPSH_a = (p_atm + ρ×g×h_submergence − p_vapor) / (ρ×g) [m] + For cargo pumps: suction from tank bottom → h_submergence varies from + tank full (~20m submerged) to near-empty (<1m) + Cavitation risk: when NPSH_a < NPSH_r, cavitation occurs + + Inert Gas System (IGS): + Purpose: maintain O₂ < 8% (preferred <5%) in cargo tank atmosphere + Sources: + Flue gas (IGG — Inert Gas Generator): + Boiler exhaust (O₂ typically 2–5%) + Scrubbed (cooled + SO₂ removal) → deck seal (water seal prevents backflow) → distribution + Capacity: 1.25× max cargo discharge rate (m³/h) + N₂ generator (PSA — Pressure Swing Adsorption or membrane): + High-purity N₂ (O₂ <1%, typically <0.5%) + Lower capacity, used for chemical/product tankers needing high purity + + Deck water seal: + Double-block device preventing cargo vapor backflow to engine room + Water level: maintained by dedicated pump + + Distribution: + IGS main line: DN400–DN600 + Branch to each tank: DN150–DN250 + PV valve (Pressure-Vacuum): on each tank + Pressure relief: +1,400 to +2,100 mmWG + Vacuum relief: −350 to −700 mmWG + P/V breaker: for over/under-pressure protection of cargo tanks + + Crude Oil Washing (COW): + COW machines: fixed or portable, rotating nozzles + Driven by: cargo oil (from discharge line, before metering) + Coverage: programmed cycle per tank (wash all surfaces) + Oil volume: ~3 m³/h per machine at 10 bar + Purpose: reduce sludge accumulation (MARPOL Annex I) + +LNG cargo system: + Cargo containment: + Membrane (GTT Mark III / NO96): + Mark III: corrugated stainless steel 304L (1.2mm) primary + + triplex (aluminum foil + fiberglass) secondary barrier + Insulation: reinforced polyurethane foam (RPUF), ~270mm + NO96: Invar (36% Ni steel, 0.7mm) primary + secondary membrane + Insulation: plywood boxes filled with perlite + Overall Boil-off Rate (BOR): 0.10–0.15% per day (design target) + + Moss spherical (Type B, Kvaerner-Moss): + Al alloy (5083) spheres, 40–45m diameter + Equatorial ring support, no secondary barrier needed (Type B leak-before-failure) + Higher BOR: 0.15–0.20% per day (due to larger surface/volume) + No sloshing constraint (sphere geometry) + + Cargo pump: + Submerged electric centrifugal (in-tank pump): + Motor: submerged in LNG (−162°C), cooled by cargo flow + Capacity: 1,500–2,000 m³/h per pump + Number: 2 per tank (main + stripping) + Head: 120–160 m (for discharge to shore) + + Boil-off gas management: + BOG compression: + Low-duty compressor: 5,000–10,000 m³/h (for normal BOG) + High-duty compressor: 15,000–25,000 m³/h (for loading + gas-up) + Discharge pressure: 4–6 bar(g) for engine supply or reliquefaction + + Reliquefaction (partial or full): + Nitrogen expansion cycle: Brayton reversed cycle + N₂ compressed → expanded → −175°C for LNG condensation + BOG → cold box (plate-fin heat exchanger) → LNG return to tank + Capacity: 5–15 t/h BOG reliquefaction + + Gas combustion unit (GCU): + Backup for BOG disposal (when reliquefaction down and engines can't take all) + + Fuel gas supply to engines: + ME-GI (high pressure): compressor to ~300 bar → gas injection valve + X-DF (low pressure): compressor to ~16 bar → gas admission valve + + Sloshing analysis: + Sloshing: wave motion inside partially-filled tank + Resonance condition: + f_excitation = n × f_natural [Hz] + f_natural ≈ (1/2π) × sqrt(g × π / L_tank × tanh(π × h / L_tank)) + Especially critical at h/L_tank ≈ 0.10–0.30 (fill heights) + + Impact pressure: + Peak pressure up to several bar (highly localized) + Can damage membrane + insulation + + Mitigation: + Filling restrictions: avoid 10–70% fill for sea going, or only fill above 70% + Baffle plates (not used in LNG — membrane risk) + Anti-sloshing bulkhead (in large tanks) + +Container ship cargo system: + Cell guides: + Vertical guide rails in cargo holds and on deck + Material: flat bar (50–100mm wide × 15–30mm thick), AH36 steel + Entry guide: flared top (30° flare) for container insertion + Transverse tolerance: ±3–5mm (between adjacent cell guide faces) + Guide length: full hold height (multi-tier, typically 6–9 tiers in hold, 5–7 on deck) + + Container securing: + Twistlock (corner casting interface): + Manual: semi-automatic twistlock (single/double cone) + Auto-lock: activates on container landing (all-secure, fully automatic) + Shear strength: 250–420 kN (depending on model and manufacturer) + + Lashing bridge (on deck): + Vertical box structure supporting lashing rods + Lashing rod: solid bar (φ22–27mm) with turnbuckle + Lashing angle: 30–60° from horizontal + Stack weight: each container secured to lashing bridge at base of its stack + Maximum stack weight: ~200–300 tonnes (12 containers × 24t each, empty + loaded mix) + + Lashing calculation (per CSS Code, IMO Resolution A.714(17)): + Forces acting on container stack: + Roll: F_y = m × a_y × g [kN] + a_y = transverse acceleration (0.6–0.8g for deck, depending on position) + Pitch/Heave: F_z = m × a_z × g [kN] (vertical acceleration) + Wind: F_wind = 0.5 × ρ × V_w² × C_D × A_side [N] + + Each container tier's lateral force distributed to: + Base twistlocks (at bottom of container) + Lashing rods (at base + mid-point of stack) + + Lashing rod tension: + T_i = F_side_i / (cos α × sin β) [kN] + α = horizontal angle between rod and container face + β = vertical angle between rod and horizontal + + Twistlock foundation: + Deck socket or hatch cover socket: + Dimensional tolerance: ±1mm (for proper twistlock engagement) + Weld: full penetration, UT tested + Material: cast steel (GS-52) or forged (42CrMo4) + Fatigue: reversing loads from ship motion + +Bulk carrier cargo system: + Cargo hold: + Hopper side tank (lower wing) + top side tank (upper wing) + Sloping plates: 30–45° (for cargo gravity flow, angle of repose) + Volume: 5,000–35,000 m³ per hold (depending on ship size) + Hatch cover: side-rolling or folding type, hydraulic/electric drive + + Structural analysis: + Cargo pressure (active wedge method): + p = ρ × g × h × K_a [kN/m²] + K_a = tan²(45° − φ/2) (Rankine active earth pressure coefficient) + φ = angle of internal friction of cargo (~30–40° for iron ore, 25–35° for coal) + For flooded hold (design condition): p = ρ_water × g × h + + Self-unloading system: + Hopper gate: hydraulically operated (12–20 gates per hold) + Belt conveyor: under hopper, 1,200–2,400mm width + Capacity: 2,000–6,000 t/h + Boom conveyor: slewing/luffing for shoreside discharge + Discharge rate control: gate opening position → belt speed → boom elevation + +Ro-Ro / Ro-Pax cargo system: + Stern ramp: + Design load capacity: 25–60 tonnes (axle load as per traffic type) + Car carrier: 2.5t per car axle (for cars) + Ro-Pax: 13t axle (for trucks, per EU Directive 96/53/EC) + Ro-Ro freight: 45–60t axle (for heavy trailers) + Dimensions: width 7–18m (single lane to double lane), length 15–45m + Construction: steel box girder, hydraulic cylinders (2–4) for hoist/lower + Angle to quay: ±10° (max), compensation via hinged flap + quay hinge + Weather seal: inflatable seal when stowed (watertight up to design head) + + Internal ramps: + Fixed: permanent angle (6–8°, max 1:7 slope) + Hoistable: hydraulic cylinders, can close deck opening when not in use + Watertight sliding door: at ramp opening (for watertight subdivision) + + Hoistable car deck: + Hydraulic lift: wire rope or chain drive + Panel: lattice or solid (aluminum for lower weight) + Parked position: 2.1–2.5m clear height below, stowed against deckhead + Capacity: distributed load 200–350 kg/m² (cars), point load as per traffic type + + Access equipment: + Side ramp (for lower freeboard): 2.5–4.5m width + Pilot / bunker door: shell door in hull side + Stores crane: provision handling, 3–10t SWL +``` + +#### 7.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class TankerPumpType { SteamTurbine_Driven, ElectroHydraulic_Submerged, Electric_Deepwell }; +enum class CargoType { CrudeOil, Product_Clean, Chemical_IMO, LNG, LPG, Container, Bulk_Ore, Bulk_Grain, + RoRo_Vehicles, GeneralCargo }; +enum class LngContainmentType { Membrane_GTT_MarkIII, Membrane_GTT_NO96, Moss_Spherical_TypeB, + IMO_TypeC_Cylindrical }; +enum class LashingType { Twistlock_Manual, Twistlock_SemiAuto, Twistlock_FullyAuto, LashingRod_Turnbuckle }; +enum class HatchCoverType { SideRolling, Folding, LiftAway_Pontoon, PiggyBack }; + +struct CargoPumpSpec { + TankerPumpType type; + double rated_capacity_m3_per_h; + double rated_head_m; + double motor_power_kW; + double npsh_required_m; + int num_pumps_main; + int num_strip_pumps; + double discharge_pressure_bar; +}; + +struct CargoPipeSpec { + double main_line_diameter_mm; + double total_equivalent_length_m; + double manifold_size_mm; + int num_manifolds_per_side; + double design_pressure_bar; + double test_pressure_bar; + std::string internal_coating; // "epoxy", "zinc_silicate", "stainless_clad" +}; + +struct IGS_Spec { + std::string igs_type; // "flue_gas", "nitrogen_PSA", "nitrogen_membrane" + double igs_capacity_m3_per_h; + double o2_content_target_pct; // <5% for crude, <1% for chemical + double deck_seal_height_mm; + double pv_valve_pressure_relief_setpoint_mmWG; + double pv_valve_vacuum_relief_setpoint_mmWG; +}; + +struct TankerCargoSpec { + CargoType cargo_type; + double total_cargo_capacity_m3; + int num_tanks; + std::vector tank_volumes_m3; + CargoPumpSpec cargo_pumps; + CargoPipeSpec piping; + IGS_Spec igs; + bool has_cow_system; // Crude Oil Washing + double cow_pump_flow_m3_per_h; + double cow_pressure_bar; +}; + +struct LngContainmentSpec { + LngContainmentType containment_type; + double total_capacity_m3; + int num_tanks; + double design_bor_pct_per_day; // Boil-Off Rate + double tank_design_pressure_bar_g; + double tank_design_vacuum_mbar_g; + double primary_barrier_thickness_mm; + std::string insululation_material; // "RPUF", "perlite", "PIR" + double insulation_thickness_mm; +}; + +struct LngPumpSpec { + double submerged_pump_capacity_m3_per_h; + int pumps_per_tank; + double pump_head_m; + double motor_power_kW; +}; + +struct LngBOG_Spec { + double low_duty_compressor_capacity_m3_per_h; + double high_duty_compressor_capacity_m3_per_h; + double discharge_pressure_bar_g; + bool has_reliquefaction; + double reliquefaction_capacity_t_per_h; + bool has_gcu; // Gas Combustion Unit + std::string fuel_gas_engine_type; // "ME-GI_HP", "X-DF_LP" +}; + +struct ContainerCellGuideSpec { + int hold_tiers; + int deck_tiers; + double cell_guide_bar_width_mm; + double cell_guide_bar_thickness_mm; + double entry_guide_flare_deg; + double transverse_tolerance_mm; + int reefer_plug_count; // for refrigerated containers + int twenty_ft_slots; + int forty_ft_slots; +}; + +struct ContainerLashingSpec { + LashingType twistlock_type; + double twistlock_shear_strength_kN; + int num_lashing_bridges; + double lashing_rod_diameter_mm; + double lashing_angle_deg; + double max_stack_weight_t; + double lashing_MSL_kN; // Maximum Securing Load +}; + +struct BulkCargoSpec { + double hold_volume_m3; + double hopper_angle_deg; + double cargo_density_kg_per_m3; + double angle_of_repose_deg; + HatchCoverType hatch_cover_type; + double hatch_clear_opening_length_m; + double hatch_clear_opening_width_m; + bool has_self_unloader; + double belt_conveyor_capacity_t_per_h; + double boom_slewing_angle_deg; +}; + +struct RoRoSternRampSpec { + double design_load_tonnes; // axle load capacity + double ramp_width_m; + double ramp_length_m; + int num_hydraulic_cylinders; + double hoist_time_s; + double max_quay_angle_deg; + bool inflatable_weather_seal; + double seal_design_head_m; +}; + +struct CargoState { + CargoType current_cargo; + double cargo_quantity_m3; + double cargo_temperature_C; + double discharge_rate_m3_per_h; + double tank_pressure_bar_g; // for closed loading/discharge + double tank_o2_pct; // for IGS monitoring + bool igs_active; + bool cargo_pump_running; +}; + +struct CargoPerformance { + double discharge_completion_time_h; + double cargo_pump_efficiency; + double tank_stripping_residual_m3; + double boil_off_actual_pct_per_day; + double lng_heel_quantity_m3; // retained for tank cooling + bool igs_o2_within_limits; + bool marpol_cargo_regulation_pass; +}; + +TankerCargoSpec design_tanker_cargo_system( + CargoType cargo, double total_capacity_m3, double required_discharge_rate_m3_per_h, int num_cargo_tanks); + +LngContainmentSpec design_lng_containment( + LngContainmentType type, double capacity_m3, double target_bor_pct_per_day); + +LngBOG_Spec design_lng_bog_system( + double total_capacity_m3, double design_bor_pct, double engine_gas_consumption_kg_per_h, bool has_reliquefaction); + +ContainerCellGuideSpec design_container_cell_guides( + int teu_capacity, int max_tiers_hold, int max_tiers_deck, int reefer_plugs); + +ContainerLashingSpec design_container_lashing( + int stack_tiers, double max_roll_accel_g, double container_mass_t, LashingType twistlock); + +BulkCargoSpec design_bulk_cargo_hold( + CargoType bulk_cargo, double hold_volume_m3, double cargo_density_kg_per_m3); + +RoRoSternRampSpec design_ro_ro_stern_ramp( + double max_axle_load_tonnes, double ramp_width_m, double design_freeboard_m); + +CargoState initialize_cargo_state(CargoType cargo); + +CargoPerformance simulate_cargo_operation( + const TankerCargoSpec& tanker, const ContainerCellGuideSpec& container, const BulkCargoSpec& bulk, CargoState& state, CargoType operation_type); + +double calculate_cargo_discharge_time( + double total_cargo_m3, double pump_capacity_m3_per_h, int num_pumps, double stripping_factor); + +double estimate_lng_boil_off( + double design_bor_pct_per_day, double ambient_temp_C, double sea_water_temp_C, LngContainmentType type, double insulation_aging_factor); + +double calculate_container_stack_force( + double stack_mass_t, double roll_accel_g, double tier_height_m, double stack_width_m, int num_tiers); + +} // namespace vde::shipbuilding +``` + + +### 8. Launching, Docking & Sea Trials (P1) + +#### 8.1 Floating Launch, Dock Block Arrangement, Speed Trials, and Manoeuvring Tests + +``` +Launching, docking & sea trials overview: + Vessel launching, periodic dry docking, and sea trials are critical + phases of the ship lifecycle. Launching from dry dock by flooding is + the standard for large vessels. Sea trials verify contractual speed, + manoeuvrability per IMO standards, and system performance before delivery. + Dry docking for class surveys (2.5–5 year cycle) involves hull inspection, + blasting/coating, and underwater equipment maintenance. + +Dry dock launching (floating-out): + Dry dock types: + Graving dock (permanent): + Concrete structure with gate (flap or caisson gate) + Dimensions: L=200–660m, B=40–100m, D=10–16m + Pumping: main dewatering pumps (10,000–40,000 m³/h each, 2–4 units) + Dewatering time: 2–4 hours (from flooded to dry) + Flooding time: 1.5–3 hours (dock gate opened or culverts) + Examples: HHI Ulsan No.3 (660m × 92m × 13.5m), DSME Okpo No.1 (530m × 131m) + + Floating dock: + Pontoon + wing walls, submersible + Lifting capacity: 10,000–100,000 tonnes + L = 100–350m, B = 30–80m + Submersion: pump water into ballast tanks of pontoon + Lifting: de-ballast → dock rises + + Syncrolift (shipload): + Platform + electro-mechanical hoists (20–100 hoists) + Lifting capacity: 500–25,000 tonnes (for smaller vessels) + + Keel block arrangement: + Block height: 1.2–1.8m + Block spacing: 1.0–1.5m along keel, slightly wider at bow/stern + Block material: reinforced concrete with hardwood (oak) cap + Total blocks: vessel L_pp / spacing + 5% extra + Design load per block: + F_block = W × g × (B_block / ΣB_blocks) × K [kN] + K = load concentration factor (1.3–1.8 for docking condition) + + Docking plan: + Docking plan drawing shows block positions relative to hull + Critical: blocks must NOT be under: + - Echo sounder / speed log transducers (flushed or projected) + - Sea chest gratings + - Discharge openings (overboard valves) + - Stabilizer fin boxes + Block loads: checked by classification society for hull girder strength + + Floating-out procedure: + Step 1: Dock flooding + Open flooding valves/culverts (gravity feed from sea) + Fill rate: gradual, monitor vessel floatation + First contact: stern lifts first (typically heavier), + bow lifts when sufficient buoyancy + Critical phase: vessel "lifts" off keel blocks (contact → no contact) + + Step 2: Vessel afloat + Tug boats connect (2–4 tugs, 30–80 tonnes bollard pull each) + Dock gate opened fully + Vessel winched/tugged out + + Step 3: At outfitting quay + Vessel moored, shore power connected + Remaining outfitting, commissioning, testing + +Slipway launching (end launching, historical but still used): + Slipway angle: 1:14 to 1:24 (4–7° from horizontal) + Launch cradle: supports vessel on sliding ways + Trigger mechanism: releases cradle at designated tide/time + Kinematics: + Pivoting phase: vessel rotates about way end (rocker) + Tilting moment = buoyancy × LCB − weight × LCG + When tilting moment > 0 → stern lifts, vessel becomes waterborne + Distance traveled on ways: determined by tide, vessel weight, friction + + Way end pressure: + p = R / A_way_end [N/mm²] + R = reaction force at way end during pivoting + Must be < allowable bearing pressure of soil/concrete + + Drag force (sliding friction): + F_drag = μ × (W − B) [kN] + μ = 0.02–0.05 (greased ways, stern first) + W = vessel weight, B = buoyancy + +Sea trials — speed trial: + Measured mile / DGPS speed trial (per ISO 15016:2015): + Trial conditions: + Sea state: < sea state 3 (significant wave height < 1.25m preferred) + Wind: < Beaufort 4 (11–16 kn) + Water depth: > 5 × (V²/g) (deep water, avoid shallow water effects) + Displacement: close to design/ballast condition + Clean hull: freshly painted (no fouling) + + Double run method: + Two runs in opposite directions (cancel current effect) + Each run: steady speed for >10 minutes (≥1 NM distance) + Speed: V_g = 2 × V₁ × V₂ / (V₁ + V₂) [mean of means method] + Correction per ISO 15016: + V_s_corrected = V_g − ΔV_wind − ΔV_wave − ΔV_current − ΔV_water − ΔV_displacement + + Wind correction: + ΔV_wind = (R_AA / (dR/dV)) [kn] + R_AA = 0.5 × ρ_air × C_AA × A_T × V_wr² [N] (aerodynamic resistance from relative wind) + C_AA = aerodynamic resistance coefficient (0.7–1.0 for typical hull + superstructure) + A_T = transverse projected area above waterline [m²] + + Wave correction: + Added resistance from waves: R_AW(ω, β, H_s) per empirical method (STAwave-2 or equivalent) + ΔV_wave per ISO 15016 Annex, function of wave height, direction, period + + Measurement uncertainty: + Speed: ±0.1 kn (DGPS) + Shaft power: ±2% (torsion meter) + SFOC: ±2% (Coriolis mass flow meter) + +Sea trials — manoeuvring trial (per IMO Resolution MSC.137(76)): + Turning circle test: + Procedure: steady speed → rudder 35° P/S → hold until heading change 540° + Measurements: + Advance: distance traveled in original direction to 90° heading change [m] + Transfer: lateral distance at 90° heading change [m] + Tactical diameter: lateral distance at 180° heading change [m] + Steady turning diameter: steady-state turning circle diameter [m] + Typical: TD / L_pp = 2.5–4.0 (for conventional) + + Geometric parameters: + Advance / L_pp: typically 3.0–4.5 + Transfer / L_pp: typically 1.5–2.0 + Tactical diameter / L_pp: typically 2.5–4.0 + + Zigzag test (Z 10°/10°): + Procedure: + → Rudder 10° Stbd until heading deviates 10° Stbd + → Rudder 10° Port (opposite) until heading returns to 10° Port from base + → Continue pattern + Measurements: + 1st overshoot angle: max heading reached after 1st rudder reversal [deg] + 2nd overshoot angle: max heading after 2nd reversal [deg] + Initial turning time: time to achieve 10° heading change [s] + Acceptance criteria (IMO): + 1st overshoot < 14° (for L/V > 10s) + 2nd overshoot < 20° (for L/V > 10s) + + Crash stop (full astern stopping test): + Procedure: full ahead → full astern (emergency reversal) + Measurements: + Track reach (head reach): distance traveled in original direction until vessel stops [m] + Time to stop: from command to vessel stopped [s] + Lateral deviation: sideways drift during stop [m] + Typical: head reach / L_pp = 8–15 (depending on hull form, propeller, rudder) + + Man overboard test (Williamson turn): + Procedure: rudder hard over to side of casualty → after 60° deviation, hard over opposite + Purpose: vessel returns to reciprocal course to pick up person + Track forms approximate circular path returning to wake + +Sea trials — endurance / machinery: + Endurance run: + Duration: 4–24 hours at CSR (Continuous Service Rating, typically 85% MCR) + Monitored: all engine parameters, bearing temperatures, fuel consumption, vibrations + Generator load sharing, parallel operation tested + + Vibration measurement: + Hull girder vibration: accelerometer at fore peak, aft peak, midship + Superstructure vibration: at bridge deck level + Limits per ISO 6954: habitable zone, working zone + + Noise measurement: + Per IMO Resolution MSC.337(91) Code on Noise Levels + Sound level meter: Type 1 (precision), A-weighted + Positions: cabins, mess, bridge, engine control room, open decks + +Dry docking (class survey): + Docking interval: 2.5 years (passenger), 5 years (cargo) — 2 surveys per 5-year cycle + Hull survey: + Bottom inspection: visual, plate thickness measurement (UT gauging) + Rudder: pintle clearance, stock bearing wear + Propeller: blade surface inspection, dye penetrant (PT) at blade root + Sea chests: grating removal, valve inspection + Stern tube: seal condition, bearing clearance/wear measurement + + Plate thickness measurement: + Ultrasonic thickness gauge (UT) + Gauging pattern: per classification grid (typically 500mm × 500mm) + Wastage allowance: 0.5 × t_building (maximum allowable corrosion) + Renewal if: t_measured < t_rule × 1.0 (actual below rule minimum) + + Blasting and painting: + Spot blasting: SA 2½ at corroded areas + Full blasting: 10–15 year cycle for hull, 5-year for boottop + Coating application: per paint manufacturer specification + Drying time: minimum overcoat interval (ambient temp + humidity dependent) + + Underwater equipment service: + Bow thruster: oil change, seal inspection, blade inspection + Stabilizer fin: fin clearance, hydraulic cylinder seal condition + ICCP anodes: reference electrode calibration +``` + +#### 8.2 Proposed API + +```cpp +namespace vde::shipbuilding { + +enum class DockType { Graving_Dock, Floating_Dock, Syncrolift_Shiplift, Slipway_EndLaunch }; +enum class TrialType { Speed_Power, Manoeuvring_TurnCircle, Manoeuvring_Zigzag, Crash_Stop, Endurance, + Vibration, Noise }; +enum class DockingSurvey { Bottom_Inspection, UT_Gauging, Rudder_Inspection, Propeller_Inspection, + SternTube_Inspection, Hull_Painting, ICCP_Check }; +enum class ManoeuvringTest { TurningCircle_35deg, Zigzag_10_10, Zigzag_20_20, CrashStop, + Williamson_ManOverboard }; + +struct DryDockSpec { + DockType type; + double dock_length_m; + double dock_breadth_m; + double dock_depth_m; + double max_lifting_capacity_tonnes; + double dewatering_time_h; + double flooding_time_h; +}; + +struct KeelBlockSpec { + int num_blocks; + double block_height_mm; + double block_spacing_mm; + std::vector block_positions_from_AP_m; + std::vector design_load_per_block_kN; + bool echo_sounder_clearance_checked; + bool sea_chest_clearance_checked; +}; + +struct FloatingOutSpec { + std::string vessel_id; + double vessel_lightweight_tonnes; + double vessel_LCG_from_AP_m; // Longitudinal Center of Gravity + double vessel_VCG_m; // Vertical Center of Gravity + DryDockSpec dock; + KeelBlockSpec keel_blocks; + double flooding_rate_m3_per_min; + bool stern_first_float; + double time_to_float_off_min; + int num_tugs_required; + double tug_bollard_pull_kN; +}; + +struct SpeedTrialSpec { + TrialType type; + double trial_displacement_tonnes; + double trial_draft_forward_m; + double trial_draft_aft_m; + double water_depth_m; + double significant_wave_height_m; + double wind_speed_kn; + double wind_direction_deg_rel; + double sea_water_temperature_C; + double sea_water_density_kg_per_m3; + double hull_roughness_um; // AHR (Average Hull Roughness) in µm + int num_double_runs; + double target_speed_range_kn[5]; // 50%, 65%, 75%, 85%, 100% MCR speeds +}; + +struct SpeedTrialResult { + std::vector vessel_speed_kn; + std::vector shaft_power_kW; + std::vector shaft_speed_RPM; + std::vector sfc_g_per_kWh; + double correction_wind_kn; + double correction_wave_kn; + double corrected_speed_at_MCR_kn; + bool trial_acceptance_criteria_pass; +}; + +struct ManoeuvringTrialSpec { + ManoeuvringTest test_type; + double trial_speed_kn; // approach speed + double rudder_angle_deg; // 10°, 20°, or 35° + double water_depth_m; + TrialType trial; +}; + +struct ManoeuvringTrialResult { + double advance_m; + double transfer_m; + double tactical_diameter_m; + double steady_turning_diameter_m; + double first_overshoot_angle_deg; // for zigzag + double second_overshoot_angle_deg; + double track_reach_m; // for crash stop + double head_reach_L_pp_ratio; + double lateral_deviation_m; + bool imo_msc_137_pass; +}; + +struct DryDockSpec; +struct DockingSurveySpec { + DockingSurvey survey_type; + double nominal_plate_thickness_mm; + double measured_min_thickness_mm; + double wastage_allowance_pct; + double corrosion_rate_mm_per_year; + double coating_condition; // 1=good, 2=fair, 3=poor + int blasting_standard; // SA 2, SA 2½, SA 3 + int coating_dft_um[3]; // primer + intermediate + topcoat DFT + bool steel_renewal_required; +}; + +struct SeaTrialState { + double vessel_speed_kn; + double heading_deg; + double rudder_angle_deg; + double shaft_power_kW; + double shaft_RPM; + double sfoc_g_per_kWh; + double wind_speed_kn; + double sea_state; + double position_lat; + double position_lon; +}; + +struct SeaTrialPerformance { + bool speed_trial_pass; + bool turning_circle_pass; + bool zigzag_overshoot_pass; + bool crash_stop_pass; + bool endurance_pass; + bool vibration_within_limits; + bool noise_within_limits; +}; + +DryDockSpec select_dry_dock( + DockType type, double vessel_length_m, double vessel_beam_m, double vessel_lightweight_t); + +KeelBlockSpec design_keel_block_arrangement( + double vessel_L_pp_m, double vessel_lightweight_t, double vessel_LCG_m, double dock_length_m); + +FloatingOutSpec plan_floating_out( + std::string vessel_id, double lightweight_t, double LCG_m, const DryDockSpec& dock, const KeelBlockSpec& blocks); + +SpeedTrialSpec plan_speed_trial( + double MCR_kW, double design_speed_kn, double trial_displacement_t, std::string trial_location); + +SpeedTrialResult analyze_speed_trial( + const SpeedTrialSpec& spec, std::vector measured_speed_kn, std::vector measured_power_kW, std::vector measured_rpm); + +ManoeuvringTrialResult analyze_manoeuvring_trial( + const ManoeuvringTrialSpec& spec, std::vector heading_time_series, std::vector rate_of_turn, std::vector position_x, std::vector position_y, double time_step_s); + +DockingSurveySpec plan_docking_survey( + int years_since_build, double original_plate_thickness_mm, DockingSurvey survey_type); + +SeaTrialState initialize_sea_trial_state(); + +SeaTrialPerformance simulate_sea_trials( + const SpeedTrialSpec& speed, const ManoeuvringTrialSpec& man, SeaTrialState& state); + +double correct_speed_for_wind_wave( + double measured_speed_kn, double wind_speed_kn, double wave_height_m, double vessel_displacement_t, double wind_area_m2); + +double calculate_tactical_diameter( + double L_pp_m, double speed_kn, double rudder_angle_deg, double rudder_area_ratio); + +double estimate_steel_renewal_thickness( + double original_thickness_mm, double years_in_service, double annual_corrosion_rate_mm_per_yr, double wastage_allowance_pct); + +} // namespace vde::shipbuilding +``` + + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Key Types | +|---|---|---| +| `vde::shipbuilding` | `hull_assembly.h` | `PlateSpec`, `NCOperationSpec`, `NestingResult`, `FormingSpec`, `PanelSpec`, `PanelWeldParams`, `BlockAssemblySpec`, `ErectionJointSpec`, `HullErectionSequence`, `HullState`, `HullPerformance` | +| `vde::shipbuilding` | `propulsion.h` | `EngineSpec`, `EnginePerformanceMap`, `ShaftLineSpec`, `ShaftAlignmentResults`, `PropellerDesignInput`, `PropellerDesignOutput`, `AzimuthThrusterSpec`, `RudderSpec`, `PropulsionState`, `PropulsionPerformance` | +| `vde::shipbuilding` | `piping_fluid.h` | `PipeSpec`, `PipeHydraulicResult`, `PumpSpec`, `BallastSystemSpec`, `BilgeSystemSpec`, `FuelOilSystemSpec`, `CoolingSystemSpec`, `FirefightingSystemSpec`, `PipingState`, `PipingPerformance` | +| `vde::shipbuilding` | `outfitting.h` | `ModularCabinSpec`, `CabinBlockSpec`, `FireInsulationSpec`, `HVAC_DesignInput`, `HVAC_DesignOutput`, `CabinState`, `OutfittingPerformance` | +| `vde::shipbuilding` | `electrical_power.h` | `GeneratorSpec`, `LoadAnalysisInput`, `LoadAnalysisOutput`, `PMS_Config`, `SwitchboardSpec`, `TransformerSpec`, `CableSpec`, `EmergencyPowerSpec`, `ElectricalState`, `ElectricalPerformance` | +| `vde::shipbuilding` | `navigation_automation.h` | `GyrocompassSpec`, `RadarSpec`, `ECDIS_Spec`, `AutopilotSpec`, `DPSystemSpec`, `IAS_Spec`, `GMDSS_Spec`, `NavigationState`, `NavigationPerformance` | +| `vde::shipbuilding` | `cargo_systems.h` | `TankerCargoSpec`, `CargoPumpSpec`, `IGS_Spec`, `LngContainmentSpec`, `LngBOG_Spec`, `ContainerCellGuideSpec`, `ContainerLashingSpec`, `BulkCargoSpec`, `RoRoSternRampSpec`, `CargoState`, `CargoPerformance` | +| `vde::shipbuilding` | `launching_trials.h` | `DryDockSpec`, `KeelBlockSpec`, `FloatingOutSpec`, `SpeedTrialSpec`, `SpeedTrialResult`, `ManoeuvringTrialSpec`, `ManoeuvringTrialResult`, `DockingSurveySpec`, `SeaTrialState`, `SeaTrialPerformance` | + +--- + +## Industry Standards + +| Standard | Title | Relevance | +|---|---|---| +| IACS CSR (Common Structural Rules) | Bulk Carrier and Oil Tanker Common Structural Rules | Hull scantling, structural design | +| SOLAS 1974/1988 Protocol | Safety of Life at Sea | Fire safety, lifesaving, emergency systems | +| MARPOL 73/78 Annex I | Oil Pollution Prevention | SBT, OWS, COW, sludge management | +| MARPOL 73/78 Annex IV | Sewage Pollution Prevention | Sewage treatment plant standards | +| MARPOL 73/78 Annex VI | Air Pollution Prevention | IMO Tier II/III NOx, SOx (0.5% global, 0.1% ECA) | +| IMO BWM Convention D-2 | Ballast Water Management | BWTS performance standards | +| IMO MEPC.227(64) | Sewage Treatment Plant | Effluent quality for sewage | +| ILO MLC 2006 | Maritime Labour Convention | Crew accommodation standards | +| IMO MSC.337(91) | Code on Noise Levels On Board Ships | Cabins <60 dB(A), mess <65 dB(A) | +| ISO 6954:2000 | Mechanical vibration — Merchant ships | Vibration criteria (1–80 Hz) | +| IMO Resolution MSC.137(76) | Standards for Ship Manoeuvrability | Turning circle, zigzag, crash stop criteria | +| ISO 15016:2015 | Sea trials — Speed trials | Speed-power trial correction for wind/wave | +| IMO FTP Code | International Code for Application of Fire Test Procedures | A-60/A-30/A-15 fire divisions | +| IEC 60092 | Electrical installations in ships | Cable sizing, switchboards, protection | +| IEC 61363 | Short-circuit currents in ship installations | Short-circuit calculation | +| IEC 61439 | Low-voltage switchgear and controlgear | Switchboard design | +| IEC 61924 | Maritime navigation — Integrated navigation | IAS alarm management | +| IMO Resolution MSC.192(79) | Radar Performance Standards | X/S band, ARPA, tracking | +| IMO Resolution MSC.232(82) | ECDIS Performance Standards | ENC/SENC, route checking | +| IMO Resolution A.714(17) | CSS Code (Cargo Securing) | Container lashing calculation | +| IMO MSC/Circ.645 | Guidelines for Vessels with DP Systems | DP Class 1/2/3 definitions | +| IMCA M 140 | Specification for DP Capability Plots | DP capability analysis | +| IMO IGC Code | International Code for Construction of LNG Carriers | LNG containment, cargo systems | +| IMO IBC Code | International Code for Chemical Tankers | Chemical cargo handling | +| IMO IGF Code | International Code for Ships using Gases as Fuel | LNG fuel systems | +| ASME B31.3 | Process Piping | Pipe wall thickness, stress analysis | +| ISO 14726 | Ships — Identification colours for piping | Pipe color coding | +| IEC 60332-3 Cat A | Flame retardant cables | Flame propagation on bunched cables | +| IEC 60331 | Fire-resistant cables | Circuit integrity during fire | +| ISO 8501-1 | Surface preparation — Rust grades | SA 2½, blasting standards | +| DNV Rules Pt.4 Ch.6 | Piping systems | Pipe sizing per class rules | +| LR Rules Pt.5 | Main and auxiliary machinery | Shaft alignment, engine acceptance | +| BV Rules Pt.C Ch.1 | Steel ships | Hull structure | +| ABS Rules Pt.4 | Vessel systems and machinery | Marine engineering standards | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| Shipyard (Large) | HD Hyundai Heavy | Ulsan 10 dry docks | 660m × 92m dock, 100+ vessels/yr | +| Shipyard (Large) | Samsung Heavy Industries | Geoje (3 floating docks) | LNG/Wind/FLNG specialist | +| Shipyard (Large) | Hanwha Ocean / DSME | Okpo (5 docks) | LNG (GTT NO96), Arctic LNG | +| Shipyard (Large) | CSSC Jiangnan | Changxing Island | LNG/ULCS/naval, China's largest | +| Shipyard (Cruise) | Fincantieri | Monfalcone/Marghera | 6,000+ pax cruise ships | +| Shipyard (Cruise) | Meyer Werft | Papenburg/Turku | Largest covered building docks | +| Shipyard (Cruise) | Chantiers de l'Atlantique | St. Nazaire | Oasis-class / MSC World-class | +| 2-Stroke Engine | MAN Energy Solutions | G95 ME-C10.5 | 6,870 kW/cyl, SFOC ~160 g/kWh | +| 2-Stroke Engine | MAN Energy Solutions | B&W 14RTA-flex96C | 80,080 kW at 102 RPM | +| 2-Stroke Engine (DF) | MAN Energy Solutions | ME-GI | HP gas injection, methane slip <0.2% | +| 2-Stroke Engine (DF) | WinGD (Winterthur) | X92DF | ~5,000 kW/cyl, LP gas, Otto cycle | +| 4-Stroke Engine | Wärtsilä | 31DF | 600 kW/cyl, world's most efficient 4-stroke | +| 4-Stroke Engine | MaK (Caterpillar) | M 43 C | 480 kW/cyl | +| Propeller | MAN Alpha / Wärtsilä / MMG | CPP 5-blade, FPP | Ø6–11m, Ni-Al-Bronze | +| Azimuth Thruster | ABB Marine | Azipod XO | 1.5–25 MW, pulling propeller | +| Azimuth Thruster | Rolls-Royce / Kongsberg | Mermaid / AZP | Compact L-drive/Z-drive | +| Shafting/Bearings | Wärtsilä Seals & Bearings | Enviroguard / Airguard | Oil-to-sea <6 L/day compliant | +| Stern Tube Bearing | Thordon Bearings | COMPAC / XL | Water-lubricated, zero oil pollution | +| Ballast Water Treatment | Alfa Laval | PureBallast 3 | UV + filtration, 100–3,000 m³/h | +| Ballast Water Treatment | Wärtsilä / Optimarin | Aquarius UV / OBS | Electro-chlorination or UV | +| Oily Water Separator | Alfa Laval | PureBilge | 0.25–5 m³/h, <5 ppm with polishing | +| Purifier (Fuel/Lube) | Alfa Laval | S926 / P626 | 2,000–15,000 L/h, auto-desludge | +| IAS Automation | Kongsberg Maritime | K-Chief 700 | 10,000+ I/O, dual redundant | +| IAS Automation | ABB Marine | ABB Ability™ 800xA | Integrated vessel control | +| Navigation ECDIS | Furuno / Sperry / Tranzas | FMD-3300 / VisionMaster | Dual ECDIS, S-100 ready | +| Radar | Furuno / Sperry / Kelvin Hughes | FAR-3338S / SharpEye | X+S band, solid-state (no magnetron) | +| Dynamic Positioning | Kongsberg Maritime | K-Pos DP | DP2/DP3 class, 3× position ref | +| GMDSS | Furuno / Jotron / Sailor | FS-1575 / TR-7750 | A1+A2+A3, Inmarsat-C, DSC VHF/MF/HF | +| LNG Containment | GTT (Gaztransport) | Mark III Flex / NO96 Super+ | BOR 0.085–0.12%/day | +| LNG Pumps | Nikkiso / Ebara / Shinko | Submerged electric | 1,500–2,000 m³/h, −162°C | +| BOG Compressor | Cryostar / Burckhardt | Labyrinth piston | 5,000–25,000 m³/h | +| Container Twistlock | MacGregor / TTS / SEC | Semi-auto / Fully-auto | 250–420 kN shear | +| Ro-Ro Ramp | MacGregor / TTS | Stern/Quarter/Side ramp | 25–100t axle load | +| Crane (Cargo) | MacGregor / Liebherr | GLB/GLE electro-hydraulic | 30–150t SWL | +| Hatch Cover | MacGregor / TTS | Side-rolling / Folding / Lift-away | Weathertight, DNV-GL type approved | +| Paint Coating | Jotun / Hempel / PPG | SeaQuantum / Hempaguard | 60-month fouling control | +| Diesel Generator | Wärtsilä / MAN / Mitsubishi | 20V31 / 16V32/40 | 500–12,000 kWe | +| Switchboard (MV) | ABB / Siemens / Schneider | UniGear ZS1 (6.6/11kV) | Vacuum CB, 25–50 kA | +| Emergency Generator | Stamford / Leroy-Somer | Marine GenSet | 45s auto-start | +| Steel Plate | POSCO / NSSMC / Baosteel | AH/DH/EH36, H40 | TMCP, high-tensile | +| Coating | Hempel / Jotun / International | Avantguard / SeaQuantum | Zinc epoxy, silicone foul-release | + +--- + +## Acceptance Criteria + +1. **Hull Structure & Block Assembly (必选):** Engine shall design steel plate processing from NC cutting (plasma/oxyfuel/laser) through forming (3-roll/4-roll bending, frame press, line heating) to panel line automated stiffener fillet welding (FCAW/SAW twin-wire). Nesting optimization shall target >85% material utilization. Block assembly with ±2–3mm dimensional tolerance and welding distortion prediction (angular fillet, transverse/longitudinal shrinkage using inherent strain method) shall be verified. Hull erection sequence with block network critical path, gantry crane multi-hook lifting, and erection joint welding (ceramic backing SAW) shall be validated. Dimensional survey with total station and class society scantling compliance per IACS CSR shall be checked. + +2. **Marine Propulsion & Shafting (必选):** Engine shall model 2-stroke low-speed diesel engines (MAN B&W ME/ WinGD X-DF) with propeller-law performance curves, SFOC maps, turbocharger matching, and IMO Tier II/III emissions (EGR/SCR). Shaft line design per classification rules (diameter, bearing spans, critical speed/whirling analysis), shaft alignment (bearing reactions, bending stress, bearing slopes <3.5×10⁻⁴ rad), torsional vibration (mass-elastic model, barred speed ranges), and axial vibration shall be supported. Propeller design using Wageningen B-series K_T/K_Q polynomials with cavitation inception check (σ_n vs. σ_i) and hull pressure pulse evaluation per class limits shall be computed. Rudder (semi-spade, flap) and azimuth thruster specifications shall be configurable. + +3. **Piping & Fluid Systems (必选):** Engine shall design piping systems with material selection (carbon steel/CuNi/SS316L/GRE), wall thickness per class rules, and Darcy-Weisbach pressure drop calculation (Colebrook-White friction factor, K-value minor losses). Pump selection with NPSH verification and system curve matching. Ballast system with BWMS treatment (UV/filtration or electro-chlorination) per IMO D-2 standard and ballast exchange time calculation. Bilge system with OWS 15 ppm alarm and holding tank sizing. Fuel oil system with HFO heating, purifier (centrifugal) capacity, settling/service tanks, and viscosity control. Firefighting system with fire main hydraulic calculation, CO₂ total flooding (40% volume, 2 min discharge), and water mist per IMO MSC/Circ.1165. Fresh water generator (RO or evaporator) sizing shall be provided. + +4. **Accommodation & Outfitting (必选):** Engine shall design modular cabins with integrated MEP (steel sandwich/GRP panels, 50–60mm mineral wool, sanitary unit, furniture, electrical termination). Fire insulation A-60/A-30/A-15 per SOLAS II-2 with surface temperature check (<140°C rise in 60 min ISO 834 fire curve). HVAC chilled water plant sizing (screw/centrifugal chiller, R-134a/R-513A, 7/12°C, COP 4–6) with cooling load calculation (solar + transmission + ventilation + people + equipment). Noise prediction (<60 dB(A) in cabins per IMO MSC.337) and vibration limits (<4 mm/s RMS per ISO 6954). Floating floor (mineral wool, IIC >50) and resilient mounts shall be designed. MLC 2006 crew accommodation compliance shall be verified. + +5. **Electrical & Power Systems (必选):** Engine shall perform electrical load analysis for three operating conditions (sea going, manoeuvring, port) with demand/utilization factors. Generator sizing and parallel operation with isochronous/droop governing (3–5%), AVR, synchronization, and load sharing. PMS load-dependent start/stop (85% start, 30% stop with hysteresis). Short-circuit current calculation per IEC 61363, protection coordination/discrimination, and harmonic analysis (6-pulse/12-pulse/AFE VFD rectifiers, THDi limits). MV/LV switchboard design (VCB/ACB, bus tie), distribution transformer (Dyn11, 4–6% impedance), cable sizing (ampacity, voltage drop <6%, short-circuit withstand), and emergency power system (auto-start <45s, 18/36h fuel autonomy) per SOLAS II-1/Part D shall be verified. + +6. **Navigation & Automation (必选):** Engine shall configure ECDIS (S-57/S-100 ENC, safety contour, route check, CPA/TCPA alarm), radar (X/S-band, range equation, STC/FTC/CFAR processing, ARPA 40–100 targets, trial manoeuvre), and autopilot (heading-control PID, track-control cross-track error, waypoint wheel-over). Gyrocompass (<0.1° secant latitude accuracy), GNSS/DGPS (<1m with DGPS, PDOP <3), Doppler/EM speed log, and echo sounder shall be specified. IAS integrated automation (5,000–20,000 I/O, dual redundant PLC, alarm management per IEC 61924). DP Dynamic Positioning (Class 1/2/3, PID control, thrust allocation QP, capability plot, worst-case failure analysis) per IMCA M 140. GMDSS equipment configuration per sea areas A1–A4 shall be validated. + +7. **Cargo Handling Systems (必选):** Engine shall design tanker cargo systems with pump selection (steam turbine/electro-hydraulic/ deepwell, NPSH check), Inert Gas System (flue gas or N₂ PSA, O₂ <5%, deck water seal, P/V valve), and Crude Oil Washing per MARPOL. LNG containment (GTT Mark III/NO96 membrane, Moss spherical Type-B) with boil-off rate 0.10–0.15%/day, submerged cargo pumps, BOG compression, and reliquefaction/gas combustion management. Sloshing analysis at partial fill conditions. Container cell guides (±3mm tolerance) and lashing calculation per CSS Code with twistlock and lashing rod forces under ship motion accelerations. Bulk carrier cargo hold structural analysis (active wedge earth pressure), self-unloading conveyors, and hatch covers. Ro-Ro stern ramp (25–60t axle) and hoistable car deck design shall be provided. + +8. **Launching, Docking & Sea Trials (必选):** Engine shall plan floating-out from dry dock with keel block arrangement (block spacing, load distribution), flooding rate, and float-off sequence with tug requirements. Slipway end-launching kinematics (pivoting, tilting moment, way-end pressure) for legacy vessels. Speed trial analysis per ISO 15016 with double-run method, wind/wave/shallow-water corrections, and shaft power measurement. Manoeuvring trial analysis per IMO MSC.137(76) — turning circle (advance/transfer/tactical diameter), zigzag Z10°/10° (overshoot angle <14°/<20°), and crash stop (head reach). Dry docking survey with UT plate thickness measurement, wastage assessment, steel renewal calculation, and blasting/painting specification per class requirements. + +9. **Performance Integration (必选):** Engine shall support end-to-end shipbuilding workflow: hull structure → propulsion design → piping systems → accommodation outfitting → electrical power → navigation/automation → cargo handling → launching/sea trials. All tolerances, load distributions, material properties, and regulatory requirements shall propagate through the chain. Design-to-build traceability, block outfitting ratio measurement, and class society configuration control shall be maintained. + +10. **Unit Consistency (必选):** All functions shall accept and return SI-derived units with marine conventions: dimensions in mm (plate/pipe) or m (length/breadth/depth), force in N or kN, mass in kg or tonnes (metric), pressure in bar(g) (pneumatic/hydraulic) or Pa (structure), speed in knots (vessel navigation) or m/s (physics), shaft speed in RPM, power in kW or MW, flow rate in m³/h (liquid) or Nm³/h (gas), temperature in °C, frequency in Hz, torque in N·m or kN·m, stress in MPa, efficiency in %, angular measurements in degrees (navigation/steering) or radians (formula context). + +11. **Regulatory Compliance (必选):** Engine shall verify compliance with key regulatory frameworks: IACS CSR (hull scantling), SOLAS II-1/II-2 (structure/fire safety), MARPOL Annex I/IV/VI (oil/sewage/air), IMO BWM D-2 (ballast water), ILO MLC 2006 (crew accommodation), IMO MSC.337 (noise), ISO 6954 (vibration), IMO MSC.137 (manoeuvring), ISO 15016 (speed trials), IMO FTP Code (fire test), IEC 60092 (electrical), IEC 61363 (short-circuit), IMO IGC/IGF Codes (LNG/gas), CSS Code (cargo securing), ASME B31.3 (piping), DNV/LR/BV/ABS class rules, and IMO GMDSS requirements. diff --git a/docs/feedback/VDE-1148.md b/docs/feedback/VDE-1148.md new file mode 100644 index 000000000..4aa625e38 --- /dev/null +++ b/docs/feedback/VDE-1148.md @@ -0,0 +1,2463 @@ +# VDE-1148: Defense & Weapon Systems Engine Requirements (军工与武器系统引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign DefenseEngine — small arms design, ammunition engineering, artillery & gun systems, armored vehicle design, naval gun & missile systems, torpedo & mine systems, submarine design +**Module**: `vde/defense_weapons/firearms_ammo.h`, `vde/defense_weapons/armored_vehicles.h`, `vde/defense_weapons/naval_weapons.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Defense / Small Arms / Armor / Naval Weapons + +--- + +## Background + +Defense and weapon systems engineering encompasses the design, analysis, and manufacturing of small arms, ammunition, artillery, armored vehicles, naval weapon systems, torpedoes, mines, and submarines. This field is governed by rigorous ballistic physics, materials science constraints, and weapon effects modeling that must be represented in any comprehensive engineering design engine. + +Small arms design involves precision mechanical engineering of barrels, actions, triggers, and magazines. Modern military rifles such as the HK416, M4 carbine, SCAR, and AK-pattern rifles share common engineering principles: cold hammer forged (CHF) chromium-moly steel barrels (4150/41V45) with specific twist rates, gas-operated actions (direct impingement, short-stroke piston, long-stroke piston), and rotating bolt locking mechanisms. Barrel manufacturing methods—button rifling, cut rifling, and hammer forging—produce different residual stress profiles and bore surface finishes that affect accuracy and barrel life. SAAMI and CIP chamber specifications define critical dimensions for safe ammunition operation. + +Ammunition engineering spans cartridge case design (brass Cu70Zn30 deep drawing multi-stage forming with progressive annealing), bullet construction (full metal jacket FMJ with gilding metal Cu90Zn10, steel core armor-piercing AP, lead-free frangible), propellant chemistry (single-base nitrocellulose NC, double-base nitroglycerin NG with dibutyl phthalate DBP deterrent coatings, progressive burning 7-hole multi-perforated grains), and primer composition (lead styphnate initiating explosive with barium nitrate oxidizer and antimony sulfide fuel, DDNP non-toxic non-corrosive alternatives). Ballistics covers internal ballistics (peak pressure measurement via piezoelectric transducer per SAAMI/CIP MAP standards), external ballistics (G1/G7 ballistic coefficient models with Doppler radar downrange validation), and terminal ballistics (bullet expansion and penetration in 10% ordnance gelatin per FBI protocol). + +Artillery and gun systems extend to large-caliber barrels using autofrettage hydraulic processes (Bessler method for residual compressive stress field), shrink-fit multi-layer jacket construction, breech mechanisms (Krupp/Vickers sliding wedge and Welin interrupted screw with de Bange obturation), hydro-pneumatic recoil systems with nitrogen-filled recuperators and variable-orifice throttling grooves, and modern fire control systems incorporating eye-safe laser rangefinders (1.54μm Raman-shifted Nd:YAG), ballistic computers with full meteorological correction (temperature, charge, muzzle velocity, wind, Coriolis effect), and muzzle velocity Doppler radar. + +Armored vehicle design integrates welded RHA (rolled homogeneous armor per MIL-DTL-12560 Class 3), composite armor arrays (ceramic + UHMWPE + air gap), explosive reactive armor (ERA sandwich with flyer plate + insensitive HE + rear plate for jet deflection/diffusion), active protection systems (hard-kill Ka-band radar detection with interceptor counter-munitions, soft-kill multispectral smoke and laser warning receivers), mine blast protection (V-shaped hull deflector, D-Strut energy absorbing seats, floating floor, aramid spall liners), suspension (torsion bar and hydropneumatic in-arm suspension units), powerpack (MTU 883 diesel, AGT1500 gas turbine), and NBC collective overpressure filtration. + +Naval weapon systems include medium-caliber guns (76mm Super Rapid OTO Melara with water-cooled barrel and dual feed), close-in weapon systems (Phalanx 20mm M61A1 Gatling with Ku-band search/track radar), vertical launch systems (Mk41 8-cell modules with hot launch gas management plenum), anti-ship missiles (sea-skimming supersonic with active radar terminal seekers), and surface-to-air missiles (semi-active radar homing with CW illumination). + +Underwater warfare covers heavyweight torpedoes (533mm Otto fuel II swashplate piston engines with pump-jet propulsion, silver-zinc thermal batteries, acoustic homing with fiber-optic wire guidance), mine systems (bottom influence mines with magnetic+acoustic+pressure fusion, moored mines with buoyancy+depth cables, SLMM self-propelled submarine mines), and mine countermeasures (side-scan sonar, variable depth sonar VDS, ROV mine disposal vehicles, influence and mechanical sweeps). + +Submarine design encompasses pressure hull engineering (HY-100/HY-130 high-yield steel, ring-stiffened cylinder buckling analysis, titanium alloy Ti-6Al-4V), propulsion (7-blade skewback propellers, pump-jet shrouded rotor+stator ducts, permanent magnet motors, diesel-electric and AIP air-independent propulsion with PEM fuel cells+LOX or Stirling engines), anechoic tiles (butyl rubber voided absorption tiles 50-100mm thick), and sonar systems (bow spherical arrays, flank arrays, towed thin-line arrays TB-29/TB-34 SURTASS). + +VDE currently lacks: +- Small arms barrel design (bore manufacturing methods CHF/button/cut, twist rate 1:7-1:12 in, SAAMI/CIP chamber specs, muzzle device flash hider/brake/compensator) +- Firearm action design (gas impingement direct/piston long-stroke/short-stroke, bolt rotating bolt locking lug, recoil spring, buffer) +- Ammunition cartridge case engineering (brass Cu70Zn30 deep drawing, multi-stage annealing, primer pocket, flash hole) +- Bullet design (jacketed FMJ gilding metal Cu90Zn10, steel core AP, lead-free frangible) +- Propellant and primer chemistry (single-base NC, double-base NG, DBP deterrent, 7-hole grain geometry, lead styphnate/DDNP primer) +- Ballistics computation (internal ballistics SAAMI/CIP peak pressure, external ballistics G1/G7 BC Doppler radar, terminal ballistics gelatin 10% ordnance gelatin FBI protocol) +- Artillery barrel autofrettage (hydraulic Bessler method, shrink-fit multi-layer jacket) +- Recoil system design (hydro-pneumatic recuperator nitrogen fill, variable orifice throttling groove, constant recoil length) +- Fire control system FCS (laser rangefinder, ballistic computer met message, muzzle velocity radar, GPS laying) +- Armored vehicle hull/turret design (RHA MIL-DTL-12560, composite ceramic+UHMWPE, ERA/NERA, APS active protection) +- Naval gun and missile systems (medium caliber OTO Melara 76mm, CIWS Phalanx, VLS Mk41, anti-ship missile sea skimming) +- Torpedo and mine systems (Otto fuel II, acoustic homing, bottom influence mine, MCM mine countermeasures) +- Submarine pressure hull (HY-100 buckling collapse, titanium Ti-6Al-4V, anechoic tile, sonar array) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native defense and weapon systems engine. + +--- + +## Detailed Requirements + +### 1. Small Arms Design + +**Priority**: P1 + +#### 1.1 Barrel, Action, Trigger, and Magazine Engineering + +``` +Small arms barrel design overview: + Modern military and precision rifle barrels employ specific steel + alloys and manufacturing processes to achieve required accuracy, + durability, and corrosion resistance. + +Barrel material and manufacturing: + Steel alloy: 4150 chromium-molybdenum steel (also 41V45, 416R stainless) + Composition: C 0.48-0.53%, Cr 0.80-1.10%, Mo 0.15-0.25% + Yield strength: >690 MPa after heat treatment + Hardness: Rockwell C 26-32 + + Manufacturing methods: + Button rifling: + Carbide button pulled/pushed through drilled/reamed blank + Displaces metal to form lands and grooves + Compressive residual stress at bore surface → good wear resistance + Production rate: moderate, good consistency + + Cut rifling (single-point): + Single cutting tool removes material groove by groove + Multiple passes per groove (0.001-0.002" per pass) + Low residual stress → theoretically best accuracy potential + Production rate: very slow, highest cost + + Cold hammer forging (CHF): + Blank hammered around mandrel at ~20°C + Mandrel has inverse rifling pattern + High compressive residual stress → longest barrel life + Production rate: very fast (2-5 min per barrel) + Surface finish: excellent, mirror-like bore + Dimensional consistency: very high (mandrel is master) + + Bore specifications: + Caliber: 5.56×45mm NATO, 7.62×51mm NATO, .300 Win Mag, .338 Lapua, .50 BMG + Groove diameter (Ø_groove): equals nominal bullet diameter + Land diameter (Ø_land): Ø_groove − 2 × groove_depth + Groove depth: 0.004-0.005" (5.56), 0.005-0.0065" (7.62), 0.015" (.50 BMG) + Number of grooves: typically 4 or 6 + Groove width to land width ratio: ~2:1 + + Twist rate [inches per revolution]: + Determinants: bullet length, caliber, velocity, bullet density + Greenhill formula (simplified): + Twist = (C × D²) / L + Where: + C = 150 (for velocity < 2,800 ft/s) or 180 (for > 2,800 ft/s) + D = bullet diameter [inches] + L = bullet length [inches] + + Common twist rates: + 5.56 NATO: 1:7" (heavy 77gr) or 1:9" (light 55gr) + 7.62 NATO: 1:10" or 1:12" + .300 Win Mag: 1:10" + .338 Lapua Magnum: 1:9.5" or 1:10" + .50 BMG: 1:15" + + Chamber specification: + SAAMI (Sporting Arms and Ammunition Manufacturers' Institute): + Maximum Average Pressure (MAP): 55,000 psi (5.56), 60,000 psi (7.62) + Proof pressure: 125-140% of MAP + CIP (Commission Internationale Permanente): + Maximum pressure P_max: 3800 bar (5.56), 4150 bar (7.62) + Proof pressure: 125% of P_max (+25% for piezo transducer method) + + Chamber dimensions: + Headspace: critical for safe operation + Go gauge: minimum chamber length + No-Go gauge: maximum acceptable chamber length + Field gauge: maximum safe chamber length (reject if chambers) + + Muzzle devices: + Flash hider: + Prong-type (3/4 prong): redirects gas radially, breaks up muzzle flash + Cage-type (A2 "birdcage"): closed bottom, open top, reduced dust signature + Effectiveness: >90% flash reduction in low-light conditions + + Muzzle brake / compensator: + Redirects propellant gas rearward to counteract recoil + Recoil reduction: 30-60% depending on design + Side effect: increased blast/sound signature to sides + Efficiency η_brake = 1 − (F_recoil_with_brake / F_recoil_without) + + Suppressor (sound moderator): + Expansion chambers + baffles (K-baffle, cone baffle, M-baffle) + Sound reduction: 20-35 dB (supersonic), up to 40 dB (subsonic) + Baffle material: stainless steel, titanium, Inconel + Wipe material: high-temperature rubber/polymer + +Firearm action design: + Operating systems: + Gas impingement (direct) — e.g., AR-15/M16 platform: + Gas tapped from barrel via gas port → gas tube → bolt carrier key + Gas expands in bolt carrier expansion chamber + Drives bolt carrier rearward → cam pin rotates bolt → unlocks + + Gas port location: 4-7" from chamber (carbine), 7-12" (rifle) + Gas port diameter: 0.062-0.086" (varies with barrel length) + Dwell time: bullet passes gas port → exits muzzle (120-250 μs) + + Bolt carrier group mass: ~320-340g (AR-15) + + Short-stroke gas piston — e.g., HK416, SCAR, G36: + Gas drives piston (short travel 5-15mm) → strikes carrier + Piston spring returns piston forward + Reduced heat/carbon fouling in action vs. direct impingement + Piston cup material: stainless steel, Inconel + Adjustable gas regulator (suppressed/normal/adverse settings) + + Long-stroke gas piston — e.g., AK-47/AKM: + Piston permanently attached to bolt carrier + Piston and carrier move together for full stroke length + Massive carrier (~440g AK) → high reliability in adverse conditions + Trade-off: higher reciprocating mass → more felt recoil/muzzle climb + + Bolt and locking mechanism: + Rotating bolt: + Number of locking lugs: 7 (AR-15), 2 (AK), 3 (HK G3/MP5 roller-delayed) + Bolt lug shear area A_lug [mm²]: + A_lug_total = n_lugs × w_lug × h_lug + Shear stress τ = F_thrust / A_lug_total + Safety factor SF = τ_yield / τ_actual > 2.0 + + Bolt thrust F_thrust [N]: + F_thrust = P_chamber × A_case_head_internal + Where: + P_chamber = peak chamber pressure [Pa] + A_case_head_internal = π × (d_case_head/2)² [m²] + + Cam pin track angle: + Influences extraction timing and effort + Typical helix angle: 15-25° + + Extractor: + Extractor claw engagement on case rim + Extractor spring tension: 60-90 N (AR-15) + Extractor material: tool steel, typically S7 or A2 + + Recoil system: + Recoil spring: + Constant-rate spring: single wire diameter, uniform pitch + Progressive-rate spring: variable pitch, rising rate + Spring rate k [N/mm]: k = G×d⁴/(8×D³×N) + Where: + G = shear modulus of spring material (~80 GPa for steel) + d = wire diameter [mm] + D = mean coil diameter [mm] + N = number of active coils + + Buffer system (AR-15): + Standard carbine buffer: 85g (3.0 oz) + H buffer: 108g (3.8 oz) + H2 buffer: 131g (4.6 oz) + H3 buffer: 150g (5.3 oz) + Rifle buffer: 144g (5.1 oz) + Hydraulic buffer: variable resistance, smoothest recoil + +Trigger mechanism: + Single stage trigger: + Sear engagement: sear nose contacts hammer notch + Trigger pull weight: 2.5-7.0 lbs (military), 1.0-3.5 lbs (competition) + Creep: distance trigger moves before sear release + Overtravel: distance after sear release + + Two stage trigger: + Stage 1 (take-up): light spring, trigger moves rearward to "wall" + Stage 2 (break): heavier spring, short crisp break at wall + Stage 1 weight: 1.5-3.0 lbs, Stage 2 weight: 1.5-2.0 lbs + Total pull weight: 3.0-5.0 lbs + + Disconnector: + Catches hammer during recoil cycle, releases to sear when trigger resets + Timing: hammer must be caught before bolt returns to battery + Disconnector spring: light, ~5-10 N + + Safety mechanisms: + Manual safety: blocks trigger and/or sear from moving + Firing pin block: prevents firing pin forward movement unless trigger pulled + Drop safety: inertial, prevents hammer follow + +Magazine feed system: + Single-stack magazine: + Cartridges in single column + Reliable feeding, low capacity per length + Spring force more consistent + + Double-stack magazine: + Cartridges in staggered double column + Higher capacity in same length + Tapered body to single-feed at top + Feed lips: control cartridge presentation angle (7-10°) + + Magazine spring (constant-force or progressive): + Material: music wire (ASTM A228), stainless steel + Follower: anti-tilt design, material: polymer or aluminum + Magazine body: steel stamping, aluminum, or polymer + + Feed reliability analysis: + Cartridge presentation angle θ [degrees]: + θ = atan((H_feed_lip_rear − H_feed_lip_front) / L_cartridge) + Bolt overtravel clearance: 1.5-3.0 mm behind magazine + Feed ramp angle: 45-55° to barrel axis +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class BarrelManufacturing { Button_Rifled, Cut_Rifled, Cold_Hammer_Forged }; +enum class GasSystem { Direct_Impingement, Short_Stroke_Piston, Long_Stroke_Piston, Blowback, Roller_Delayed }; +enum class MuzzleDevice { Flash_Hider, Muzzle_Brake, Compensator, Suppressor, None }; +enum class TriggerType { Single_Stage, Two_Stage, Set_Trigger, Electronic }; +enum class MagazineType { Single_Stack, Double_Stack_Single_Feed, Double_Stack_Double_Feed }; + +struct BarrelSpec { + double caliber_mm; // nominal bullet diameter + double groove_diameter_mm; + double land_diameter_mm; + int number_of_grooves; + double twist_rate_inches_per_rev; // 7, 9, 10, 12, etc. + BarrelManufacturing manufacturing; + std::string steel_alloy; // "4150", "416R", "41V45" + double barrel_length_mm; + double chamber_spec; // SAAMI or CIP designation + double max_average_pressure_psi; // MAP per SAAMI + double proof_pressure_psi; + MuzzleDevice muzzle_device; + double muzzle_device_efficiency_pct; + double estimated_barrel_life_rounds; // >10,000 for CHF chrome-lined +}; + +struct ActionSpec { + GasSystem gas_system; + double gas_port_diameter_mm; + double gas_port_distance_from_chamber_mm; + double bolt_carrier_mass_g; + int number_of_locking_lugs; + double bolt_lug_shear_area_total_mm2; + double cam_pin_track_angle_deg; + double extractor_spring_force_N; + double recoil_spring_rate_N_per_mm; + double buffer_mass_g; + double bolt_thrust_at_MAP_N; + bool adjustable_gas_regulator; + bool forward_assist; +}; + +struct TriggerSpec { + TriggerType type; + double stage1_weight_lbs; + double stage2_weight_lbs; + double total_pull_weight_lbs; + double sear_engagement_area_mm2; + double sear_engagement_angle_deg; + double disconnector_timing_ms; + bool firing_pin_block; + bool drop_safety; + double reset_distance_mm; +}; + +struct MagazineSpec { + MagazineType type; + int capacity_rounds; + double body_length_mm; + std::string body_material; // steel, aluminum, polymer + double feed_lip_angle_deg; + double spring_force_full_N; + double spring_force_empty_N; + double follower_travel_mm; + std::string follower_material; + bool anti_tilt_follower; + double cartridge_presentation_angle_deg; +}; + +struct FirearmSpec { + std::string designation; // "HK416A5", "M4A1", "SCAR-H" + std::string caliber; // "5.56×45mm NATO", "7.62×51mm NATO" + BarrelSpec barrel; + ActionSpec action; + TriggerSpec trigger; + MagazineSpec magazine; + double overall_length_mm; + double weight_unloaded_kg; + double cyclic_rate_rpm; + double muzzle_velocity_mps; + double muzzle_energy_J; + std::string operating_temperature_range; // "-40°C to +60°C" +}; + +struct FirearmState { + int rounds_fired_lifetime; + double barrel_throat_erosion_mm; + double muzzle_velocity_actual_mps; + double chamber_pressure_actual_psi; + double group_size_MOA; + bool fouled_condition; + double ambient_temperature_C; + double last_maintenance_rounds; +}; + +struct FirearmPerformance { + double mean_radius_MOA; // accuracy + double extreme_spread_MOA; + double muzzle_velocity_SD_mps; // standard deviation + double reliability_MRBF_rounds; // mean rounds between failures + double barrel_remaining_life_pct; + double recoil_impulse_Ns; + double free_recoil_energy_J; +}; + +FirearmSpec design_firearm(std::string caliber, double barrel_length_mm, GasSystem gas, BarrelManufacturing bbl_mfg = BarrelManufacturing::Cold_Hammer_Forged); + +FirearmState initialize_firearm_state(const FirearmSpec& spec); + +FirearmPerformance simulate_firearm(const FirearmSpec& spec, FirearmState& state, int rounds_fired, double ambient_temp_C, bool suppressed); + +double calculate_twist_rate(double bullet_length_mm, double caliber_mm, double muzzle_velocity_mps); + +double calculate_bolt_thrust(double chamber_pressure_psi, double case_head_diameter_mm); + +double calculate_barrel_life(double bore_area_cm2, double propellant_charge_g, double peak_pressure_psi, BarrelManufacturing mfg); + +} // namespace vde::defense_weapons +``` + +--- + +### 2. Ammunition Engineering + +**Priority**: P1 + +#### 2.1 Cartridge Case, Bullet, Propellant, Primer, and Ballistics + +``` +Ammunition engineering overview: + Complete cartridge design involves case, bullet, propellant, and primer + as an integrated system. Each component must function reliably through + the entire firing cycle: chambering, lockup, ignition, internal ballistics, + barrel travel, muzzle exit, external ballistics, and terminal effects. + +Cartridge case design: + Material: brass Cu70Zn30 (70% Cu, 30% Zn — cartridge brass C26000) + + Manufacturing process: + Deep drawing (multi-stage): + Stage 1: Blank and cup — brass disc blanked from strip, drawn to cup + Stage 2-4: Progressive draws — cup drawn deeper and thinner + Stage 5: Head forming — case head thickened (heading/bumping) + Stage 6: Primer pocket punch — pocket and flash hole formed + Stage 7: Neck/shoulder forming — taper forming with annealing + + Annealing (inter-stage and final): + Shoulder and mouth annealed at ~350-500°C (yellow to dull red) + Softens work-hardened brass, prevents neck/shoulder cracking + Induction annealing: precise time/temperature control + Under-annealed: springback, cracking; over-annealed: weak, can't hold bullet + + Critical dimensions: + Case head diameter: e.g., 12.01 mm (5.56 NATO), 12.01 mm (7.62 NATO) + Case length: e.g., 44.70 mm (5.56), 51.18 mm (7.62) + Neck wall thickness: 0.30-0.35 mm + Case taper: 0.5-1.0° (to aid extraction) + Primer pocket diameter/depth per SAAMI specifications + Flash hole diameter: 1.5-2.0 mm (small rifle), 2.0-2.5 mm (large rifle) + Case volume (H₂O capacity): critical for propellant capacity + + Pressure vessel analysis: + Hoop stress σ_hoop [MPa] in case wall: + σ_hoop = P_internal × r_case / t_wall + Axial stress σ_axial [MPa]: + σ_axial = P_internal × r_case / (2 × t_wall) + Case material yield: ~200-300 MPa (annealed brass) + Elastic expansion: case expands to chamber wall, seals gas + Elastic recovery: case springs back ~0.001-0.002" for extraction + +Bullet design: + Jacketed bullet (FMJ — Full Metal Jacket): + Core: lead (Pb) or lead alloy (Pb-Sb 2-5% antimony for hardness) + Jacket: gilding metal Cu90Zn10 (90% Cu, 10% Zn) + Jacket thickness: 0.5-0.8 mm + Construction: open-tip match (OTM), open-tip (hunting), closed-tip (FMJ military) + + Steel core armor-piercing (AP): + Hardened steel penetrator core (60+ HRC) + Lead sheath or aluminum cup around core + Gilding metal jacket + Examples: M855 (SS109) green tip, M993, M995 AP + + Lead-free frangible: + Copper-polymer composite or sintered copper/tin powder + Disintegrates on impact with hard targets + Reduced ricochet and overpenetration risk + Density: 7.5-8.5 g/cm³ (vs. 11.3 g/cm³ for lead) + + Jacket manufacturing: + Cup formed from gilding metal strip + Lead core swaged into jacket + Point formed by die closure (open-tip) or nose-punch (closed-tip) + Cannelure: knurled groove for case mouth crimp + Boat tail: reduced base diameter 7-9° angle for drag reduction + +Propellant chemistry: + Single-base propellant: + Nitrocellulose (NC): 90-95% by weight + Nitrogen content: 12.6-13.4% N (determines energy density) + Stabilizer: diphenylamine (DPA) 1-2% — scavenges NO₂ decomposition + Deterrent (moderant): dibutyl phthalate (DBP/DBP+) 1-5% — surface coating + Reduces initial burn rate → progressive burning characteristic + Plasticizer: dibutyl phthalate, camphor + Graphite: 0.1-0.3% surface coating — conductivity, flowability + + Double-base propellant: + Nitrocellulose (NC): 50-65% + Nitroglycerin (NG): 25-40% — energetic plasticizer + Increases energy density and flame temperature + Stabilizer: diphenylamine, ethyl centralite + Deterrent coating for progressivity + + Grain geometry: + Progressive burning: burn surface increases as grain burns + Neutral burning: constant burn surface + Degressive burning: burn surface decreases + + Multi-perforated (7-hole) grain: + Perforations: 7 holes in hexagonal pattern + Burning: external surface decreases (regressive) + internal perforations increase (progressive) + Net result: nearly neutral to slightly progressive + + Geometry parameters: + D_perf = perforation diameter + W_web = web thickness (min distance between perforations) + L_grain = grain length + D_grain = grain outer diameter + + Web fraction: w = 2×W_web / D_grain (typically 0.15-0.30) + + Quickness (vivacity): + Linear burn rate r [mm/s]: + r = β × P^n (Vieille's law / Saint Robert's law) + Where: + β = burn rate coefficient [mm/(s·MPa^n)] + P = chamber pressure [MPa] + n = pressure exponent (0.7-0.9 for NC propellants) + + Force constant f [J/g]: + f = R × T_v / M_g + Where: + T_v = adiabatic flame temperature (~2500-3500 K) + M_g = average molecular weight of combustion gases + +Primer chemistry: + Corrosive primer (historical — Berdan): + Potassium chlorate KClO₃ → KCl (corrosive salt) + Not used in modern ammunition + + Non-corrosive primer (modern): + Initiating explosive: lead styphnate (lead 2,4,6-trinitroresorcinate) ~35-45% + PbC₆HN₃O₈ → Pb + CO₂ + H₂O + N₂ + C (decomposition) + Initiated by impact (firing pin strike) + Oxidizer: barium nitrate Ba(NO₃)₂ ~25-35% + Provides oxygen for combustion + Fuel: antimony sulfide Sb₂S₃ ~10-15% + Fuel for sustained burn, forms glassy slag + Sensitizer: tetrazene ~2-5% + Enhances sensitivity to impact + Frictionator: ground glass / aluminum powder ~5-10% + + DDNP non-toxic primer: + Diazodinitrophenol (DDNP): lead-free, non-corrosive + Oxidizer: zinc peroxide, potassium nitrate + Fuel: titanium, aluminum powder + Reduced heavy metal contamination + Issues: lower shelf stability, different ignition characteristics + +Internal ballistics: + Pressure-time curve in chamber: + Ignition delay (t₀ to t_ign): 0.2-0.5 ms + Pressure rise rate dP/dt: 50,000-150,000 psi/ms + Peak pressure P_max: 45,000-62,000 psi (per caliber) + Time to peak: 0.3-0.8 ms after ignition + Bullet exit time: 1.0-2.0 ms (rifle barrel length dependent) + + Piezoelectric pressure measurement: + SAAMI conformal transducer or CIP channel transducer + Conformal: transducer mounted in cartridge case wall (non-invasive) + Channel: transducer exposed through drilled port in chamber wall + + Proof pressure: + Proof load: 125-140% of service MAP + CIP: +25% P_max for piezo method (minimum 1.25 × P_max) + Proof cartridge marked with special headstamp + Barrel/action must withstand proof without permanent deformation + +External ballistics: + Trajectory governed by: + Gravity, drag, wind, Coriolis, Magnus, spin drift, aerodynamic jump + + Drag force F_D [N]: + F_D = ½ × ρ_air × v² × S_ref × C_D(Mach) + Where: + ρ_air = air density [kg/m³] (altitude/temperature dependent) + v = projectile velocity [m/s] + S_ref = reference area = π/4 × d² [m²] + C_D = drag coefficient (function of Mach number) + + Ballistic coefficient (BC): + BC = m / (i × d²) + Where: + m = bullet mass [lb] + d = bullet diameter [in] + i = form factor (ratio of bullet drag to standard projectile drag) + + G1 drag model: flat-based, 2-caliber radius ogive (older standard) + Form factor i_G1: 0.45-0.55 for boat-tail match bullets + G7 drag model: boat-tail, long ogive (modern long-range standard) + Form factor i_G7: 0.23-0.28 for very-low-drag (VLD) bullets + + Doppler radar measurement: + Track projectile in flight, measure velocity decay + Compute C_D vs. Mach directly from dV/dt + BC back-calculated from measured drag curve + Provides actual BC for specific bullet/velocity combination + + Wind drift: + Crosswind deflection [m]: + Wind_drift = W_cross × (TOF_actual − TOF_vacuum) + Where: + W_cross = crosswind velocity [m/s] + TOF_actual = actual time of flight + TOF_vacuum = vacuum time of flight = R/v_0 + +Terminal ballistics: + Ballistic gelatin testing: + 10% ordnance gelatin (Type 250A Bloom), 4°C (±1°C) + Calibrated: 0.177" steel BB at 590 ± 15 ft/s → 8.5 ± 1 cm penetration + FBI protocol: + Bare gelatin (4 layers) + Heavy clothing (denim + fleece + cotton + denim) + Steel (16-gauge) + Wallboard (½" gypsum) + Plywood (¾" pine) + Auto glass (laminated windshield) + Minimum penetration: 12 inches (FBI), optimal 12-18 inches + + Bullet expansion: + Expansion ratio = D_expanded / D_original + Typically 1.5-2.5 × for hollow-point expanding bullets + No expansion for FMJ (military, Hague Convention) + + Energy deposit in tissue: + Temporary cavity: radial tissue displacement (peak in 1-3 ms) + Permanent cavity: crushed/transected tissue + Energy deposit E_deposit [J]: + E_deposit = ½ × m × (v_impact² − v_exit²) + Kinetic energy at impact: ½mv² (500-3000 J depending on caliber) +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class BulletType { FMJ, OTM_Match, Open_Tip, Steel_Core_AP, Lead_Free_Frangible, Soft_Point, Hollow_Point }; +enum class PropellantBase { Single_Base_NC, Double_Base_NC_NG, Triple_Base_NQ, Composite }; +enum class GrainGeometry { Tubular, Multi_Perf_7Hole, Multi_Perf_19Hole, Ball_Spherical, Flake, Stick, End_Burning }; +enum class PrimerType { Lead_Styphnate_Standard, DDNP_Non_Toxic, Berdan_Corrosive, Boxer_Non_Corrosive }; +enum class BC_DragModel { G1, G7, G2, G5, G6, G8, Custom_Doppler }; +enum class TestBarrier { Bare_Gelatin, Heavy_Clothing, Steel, Wallboard, Plywood, Auto_Glass }; + +struct CaseSpec { + std::string designation; // "5.56×45mm", "7.62×51mm" + double case_length_mm; + double head_diameter_mm; + double rim_diameter_mm; + double neck_diameter_mm; + double shoulder_angle_deg; + double neck_wall_thickness_mm; + double flash_hole_diameter_mm; + double primer_pocket_diameter_mm; + double water_capacity_grains; // H₂O grain capacity + std::string material; // "C26000 brass (Cu70Zn30)" + double max_pressure_psi; // SAAMI MAP +}; + +struct BulletSpec { + BulletType type; + double caliber_mm; + double mass_grains; + double mass_grams; + double overall_length_mm; + double nose_length_mm; + double ogive_radius_calibers; // e.g., 8.5 calibers tangent ogive + double boat_tail_angle_deg; + double boat_tail_length_mm; + std::string jacket_material; // "Gilding metal Cu90Zn10" + std::string core_material; // "Lead alloy Pb-Sb 2%" + std::string penetrator_material; // "Hardened steel 65HRC" (AP only) + double ballistic_coefficient_G1; + double ballistic_coefficient_G7; + double form_factor_G7; + BC_DragModel preferred_drag_model; +}; + +struct PropellantSpec { + PropellantBase base; + GrainGeometry grain; + std::string designation; // Commercial or military designation + double nc_pct; // Nitrocellulose content % + double ng_pct; // Nitroglycerin content % (double-base) + double stabilizer_pct; // DPA, ethyl centralite + double deterrent_pct; // DBP coating % + double bulk_density_g_per_cm3; + double grain_length_mm; + double grain_diameter_mm; + double perforation_diameter_mm; + double web_thickness_mm; + double burn_rate_coeff_beta; // Vieille's law β [mm/(s·MPa^n)] + double pressure_exponent_n; // Vieille's law n + double force_constant_J_per_g; // Impetus f + double flame_temperature_K; + double specific_heat_ratio_gamma; +}; + +struct PrimerSpec { + PrimerType type; + double charge_mass_mg; + double initiator_mass_mg; // lead styphnate or DDNP + double oxidizer_mass_mg; // Ba(NO₃)₂ + double fuel_mass_mg; // Sb₂S₃ + double output_pressure_psi; // primer output pressure + double ignition_delay_ms; + double brisance_index; +}; + +struct AmmoSpec { + std::string designation; // "M855", "M80", "M118LR", "Mk262 Mod1" + CaseSpec cartridge_case; + BulletSpec bullet; + PropellantSpec propellant; + PrimerSpec primer; + double propellant_charge_mass_grains; + double propellant_charge_mass_grams; + double loading_density_g_per_cm3; // charge mass / case volume + double overall_cartridge_length_mm; + double cartridge_weight_grams; + double nominal_muzzle_velocity_mps; + double nominal_muzzle_energy_J; + bool sealed_primed_case; + bool waterproofed; +}; + +struct BallisticsSpec { + AmmoSpec ammunition; + double barrel_length_mm; + double twist_rate_inches; + double muzzle_velocity_mps; + double chamber_pressure_peak_psi; + double pressure_rise_rate_psi_per_ms; + double barrel_time_ms; + double muzzle_exit_pressure_psi; + double bullet_rpm; // spin rate at muzzle + double BC_G1; + double BC_G7; + std::vector trajectory_range_m; + std::vector trajectory_drop_cm; + std::vector trajectory_velocity_mps; + std::vector trajectory_energy_J; + std::vector trajectory_time_of_flight_s; + std::vector wind_drift_10mph_cm; + double supersonic_range_m; + double transonic_range_m; + double subsonic_range_m; +}; + +struct TerminalBallisticsSpec { + double impact_velocity_mps; + double impact_energy_J; + TestBarrier barrier; + double penetration_depth_cm; + double expansion_diameter_mm; + double expansion_ratio; // D_expanded/D_original + double retained_mass_pct; + double temporary_cavity_volume_cm3; + double permanent_cavity_volume_cm3; + bool meets_FBI_penetration_minimum; // >12" +}; + +AmmoSpec design_ammunition(std::string caliber, BulletType bullet_type, double bullet_mass_grains, double target_mv_mps); + +BallisticsSpec compute_ballistics(const AmmoSpec& ammo, double barrel_length_mm, double twist_inches, double sight_height_cm, double zero_range_m, double max_range_m); + +TerminalBallisticsSpec compute_terminal_ballistics(const BulletSpec& bullet, double impact_velocity_mps, TestBarrier barrier); + +double calculate_BC(double mass_grains, double caliber_mm, double form_factor, BC_DragModel model); + +double calculate_internal_pressure_curve(const PropellantSpec& propellant, double charge_mass, double case_volume, double barrel_length, double bore_area, double bullet_mass); + +double calculate_recoil_energy(double bullet_mass_kg, double mv_mps, double powder_mass_kg, double firearm_mass_kg); + +} // namespace vde::defense_weapons +``` + +--- + +### 3. Artillery & Gun Systems + +**Priority**: P1 + +#### 3.1 Barrel, Breech, Recoil, Fire Control, and Autoloader + +``` +Artillery barrel autofrettage: + Autofrettage process generates beneficial residual compressive stress at + the bore surface, increasing fatigue life and maximum allowable pressure. + + Hydraulic autofrettage: + Internal pressure P_auto applied such that: + Inner wall yields in compression (plastic deformation) + Mid-wall remains elastic + Upon pressure release, elastic recovery creates: + Tangential residual compression at bore: σ_θ_res_compressive + Tangential residual tension at OD: σ_θ_res_tensile + + Bessler method (hydraulic autofrettage): + 1. Bore sealed at both ends + 2. Hydraulic fluid pressurized to 500-1,200 MPa (5,000-12,000 bar) + 3. Overstrain ratio OSR = r_plastic / r_outer + 4. Target OSR: 0.5-0.7 (50-70% wall thickness yielded) + + Residual stress after autofrettage (Lame solution): + For elastic-perfectly plastic material: + + Residual tangential stress at bore σ_RES_θ(r_i): + Elastic recovery subtracts from plastic stress state + σ_RES_θ = σ_θ_plastic − σ_θ_elastic_recovery + + Autofrettage pressure formula (Tresca yield): + P_auto = (σ_y/√3) × [1 + 2×ln(r_o/r_i) − (r_i²/r_o²)] + for full plasticity (not typical) + + Partial autofrettage (OSR < 1.0): + P_auto = (σ_y/√3) × [OSR² + 2×ln(r_plastic/r_i) − (r_plastic²/r_o²)] + + Shrink-fit multi-layer jacket: + Outer jacket inner diameter < inner tube outer diameter + Heat jacket → thermal expansion → place over inner tube → cool → shrink + Interference fit δ [mm]: + δ = d_interface × (σ_interface / E) + + Interface pressure p_interface [MPa]: + p_interface = (E×δ/d) / [(d_o²+d²)/(d_o²−d²) + (d²+d_i²)/(d²−d_i²) − ν] + + Benefits: pre-compression of inner wall, increased fatigue life, + partial containment of autofrettage residual stress + +Breech mechanism: + Sliding wedge (Krupp/Vickers design): + Wedge moves horizontally across breech face + Wedge angle: 2-5° for self-locking + Opening: mechanically or hydraulically driven + Used in: 105mm howitzer, 155mm howitzer (older), 120mm tank gun + Sealing: obturation pad (de Bange system) + + Interrupted screw (Welin step thread): + Thread sectors (steps): 2-6 alternating threaded/unthreaded + Rotation angle: 30-60° to lock/unlock + Thread profile: buttress or Acme + Thread engagement: 50-70% of full circumference + Used in: 155mm howitzer (modern), naval guns + Advantages: lighter, faster operation than continuous thread + + Obturation: + de Bange obturator pad: + Resilient pad (fiber/asbestos replacement + grease) behind steel mushroom + Mushroom head displaced rearward under chamber pressure + Compresses obturator pad → radial expansion → seals chamber + Principle: pressure-aided sealing + + Metallic obturation: + Cartridge case expansion seals chamber (fixed ammunition) + Case provides gas seal, no separate obturator required + +Recoil system: + Hydro-pneumatic recuperator: + Nitrogen gas fill pressure: 500-1,500 psi (pre-charge) + + Recuperator force F_recup [N] at recoil displacement x: + F_recup(x) = P_N2_precharge × A_piston × (V_initial / V(t))^γ + Where: + γ = 1.4 for diatomic N₂ + V_initial / V(t) = compression ratio + + Recuperator efficiency: >95% energy recovery + + Hydraulic recoil buffer: + Variable orifice throttling groove: + As piston moves rearward, orifice area decreases + Constant resistance force throughout recoil stroke + + Orifice flow Q [m³/s]: + Q = C_d × A_orifice(x) × √(2×ΔP/ρ) + Where: + C_d = discharge coefficient (~0.6-0.7) + A_orifice = orifice area as function of stroke [m²] + ΔP = pressure drop across orifice [Pa] + ρ = hydraulic fluid density [kg/m³] + + Recoil force F_recoil [N]: + F_recoil = m_mass × a_recoil + F_recoil = P_buffer × A_piston_effective + + Constant recoil length: + Typical recoil length: + 105mm: 1.0-1.5m + 155mm: 1.5-2.5m + 120mm tank gun: 0.28-0.34m (concentric recoil) + + Recoil energy E_recoil [J]: + E_recoil = ½ × m_recoiling × v_free_recoil² + m_recoiling = m_barrel + m_breech + m_recoil_piston + ½×m_spring_mass + v_free_recoil = (m_projectile + 0.5×m_propellant) × v_muzzle / m_recoiling + +Fire Control System (FCS): + Laser rangefinder: + Eye-safe wavelength: 1.54 μm (Raman-shifted Nd:YAG) + — erbium:glass laser also eye-safe at 1.54 μm + Pulse time-of-flight measurement: + Range = c × Δt / 2 (c = 3×10⁸ m/s) + Accuracy: ±1-5 m + Max range: 5-20 km (depending on visibility) + Multi-pulse averaging for accuracy + + Ballistic computer (met message): + Inputs: + Target range [m], bearing [mils], elevation angle [°] + Air temperature T [°C], air pressure P [hPa], humidity RH [%] + Charge temperature T_prop [°C] + Muzzle velocity v₀ [m/s] (from Doppler radar) + Wind speed/direction [m/s] at multiple altitudes + Rotation of earth (Coriolis): + Coriolis deflection ΔE [m]: + ΔE = Ω × v_projectile × TOF² × sin(latitude) + Coriolis vertical: ΔV = Ω × v_projectile × TOF² × cos(latitude) × sin(azimuth) + Where Ω = 7.2921159 × 10⁻⁵ rad/s (Earth angular velocity) + Outputs: + Elevation (quadrant) angle, azimuth (deflection), fuze setting + Time of flight, angle of fall, terminal velocity + + Muzzle velocity radar (Doppler): + Continuous-wave (CW) or frequency-modulated (FMCW) radar + Mounted on barrel or carriage + Measures velocity of each projectile exiting barrel + Fires correction applied to subsequent rounds + MV measurement accuracy: ±0.1 m/s + + GPS laying: + Inertial navigation + GPS for position and orientation + Replaces traditional survey/picket laying + Accuracy: <1 mil azimuth, <1 m position (with military GPS/SAASM) + Time to lay: <3 minutes + +Autoloader systems: + Carousel autoloader (Russian design — T-72/T-80/T-90): + Rotating carousel magazine in hull (22-28 rounds) + Vertical projectile stowage, horizontal charge stowage + Rotates to select round, elevator lifts to breech level + Chain rammer pushes round into chamber + Cycle time: 6-8 seconds + Rate of fire: 7-8 rounds/min + + Bustle autoloader (Western design — Leclerc, Type 90, K2): + Magazine in turret bustle with blowout panels + Projectile and charge stored as one-piece fixed ammunition + Horizontal rammer + Cycle time: 5-7 seconds + Advantages: crew isolated from ammunition (blowout panels) +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class AutofrettageMethod { Hydraulic_Bessler, Mechanical_Swage, Explosive, Shrink_Fit_Multi_Layer }; +enum class BreechType { Sliding_Wedge_Krupp, Sliding_Wedge_Vickers, Interrupted_Screw_Welin, Vertical_Sliding, Rotary_Wedge }; +enum class RecoilSystem { Hydro_Pneumatic, Hydro_Spring, Concentric, Soft_Recoil_FOFCS }; +enum class ArtilleryType { Towed_Howitzer, Self_Propelled_Howitzer, Tank_Gun, Mortar, Naval_Gun }; + +struct BarrelAssemblySpec { + double caliber_mm; // 105, 120, 155 + double barrel_length_calibers; // L/39, L/44, L/52, L/55 + double barrel_length_mm; + std::string steel_alloy; // Cr-Ni-Mo-V ESR (electro-slag remelted) + double yield_strength_MPa; + AutofrettageMethod autofrettage; + double overstrain_ratio_OSR; + double residual_compressive_stress_at_bore_MPa; + int number_of_layers; // monobloc, 2-layer, 3-layer + double shrink_fit_interference_mm; + double chrome_plating_thickness_mm; // 0.1-0.3 mm bore + int number_of_grooves; // rifling + double twist_rate_calibers_per_turn; // progressive or constant + double chamber_volume_cm3; + double max_design_pressure_MPa; + double design_barrel_life_EFC; // equivalent full charges +}; + +struct BreechSpec { + BreechType type; + double breech_block_mass_kg; + double opening_force_kN; + double opening_time_s; + double closing_time_s; + int interrupted_screw_sectors; // 2-4 for Welin + double thread_engagement_pct; + std::string obturation_type; // "de Bange pad", "metallic cartridge case" + bool semi_automatic_operation; + bool electric_priming; +}; + +struct RecoilSpec { + RecoilSystem type; + double recoil_length_max_mm; + double recoil_mass_kg; // m_recoiling + double free_recoil_velocity_mps; + double recoil_energy_kJ; + double buffer_force_constant_kN; + double recuperator_precharge_pressure_bar; + double recuperator_gas_volume_initial_L; + double nitrogen_fill_mass_kg; + double counter_recoil_time_s; + double counter_recoil_braking_mm; // last portion of stroke + bool variable_orifice_throttling; + double recuperator_energy_efficiency_pct; +}; + +struct FireControlSpec { + double laser_rangefinder_wavelength_nm; // 1540 nm eye-safe + double laser_max_range_m; + double range_accuracy_m; + double ballistic_computer_update_rate_Hz; + bool met_sensors_integrated; // T, P, RH, wind + bool doppler_mv_radar; + double mv_measurement_accuracy_mps; + bool gps_inertial_laying; + double laying_accuracy_mils; + double coriolis_correction_enabled; + bool automatic_laying; // servo-driven elevation/azimuth + double time_to_first_round_s; +}; + +struct AutoLoaderSpec { + std::string type; // "carousel", "bustle", "chain rammer" + int magazine_capacity_rounds; + double cycle_time_s; + double rate_of_fire_rpm; + std::string feed_system; // "separate loading projectile+charge" + bool programmable_ammo_selection; + double ram_force_kN; + double ram_stroke_mm; + bool automatic_fuze_setting; + bool misfire_handling; + bool blowout_panels; // bustle magazine safety +}; + +struct ArtillerySpec { + std::string designation; // "M777A2", "PzH 2000", "M109A7" + ArtilleryType type; + double caliber_mm; + BarrelAssemblySpec barrel; + BreechSpec breech; + RecoilSpec recoil; + FireControlSpec fcs; + AutoLoaderSpec autoloader; + double elevation_range_min_deg; + double elevation_range_max_deg; + double traverse_range_deg; + double traverse_rate_deg_per_s; + double elevation_rate_deg_per_s; + std::string ammunition_types; // "HE, WP, Illum, DPICM, Excalibur, SMArt" + double max_range_conventional_km; + double max_range_rocket_assisted_km; + double max_range_precision_guided_km; + double combat_weight_kg; + double crew_size; +}; + +struct ArtilleryState { + int rounds_fired_lifetime; + double barrel_temperature_C; + double barrel_wear_EFC; + double muzzle_velocity_reduction_pct; + double recoil_system_pressure_bar; + double recuperator_nitrogen_pressure_bar; + double hydraulic_fluid_temperature_C; + int autoloader_rounds_remaining; + bool fcs_alignment_status; + double last_mv_reading_mps; +}; + +struct ArtilleryPerformance { + double muzzle_velocity_actual_mps; + double muzzle_velocity_standard_deviation_mps; + double probable_error_range_m; // PE_R at max range + double probable_error_deflection_m; + double rate_of_fire_actual_rpm; + double barrel_remaining_life_EFC; + double time_into_action_s; // emplacement to first round + double time_out_of_action_s; +}; + +ArtillerySpec design_artillery(double caliber_mm, ArtilleryType type, double barrel_length_calibers, BreechType breech, RecoilSystem recoil); + +ArtilleryState initialize_artillery_state(const ArtillerySpec& spec); + +ArtilleryPerformance simulate_artillery(const ArtillerySpec& spec, ArtilleryState& state, int rounds_fired, double propellant_temp_C, double ambient_temp_C, double wind_speed_mps, double wind_direction_deg); + +double calculate_autofrettage_pressure(double sigma_y_MPa, double r_i_mm, double r_o_mm, double target_OSR); + +double calculate_residual_stress(double r_mm, double r_i_mm, double r_plastic_mm, double r_o_mm, double sigma_y_MPa); + +double calculate_recoil_parameters(double m_projectile_kg, double mv_mps, double m_propellant_kg, double m_recoiling_kg, double recoil_length_max_mm, double buffer_efficiency); + +double calculate_firing_solution(double range_m, double bearing_mils, double mv_mps, double met_data[], double propellant_temp_C); + +} // namespace vde::defense_weapons +``` + +--- + +### 4. Armored Vehicle Design + +**Priority**: P1 + +#### 4.1 Hull/Turret, ERA, APS, Mine Protection, Suspension, Powerpack, NBC + +``` +Armored vehicle hull and turret design: + Base armor — Rolled Homogeneous Armor (RHA): + Per MIL-DTL-12560 Class 3 + Steel: high-hardness armor steel (300-550 BHN) + Weldable: low carbon equivalent (CE < 0.50) + Thickness: 5-120 mm (depending on vehicle class) + + Ballistic limit v₅₀ [m/s] — semi-infinite RHA: + v₅₀ = k_penetrator × √(P/L × √(ρ_penetrator/ρ_RHA)) + For APFSDS long rod penetrator (L/D > 15): + Penetration depth P [mm]: + P = L × √(ρ_penetrator/ρ_target) − D × (ρ_target/ρ_penetrator) + Where: + L = penetrator length [mm] + D = penetrator diameter [mm] + ρ_penetrator = WHA (17.5 g/cm³) or DU (18.6 g/cm³) + ρ_target = RHA steel (7.85 g/cm³) + + Composite armor: + Typical multi-layer array (front → back): + Layer 1: Hard ceramic (Al₂O₃ 96%, SiC, B₄C, TiB₂) + High hardness → breaks up penetrator tip + Thickness: 3-10 mm per tile + Confinement: essential (lateral containment prevents ceramic dispersal) + + Layer 2: UHMWPE (Ultra-High Molecular Weight Polyethylene) + e.g., Dyneema HB26, Spectra Shield + Low density (0.97 g/cm³) → high mass efficiency + Catches ceramic and penetrator fragments + Thickness: 10-30 mm per layer + + Layer 3: Air gap + Provides standoff for shaped charge jet expansion + Typical gap: 10-50 mm + + Layer 4: Steel or aluminum backing + Structural support and spall capture + Thickness: 5-20 mm + + Mass efficiency E_m: + E_m = (ρ_RHA × t_RHA_reference) / (ρ_composite × t_composite) + E_m ≥ 1.5 for modern composite arrays + + Thickness efficiency E_t: + E_t = t_RHA_reference / t_composite + E_t ≥ 1.2 for ceramic/PE arrays + + Explosive Reactive Armor (ERA): + Sandwich construction: + Flyer plate (front): 2-5 mm steel plate + Insensitive high explosive (HE): 2-4 mm sheet + Rear plate (fixed): 3-8 mm steel plate + + Working principle against shaped charge jet: + Jet impact → detonates HE layer + Flyer plate accelerates outward (1,000-2,000 m/s) + Rear plate moves opposite direction + Moving plates continuously feed new material into jet path + Jet deflection: Δθ = atan(v_plate / v_jet) + Jet breakup: periodic disturbance → particulation + + Residual penetration reduction: + P_residual = P_nominal − ∫(v_plate × t_interaction) + PEN_reduction > 50% for typical ERA vs. SC warhead + + NERA — Non-Energetic Reactive Armor: + Passive rubber/elastomer layer between steel plates + No explosive → safer handling, insensitive munitions compliance + Working principle: rubber bulges on impact, deforms jet/penetrator + Thickness efficiency: lower than ERA but no collateral damage + + Active Protection System (APS): + Hard-kill system: + Radar detection: + Ka-band (26.5-40 GHz) or X-band (8-12 GHz) pulse-Doppler + Detection range: 50-500 m (depending on threat RCS) + Tracking: Kalman filter, threat classification + Reaction time: 0.2-0.5 seconds from detection to intercept + + Interceptor: + Fixed launcher (e.g., Trophy) or trainable (e.g., Iron Fist) + Counter-munition: MEFP (Multiple Explosively Formed Projectiles) + Interception distance: 5-30 m from vehicle + Kill mechanism: blast/fragmentation or hit-to-intercept + Interceptor velocity: 300-800 m/s + + Coverage: 360° azimuth, −15° to +60° elevation + + Interception probability: + P_kill = P_detect × P_track × P_launch × P_intercept + Target P_kill > 0.90 for RPG/ATGM threats + + Soft-kill system: + Laser warning receiver (LWR): + Detects laser rangefinder/designator pulses + Wavelength: 0.4-1.6 μm coverage + Angular resolution: ±5° to ±15° + Triggers countermeasures automatically + + Multispectral smoke: + Visible + IR screening smoke + Obscuration time: 20-60 seconds + Deployment: grenade launchers (76mm, 66mm) + IR aerosol: brass flakes, graphite, or phosphorous + + Mine blast protection: + V-shaped hull: + Deflector angle: 30-45° from horizontal + Blast deflection: redirects blast sideways rather than upward + Standoff height: 400-600 mm ground clearance + + Blast impulse reduction: + I_deviated = I_normal × sin(θ_deflector) + Where θ_deflector = V-hull half-angle + + Energy absorbing seat: + D-Strut design: + Stroke: 150-250 mm (vertical) + Energy absorption mechanism: inversion tube, crushable aluminum, + or hydraulic damper + Peak acceleration limited to <25-30 G at occupant + Dynamic Response Index (DRI) < 17.7 per STANAG 4569 + + Floating floor: + Floor plate decoupled from hull floor + Energy absorbing elements (rubber mounts, crush tubes) + Reduces acceleration transmitted to occupants + + Spall liner: + Aramid (Kevlar, Twaron) or UHMWPE composite panels + Thickness: 8-15 mm + Catches spall fragments from hull perforation + Areal density: 5-15 kg/m² + + Suspension: + Torsion bar: + Spring rate k [N·m/rad]: + k = G × J / L + Where: + G = 80 GPa (shear modulus steel) + J = π×d⁴/32 (polar moment of inertia for solid round bar) + L = bar effective length + Wheel travel: 200-350 mm (tracked vehicles) + Material: high-strength steel (e.g., 4340, 300M) + + Hydropneumatic (in-arm suspension unit IASU): + Gas spring (N₂) + hydraulic damper integrated + Spring rate variable (progressive with wheel travel) + Height control: adjustable ride height + Wheel travel: 300-450 mm + Damping: 2-4 stage adjustable (comfort / cross-country / combat) + + Track system: + Rubber-bushed pin: + Pin connects track links → rubber bushing reduces wear/noise + Track pitch: 120-160 mm + Track width: 450-650 mm (MBT) + Open web track shoes: + Steel or rubber-padded + Replaceable track pad for road use + Track tension: hydraulic tensioner (active tension control) + + Powerpack: + Diesel engine: + MTU 883 V12: 1,100 kW (1,500 hp) + Displacement: 27.4 L, turbocharged + intercooled + Specific power: 40 kW/L + Gas turbine: + AGT1500: 1,120 kW (1,500 hp) + Multi-fuel capability (diesel, JP-8, gasoline) + Lower torque at idle vs. diesel + + Transmission: + Automatic (powershift): 4-6 forward gears, 2-4 reverse + Torque converter with lockup clutch + Steering: double-differential hydrostatic (continuous radius) + + Cooling system: + High-capacity fans (80-120 kW at full power) + Mixed-flow or axial fans + Cooling capacity: 500-800 kW heat rejection + + NBC (Nuclear, Biological, Chemical) protection: + Collective overpressure system: + Filtered air supply maintains positive pressure in crew compartment + Overpressure: 300-500 Pa (3-5 mbar) + Filter: particulate + gas/aerosol (charcoal impregnated) + NATO standard NBC filter canister + + Detection: + Chemical agent detector (ion mobility spectrometry IMS) + Radiation detector (GM tube or scintillation) + Biological agent detection (laser-induced fluorescence) +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class VehicleClass { MBT, IFV, APC, MRAP, Reconnaissance, SPH, ARV, AEV }; +enum class ArmorType { RHA_Steel, Composite_Ceramic_PE, ERA_Explosive_Reactive, NERA_Non_Energetic, Slat_Cage_Bar, Spaced }; +enum class APS_Type { Hard_Kill_Radar_Interceptor, Hard_Kill_IR, Soft_Kill_Smoke_LWR, Soft_Kill_IR_Jammer, Hybrid }; +enum class SuspensionType { Torsion_Bar, Hydropneumatic, Coil_Spring, Hydrogas }; +enum class EngineType { Diesel_Turbocharged, Diesel_Twin_Turbo, Gas_Turbine, Hybrid_Diesel_Electric }; + +struct HullSpec { + VehicleClass vehicle_class; + double glacis_plate_thickness_mm; + double hull_side_thickness_mm; + double hull_rear_thickness_mm; + double hull_bottom_thickness_mm; + ArmorType primary_armor_type; + std::string steel_grade; // "MIL-DTL-12560 Class 3" + double RHA_equivalent_frontal_mm; + double RHA_equivalent_side_mm; + double RHA_equivalent_top_mm; // vs. top-attack + bool V_shaped_hull; + double v_hull_angle_deg; + double ground_clearance_mm; + bool spall_liner; + double spall_liner_areal_density_kg_per_m2; + double weld_joint_efficiency; // >0.85 +}; + +struct CompositeArmorSpec { + std::vector layer_materials; // "Al₂O₃ ceramic", "UHMWPE", "Air gap", "Steel backing" + std::vector layer_thicknesses_mm; + double mass_efficiency_vs_APFSDS; + double mass_efficiency_vs_HEAT; + double thickness_efficiency_total; + double areal_density_kg_per_m2; + double ballistic_limit_v50_APFSDS_mps; + double ballistic_limit_v50_HEAT_mm_penetration; +}; + +struct ERA_Spec { + double flyer_plate_thickness_mm; + double HE_interlayer_thickness_mm; + double rear_plate_thickness_mm; + double flyer_plate_velocity_mps; + double jet_deflection_angle_deg; + double residual_penetration_reduction_pct; + double detonation_velocity_mps; // VOD of HE interlayer + bool insensitive_munitions_compliant; + double ERA_module_areal_density_kg_per_m2; + bool multi_hit_capable; +}; + +struct APS_Spec { + APS_Type type; + std::string radar_type; // "Ka-band pulse-Doppler", "X-band AESA" + double radar_detection_range_m; + double radar_azimuth_coverage_deg; + double radar_elevation_coverage_deg; + double reaction_time_ms; + int interceptor_count; + double interceptor_velocity_mps; + double interception_distance_min_m; + double interception_distance_max_m; + double intercept_probability_P_kill; + bool soft_kill_smoke_integrated; + bool laser_warning_receiver; + double lwr_angular_resolution_deg; + double lwr_wavelength_range_nm; +}; + +struct SuspensionSpec { + SuspensionType type; + int number_of_road_wheels_per_side; + double road_wheel_diameter_mm; + double vertical_wheel_travel_mm; + double torsion_bar_diameter_mm; // for torsion bar type + double spring_rate_N_per_mm; // effective wheel rate + double damping_coefficient_Ns_per_m; // effective at wheel + double track_pitch_mm; + double track_width_mm; + std::string track_type; // "rubber-bushed pin", "double pin" + double ground_pressure_kPa; + bool hydraulic_track_tensioner; +}; + +struct PowerpackSpec { + EngineType engine_type; + double engine_power_kW; + double engine_torque_Nm; + double displacement_L; + double specific_power_kW_per_ton; + int transmission_forward_gears; + int transmission_reverse_gears; + double fuel_capacity_L; + double operational_range_km; + double cooling_capacity_kW; + bool multi_fuel_capable; + double power_to_weight_ratio_kW_per_ton; +}; + +struct NBC_Spec { + bool collective_overpressure; + double overpressure_Pa; + bool particulate_filter; + bool gas_aerosol_filter; + double filter_efficiency_pct; + bool chemical_agent_detector; + bool radiation_detector; + bool biological_detector; + double air_flow_rate_m3_per_h; +}; + +struct ArmorSpec { + std::string designation; // "M1A2 SEPv3", "Leopard 2A7", "T-90M" + VehicleClass vehicle_class; + HullSpec hull; + CompositeArmorSpec composite_armor; // if applicable + ERA_Spec era; + APS_Spec aps; + SuspensionSpec suspension; + PowerpackSpec powerpack; + NBC_Spec nbc; + double combat_weight_tonnes; + double length_overall_mm; + double width_mm; + double height_mm; + int crew; + double max_speed_road_kmh; + double max_speed_cross_country_kmh; + double gradient_pct; + double trench_crossing_mm; + double fording_depth_mm; + std::string stanag_4569_level; // "Level 1-6" +}; + +struct ArmorState { + double hull_integrity_pct; + double era_modules_remaining_pct; + double aps_interceptors_remaining; + double engine_running_hours; + double track_km; + bool nbc_system_active; + bool fire_suppression_ready; + double cumulative_fuel_consumed_L; + double cumulative_operating_hours; +}; + +struct ArmorPerformance { + double protection_level_STANAG; + double probability_of_survival_vs_Kinetic; + double probability_of_survival_vs_HEAT; + double aps_intercept_success_rate_pct; + double mine_blast_survivability_G; + double mobility_index; + double fuel_consumption_L_per_100km; + double mission_reliability_pct; +}; + +ArmorSpec design_armored_vehicle(VehicleClass vclass, double combat_weight_tonnes, ArmorType primary_armor, EngineType engine); + +ArmorState initialize_armor_state(const ArmorSpec& spec); + +ArmorPerformance simulate_armor_engagement(const ArmorSpec& spec, ArmorState& state, double threat_type, double range_m, double hit_angle_deg); + +double calculate_APFSDS_penetration(double L_penetrator_mm, double D_penetrator_mm, double rho_penetrator, double rho_target, double v_impact_mps); + +double calculate_HEAT_jet_penetration(double warhead_diameter_mm, double standoff_mm, double liner_angle_deg, double liner_material_density); + +double calculate_ERA_residual_penetration(double nominal_penetration_mm, double flyer_plate_velocity_mps, double interaction_time_ms); + +} // namespace vde::defense_weapons +``` + +--- + +### 5. Naval Gun & Missile Systems + +**Priority**: P1 + +#### 5.1 Medium Caliber Gun, CIWS, VLS, Anti-Ship Missile, and SAM + +``` +Naval gun and missile systems overview: + Modern surface combatants integrate medium-caliber naval guns for surface + fire support, close-in weapon systems (CIWS) for terminal defense, vertical + launch systems (VLS) for strike and air defense missiles, and anti-ship + missiles for offensive surface warfare. + +Medium caliber naval gun — 76mm Super Rapid (OTO Melara): + Caliber: 76mm/62 caliber (barrel length 62 × 76mm = 4,712mm) + + Barrel: + Water-cooled jacket: circulated cooling water around chamber + Flow rate: 60-80 L/min + Prevents overheating at sustained rate of fire + Nitrided bore surface for wear resistance + + Dual feed system: + Two ammunition feeds (independent loading paths) + Selectable round type without unloading + Feeds: APFSDS (armor-piercing fin-stabilized discarding sabot) + HE-PFF (high explosive pre-formed fragment) + HE-IR (high explosive infra-red) + DART (driven ammunition reduced time-of-flight, guided) + + Rate of fire: + Standard: 85-120 rounds/min (Super Rapid variant) + Compact: 85 rounds/min + Burst capability: first 3 rounds in <2 seconds + + Below-deck magazine: + Drum-type carousel magazine (76-80 rounds ready) + Automatic hoist/elevator to gun mount + Total magazine capacity: 200-500+ rounds (ship-dependent) + Fully automatic operation (no crew in mount) + + Mount: + Shielded cupola (stealth shaping, reduced RCS) + Elevation: −15° to +85° + Traverse: 360° (unlimited) + Elevation rate: 35°/s + Traverse rate: 60°/s + Weight: ~7,900 kg (without ammunition) + +CIWS — Phalanx (Mk15): + Gun: M61A1 Vulcan 20mm 6-barrel Gatling + Rate of fire: 3,000 or 4,500 rounds/min + Muzzle velocity: 1,100 m/s + Ammunition: APDS (armor-piercing discarding sabot) tungsten penetrators + Magazine: 1,550 rounds (drum below mount) + Dispersion: ~1.5 mil at 1,000 m + + Radar: + Search radar: Ku-band pulse-Doppler + Detection range: 5-10 km (sea-skimming missile) + Track-while-scan: multiple target capability + Track radar: Ku-band monopulse + Lock-on range: 3-5 km + Angular accuracy: <1 mil + Integrated: common antenna (search + track) + + Closed-loop fire control: + Radar tracks both incoming target AND outgoing projectile stream + Computes miss distance + Corrects aim automatically for subsequent rounds + Effective against supersonic sea-skimming missiles + + Kill mechanism: + Direct hit (kinetic kill) preferred + Fragment cloud at close range + Effective range: 500-1,500 m (engagement window) + +VLS — Mk41 Vertical Launch System: + Module: 8-cell module (2 rows of 4) + Baseline VII: Strike-length (7.7 m deep) for Tomahawk + Tactical-length (6.7 m) for SM-2/SM-6 + Self-defense-length (5.3 m) for ESSM (quad-pack) + + Canister: + Each missile sealed in own canister (shipping + launch container) + Canister provides environmental protection + Deluge system for cook-off protection (water spray) + + Hot launch: + Missile motor ignites inside cell + Gas management system (plenum + uptake): + Exhaust gas deflected 180° in plenum at bottom + Vent through uptake to atmosphere + Protects adjacent cells from exhaust impingement + + Cold launch: + Gas generator or steam catapult ejects missile + Motor ignites after clearing ship + Used in some Russian and European VLS (e.g., Sylver A-70) + Reduced thermal load on ship structure + + Ship impact: + Structural integration: deep penetration into hull + Plenum: armored exhaust plenum (separate from magazine) + Weight (8-cell module, empty): ~13,500 kg (strike length) + Weight (fully loaded): ~26,000 kg + Reload at sea: not practical for Mk41 (fixed installation) + + Inventory: + SM-2 (Standard Missile 2): semi-active radar, medium/long range AAW + SM-6: active seeker + semi-active backup, extended range + SM-3: exo-atmospheric ballistic missile defense (hit-to-kill) + ESSM (Evolved Sea Sparrow): quad-pack, short/medium range + Tomahawk: land-attack cruise missile + VL-ASROC: anti-submarine rocket + +Anti-ship missile: + Sea skimming: + Cruise altitude: 2-5 m above sea surface (terminal phase) + Reduced radar horizon: R_horizon ≈ 3.57 × √(h_radar + h_missile) km + At 3 m altitude: horizon ~13 km for ship radar at 15 m height + Subsonic (Mach 0.8-0.95) or supersonic (Mach 2-3) + + Active radar seeker: + Terminal guidance: X-band or Ku-band active radar + Lock-on range: 10-30 km (depending on target RCS) + Home-on-jam capability + Imaging infrared (IIR) secondary seeker on some variants + + Waypoint navigation: + GPS/INS mid-course guidance + Multiple waypoints for evasive routing + Low-level terrain following over land (for coastal targets) + + Terminal maneuvers: + Pop-up: climb to 50-100 m, dive on target (defeat CIWS) + Weave: sinusoidal horizontal pattern (confuse tracking) + Terminal evasive: random jinking in last 2-5 km + + Warhead: + Semi-armor piercing (SAP) with delayed fuze + Penetrate ship hull → detonate inside + Mass: 120-300 kg (depending on missile class) + +SAM — Surface-to-Air Missile: + Semi-active radar homing (SARH): + Ship illuminator (CW transmitter) illuminates target + Missile seeker homes on reflected energy + Continuous wave (CW) for Doppler tracking + Requires ship to maintain illumination until intercept + Examples: SM-2 (with Mk99 fire control illuminator) + + Active radar terminal: + Missile carries own active radar seeker + Mid-course: inertial + data link (ship updates via uplink) + Terminal: active seeker locks on, autonomous terminal phase + Ship can engage multiple targets simultaneously + Examples: SM-6, ESSM Block 2 +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class NavalGunType { Medium_76mm, Medium_127mm, CIWS_Phalanx, CIWS_Goalkeeper, Large_155mm }; +enum class VLS_Launch { Hot_Launch, Cold_Launch, Concentric_Canister }; +enum class MissileType { Anti_Ship_Cruise, SAM_SARH_Long_Range, SAM_Active_Medium, SAM_Short_ESSM, Cruise_Land_Attack }; + +struct NavalGunSpec { + NavalGunType type; + double caliber_mm; + double barrel_length_calibers; + bool water_cooled; + double cooling_water_flow_L_per_min; + int number_of_barrels; // 1 for single, 6 for Gatling + double rate_of_fire_rpm; + std::string dual_feed_types; // "APFSDS + HE-PFF" + double magazine_capacity_rounds; + double muzzle_velocity_mps; + double elevation_min_deg; + double elevation_max_deg; + double traverse_range_deg; + double mount_weight_kg; + bool stealth_cupola; +}; + +struct CIWS_Spec { + bool closed_loop_spotting; + std::string search_radar_band; // "Ku-band" + double search_detection_range_km; + std::string track_radar_band; // "Ku-band monopulse" + double track_lock_range_km; + double angular_accuracy_mils; + double engagement_window_m; + double dispersion_mil_at_1000m; + double magazine_ammo_count; +}; + +struct VLS_Spec { + std::string designation; // "Mk41 Baseline VII", "Sylver A-70" + VLS_Launch launch_type; + int modules_count; // 8-cell modules + int total_cells; + double cell_length_m; // 5.3, 6.7, 7.7 + double cell_cross_section_mm; // typically 635 × 635 mm + std::vector missile_types; // "SM-2", "SM-6", "ESSM", "Tomahawk" + bool quad_pack_capable; // ESSM quad-pack + bool gas_management_plenum; + double module_weight_empty_kg; + double module_weight_loaded_kg; + bool deluge_system; + double reload_time_at_sea_hours; // typically not at-sea reloadable +}; + +struct AntiShipMissileSpec { + std::string designation; // "NSM", "Exocet MM40", "LRASM" + MissileType type; + double length_m; + double diameter_mm; + double launch_mass_kg; + double cruise_speed_mach; + double terminal_speed_mach; + double sea_skim_altitude_m; + double max_range_km; + double warhead_mass_kg; + std::string seeker_type; // "Active radar X-band + IIR" + double seeker_lock_range_km; + bool waypoint_navigation; + bool terminal_popup_maneuver; + std::string midcourse_guidance; // "GPS/INS + terrain reference" +}; + +struct SAM_Spec { + std::string designation; // "SM-6 Dual I", "SM-2 Block IIIB", "ESSM Block 2" + MissileType type; + double length_m; + double diameter_mm; + double launch_mass_kg; + double max_speed_mach; + double max_range_km; + double max_altitude_km; + double min_engagement_range_km; + std::string guidance_phase_midcourse; // "Inertial + data link" + std::string guidance_phase_terminal; // "Active radar", "Semi-active CW" + bool home_on_jam; + bool anti_ballistic_missile_capable; +}; + +struct NavalWeaponsState { + int naval_gun_rounds_fired; + int ciws_rounds_fired; + int vls_missiles_remaining; + bool fire_control_radar_active; + double gun_barrel_temperature_C; + int engagements_completed; +}; + +struct NavalWeaponsPerformance { + double gun_accuracy_mil; + double ciws_kill_probability; + double sam_intercept_probability; + double anti_ship_missile_hit_probability; + double system_response_time_s; + double multi_target_capacity; +}; + +NavalGunSpec design_naval_gun(NavalGunType type, double rate_of_fire_rpm); + +VLS_Spec design_vls(std::string designation, VLS_Launch launch_type, int modules, bool strike_length); + +AntiShipMissileSpec design_anti_ship_missile(double range_km, double speed_mach, double sea_skim_alt_m); + +SAM_Spec design_sam(double max_range_km, double max_altitude_km, std::string terminal_guidance); + +NavalWeaponsState initialize_naval_weapons_state(const NavalGunSpec& gun, const VLS_Spec& vls); + +NavalWeaponsPerformance simulate_naval_engagement(const NavalGunSpec& gun, const CIWS_Spec& ciws, const VLS_Spec& vls, const SAM_Spec& sam, const AntiShipMissileSpec& asm_spec, double threat_range_km, double threat_speed_mach, double threat_altitude_m); + +double calculate_radar_horizon(double h_radar_m, double h_target_m); + +double calculate_ciws_engagement_time(double target_speed_mps, double detection_range_m, double effective_range_m); + +} // namespace vde::defense_weapons +``` + +--- + +### 6. Torpedo & Mine Systems + +**Priority**: P1 + +#### 6.1 Heavyweight Torpedo, Mine, and Mine Countermeasures + +``` +Torpedo systems overview: + Heavyweight torpedoes (533mm diameter) are the primary underwater + weapon for submarines. Lightweight torpedoes (324mm) are used for + surface ship and airborne ASW. + +Heavyweight torpedo — 533mm: + Propulsion — Otto fuel II swashplate engine: + Otto fuel II: monopropellant (hydroxylammonium perchlorate + + diethylene glycol dinitrate + stabilizers) + Decomposition: exothermic, generates hot gas + Swashplate axial piston engine: + Rotating swashplate drives reciprocating pistons + Converts hydraulic/thermal energy → rotary shaft power + Power output: 300-500 kW + + Pump-jet propulsor: + Shrouded rotor (impeller) + stator + Higher efficiency than open propeller at high speed + Reduced cavitation → lower acoustic signature + Speed: 40-55 knots (74-102 km/h) + + Alternative: Electric motor (silver-zinc battery): + AgO-Zn battery: 100-150 kWh, discharge at high rate + Seawater-activated: electrolyte injected on launch + Silent cruise capability (no mechanical engine noise) + + Homing: + Passive acoustic: + Broadband hydrophone array in nose + Detects target radiated noise (machinery, propeller, flow) + Frequency range: 100 Hz - 40 kHz + Bearing resolution: <1° in azimuth + + Active acoustic: + Transmit ping (15-40 kHz), receive echo + Range to target: R = c × Δt / 2 (c ≈ 1,500 m/s in water) + Doppler shift: Δf/f = 2 × v_radial / c + Target classification: by echo structure (hull geometry features) + + Wake homing: + Following ship's wake (turbulent bubbly water) + Wake persists for kilometers behind ship + Difficult to decoy (noise makers don't affect wake) + + Wire guidance: + Fiber optic wire (0.3-0.5 mm diameter, multi-km length) + Bidirectional data: torpedo sensor data → submarine fire control + submarine steering commands → torpedo + Enables operator-in-the-loop target discrimination + Wire break: autonomous homing takes over + + Wire payout: + Twin-dispensing: from submarine AND torpedo (reduces tension) + Payout speed: matched to torpedo + submarine movement + Typical range: 20-60 km (wire length) + +Mine systems: + Bottom influence mine: + Rests on seabed (continental shelf depths < 200 m typically) + Sensor fusion: + Magnetic: fluxgate magnetometer or induction coil + Detects ship's ferromagnetic signature + Range: 200-800 m for large ships + Acoustic: hydrophone (passive listening) + Detects ship propeller/engine noise + Frequency range: 5 Hz - 10 kHz + Range: 1-3 km + Pressure: pressure sensor + Detects Bernoulli pressure reduction under ship hull (Bernoulli hump) + Very short detection range (1-10 m above mine) + Resistant to sweep (hard to simulate) + + Influence detect probability P_D: + P_D = 1 − (1 − P_D_mag) × (1 − P_D_acoustic) × (1 − P_D_pressure) + Target P_D > 0.90 for target ship class + + Explosive charge: + TNT, PBX (polymer-bonded explosive), or Torpex + Mass: 100-1,000 kg TNT equivalent + Detonation: when ship directly overhead (closest point of approach CPA) + + Moored mine: + Buoyancy chamber (float) keeps mine at preset depth + Mooring cable: steel wire rope or synthetic + Depth setting: by cable length from anchor + Contact or influence firing mechanism + + SLMM (Submarine-Launched Mobile Mine): + Torpedo-like vehicle swims to target location + Settles on seabed as bottom mine + Self-deployment: no ship required in minefield area + +MCM — Mine Countermeasures: + Minehunting: + Side-scan sonar: + Towed fish, 100-400 kHz + Bottom coverage: 200-600 m swath width + Resolution: cm-level (mine-like objects MLO detection) + Tow speed: 4-8 knots + + Variable depth sonar (VDS): + Hull-mounted or towed, 15-50 kHz + Depth adjustable to thermocline for sound channel exploitation + Classification: shadow analysis, highlight analysis + + ROV mine disposal: + Remotely operated vehicle (ROV) + Approaches identified mine + Places explosive charge (mine demolition charge) + Or: cutter mechanism (severing mooring cable of moored mine) + Camera + sonar for terminal homing + Fiber optic tether for control + + Minesweeping: + Influence sweep: + Magnetic: energized cable loop (creates ship-like magnetic field) + Open-loop: long cable between two sweep vessels + Closed-loop: towed loop behind single vessel + Acoustic: towed acoustic generator (LF broadband noise or ship-emulated) + + Mechanical sweep: + Oropesa float + wire sweep with cutters + Cuts mooring cables of moored mines + Mine floats to surface → destroyed by gunfire + Sweep width: 200-400 m per side +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class TorpedoType { Heavyweight_533mm, Lightweight_324mm, Supercavitating }; +enum class PropulsionType { Otto_Fuel_II_Swashplate, Electric_AgZn_Battery, Thermal_Gas_Turbine }; +enum class HomingMode { Passive_Acoustic_Broadband, Active_Acoustic_Ping, Wake_Homing, Fiber_Optic_Wire_Guided }; +enum class MineType { Bottom_Influence, Moored_Contact, Moored_Influence, SLMM_Mobile, Rising }; +enum class MCM_Method { Minehunting_Sonar_ROV, Magnetic_Sweep, Acoustic_Sweep, Mechanical_Sweep, Combined_Influence }; + +struct TorpedoPropulsionSpec { + PropulsionType type; + double power_kW; + double max_speed_knots; + double cruise_speed_knots; + double max_range_at_cruise_km; + double endurance_at_max_speed_minutes; + std::string fuel_type; // "Otto Fuel II", "AgO-Zn battery" + double fuel_energy_density_MJ_per_kg; + bool pump_jet_propulsor; + double acoustic_signature_dB_ref_1uPa_at_1m; +}; + +struct TorpedoHomingSpec { + bool passive_broadband; + double passive_freq_range_min_Hz; + double passive_freq_range_max_Hz; + double passive_detection_range_km; + bool active_ping; + double active_freq_kHz; + double active_max_range_km; + bool wake_homing; + bool fiber_optic_wire_guided; + double wire_length_km; + double wire_data_rate_kbps; + double acquisition_range_km; + double bearing_resolution_deg; +}; + +struct TorpedoSpec { + std::string designation; // "Mk48 CBASS", "DM2A4 SeaHake", "F21 Artemis" + TorpedoType type; + double diameter_mm; // 533 or 324 + double length_m; + double mass_kg; + double warhead_mass_kg_TNT_eq; + std::string warhead_type; // "PBX shaped charge", "Torpex" + TorpedoPropulsionSpec propulsion; + TorpedoHomingSpec homing; + double max_depth_m; + double min_depth_m; + bool counter_countermeasure_capable; + double target_acquisition_range_km; +}; + +struct MineSpec { + std::string designation; // "Mk67 SLMM", "Stonefish", "PMK-2" + MineType type; + double mass_kg; + double explosive_mass_kg_TNT_eq; + double operating_depth_min_m; + double operating_depth_max_m; + bool magnetic_sensor; + double magnetic_detection_range_m; + double magnetic_threshold_nT; + bool acoustic_sensor; + double acoustic_freq_range_min_Hz; + double acoustic_freq_range_max_Hz; + double acoustic_detection_range_m; + bool pressure_sensor; + double pressure_threshold_Pa; + double target_detection_probability_P_D; + int ship_count_setting; // fire after N ships pass + int lifetime_days; + bool self_destruct; + bool remote_deactivation; +}; + +struct MCM_Spec { + std::string platform; // "Minehunter vessel", "MCM USV", "MCM helicopter" + MCM_Method method; + bool side_scan_sonar; + double sonar_freq_kHz; + double sonar_swath_width_m; + double sonar_resolution_cm; + bool vds_sonar; + bool rov_mine_disposal; + double magnetic_sweep_field_nT; + double acoustic_sweep_source_level_dB; + double mechanical_sweep_width_m; + double sweep_speed_knots; + double area_clearance_rate_km2_per_day; +}; + +struct UnderwaterWarfareState { + int torpedoes_remaining; + bool wire_guidance_active; + double wire_payout_length_km; + HomingMode current_homing_mode; + double target_range_km; + double target_speed_knots; + bool mine_detected; + double mine_range_m; + int mine_counter; +}; + +struct UnderwaterWarfarePerformance { + double torpedo_hit_probability; + double mine_detect_probability; + double mine_classification_probability; + double mine_neutralization_probability; + double area_cleared_km2; + double sweep_effectiveness_pct; +}; + +TorpedoSpec design_torpedo(TorpedoType type, PropulsionType propulsion, double range_km, double speed_knots); + +MineSpec design_mine(MineType type, double explosive_mass_kg, double operating_depth_m); + +MCM_Spec design_mcm(double area_clearance_rate, MCM_Method primary_method); + +UnderwaterWarfareState initialize_underwater_warfare_state(const TorpedoSpec& torp, int inventory); + +UnderwaterWarfarePerformance simulate_torpedo_engagement(const TorpedoSpec& torp, UnderwaterWarfareState& state, double target_range_km, double target_speed_knots, double target_depth_m, double water_depth_m); + +UnderwaterWarfarePerformance simulate_minefield(double field_width_km, double field_length_km, int mine_count, const MineSpec& mine, const MCM_Spec& mcm); + +double calculate_acoustic_transmission_loss(double range_km, double freq_kHz, double depth_m, double bottom_type); + +double calculate_magnetic_anomaly(double ship_magnetic_moment, double range_m, double depth_m); + +} // namespace vde::defense_weapons +``` + +--- + +### 7. Submarine Design + +**Priority**: P1 + +#### 7.1 Pressure Hull, Propulsion, Anechoic Tile, and Sonar + +``` +Submarine pressure hull design: + The pressure hull is a ring-stiffened cylindrical structure that must + withstand hydrostatic pressure at design depth while minimizing weight. + + Material options: + HY-100 (US Navy): + Yield strength σ_y = 690 MPa (100 ksi) + Weldable, good toughness at low temperature + Used in: Seawolf class, Virginia class + + HY-130: + Yield strength σ_y = 896 MPa (130 ksi) + Higher strength → thinner hull → lighter + More challenging weldability + + Titanium alloy Ti-6Al-4V: + Yield strength σ_y = 830 MPa + Density: 4.43 g/cm³ (vs. 7.85 for steel → 44% lighter) + Non-magnetic (advantage for magnetic anomaly detection avoidance) + Excellent corrosion resistance + Used in: Soviet/Russian Sierra, Alfa classes + Cost: 5-10× steel + + Ring-stiffened cylinder buckling: + Inter-frame collapse pressure P_c [MPa]: + P_c_interframe = η × E × (t/R)² × f(l, t, R, ν) + Where: + η = plasticity reduction factor (accounts for inelastic buckling) + E = Young's modulus (200 GPa for steel) + t = shell thickness [mm] + R = mean radius [mm] + l = frame spacing [mm] + ν = Poisson's ratio (0.3 for steel) + + Frame design: + Tee-bar or I-beam ring stiffeners + Frame spacing l: typically 0.5-1.0 m + Frame dimensions: web height h_w, flange width b_f + Frame moment of inertia I_frame [mm⁴] + + Overall collapse (frame + shell between frames): + Von Mises yield criterion at design depth + P_overall = f(P_c_interframe, σ_y_frame, geometry) + + Depths: + Design depth (normal operating limit): + D_design [m] + Hydrostatic pressure: P = ρ × g × h = 0.0101 MPa/m depth + + Test depth (sea trials verification): + D_test = 1.25 × D_design (typically) + Safety factor on design depth + + Crush depth (ultimate failure): + D_crush ≈ 1.5-2.0 × D_design (estimated, never intentionally tested) + Uncertainty due to: fabrication tolerances, residual stress, + initial imperfections, material variability + +Propulsion systems: + 7-blade skewback propeller: + Skew angle: 30-50° (reduces blade-rate tonal noise) + Diameter: 4-7 m (submarine size dependent) + Material: nickel-aluminum-bronze (NAB) or manganese-bronze + Pitch: controllable or fixed + + Pump-jet propulsor: + Shrouded rotor + stator duct + Rotor: multi-blade rotating element + Stator: fixed guide vanes (straighten flow, recover swirl energy) + Shroud: duct surrounding rotor/stator + Benefits: + Higher efficiency at high speed + Reduced cavitation (shroud increases static pressure) + Lower radiated noise at blade-rate frequencies + Used in: Virginia class, Astute class, Barracuda class + + Permanent magnet motor (PMM): + Direct-drive (no reduction gear → eliminates gear noise) + Rotor: permanent magnets (NdFeB) + Stator: wound coils + Power density: 2-3 kW/kg + Efficiency: >95% + + Diesel-electric: + Diesel generators (MTU 16V 396, 12V 4000 series) + Battery: lead-acid (traditional) or lithium-ion (modern) + Snorkel depth: ~10-15 m (periscope depth) + Indiscretion ratio: time on surface or snorkeling / total patrol time + + AIP — Air-Independent Propulsion: + PEM fuel cell + LOX: + H₂ + ½O₂ → H₂O + electricity + Hydrogen stored in metal hydride cylinders + LOX (liquid oxygen) stored in cryogenic tanks + Silent operation, only byproduct is water + Power: 120-300 kW + Used in: Type 212A, Type 214, Type 218SG + + Stirling engine: + External combustion, closed-cycle + LOX + diesel fuel combustion + Working gas: helium + Power: 75-150 kW per module + Used in: Gotland class, Sōryū class (earlier), A26 Blekinge + + MESMA (Module d'Energie Sous-Marine Autonome): + Closed-cycle steam turbine (ethanol + LOX) + Higher power (200-400 kW) but higher noise + Used in: Scorpène class (optional) + +Anechoic tile: + Material: butyl rubber with voided inclusions + Voids: air-filled cavities (various sizes for broadband) + Absorption mechanism: viscous losses in rubber matrix + + cavity resonance + Thickness: 50-100 mm (depending on frequency range) + + Acoustic performance: + Insertion loss IL [dB]: + IL = 10 × log₁₀(I_incident / I_transmitted) + Target IL: 10-20 dB in 1-10 kHz range (active sonar frequencies) + + Echo reduction ER [dB]: + ER = 10 × log₁₀(E_target_without_tile / E_target_with_tile) + Reduces target strength for active sonar detection + + Application: + Bonded to pressure hull exterior + Must withstand hydrostatic pressure cycling (0 → max depth → 0) + Must not debond (adhesion critical) + Replacement: drydock maintenance, every 5-10 years + +Sonar systems: + Bow spherical array: + Spherical (or conformal) hydrophone array in bow + Diameter: 3-5 m (submarine size dependent) + Element count: 500-2,000 individual hydrophones + Frequency range: 500 Hz - 10 kHz + Modes: active (transmit + receive) and passive (receive only) + Beamforming: electronic (no mechanical rotation) + Multiple simultaneous beams (tens to hundreds) + Angular resolution: <1° at mid-frequencies + Target range (passive): tens of km (convergence zone dependent) + Target range (active): 10-30 km (direct path) + + Flank array: + Large aperture hydrophone arrays on hull sides + Length: 10-30 m per side + Passive only (no transmit capability) + Very high directivity at low frequencies (large aperture / λ) + Frequency range: 10 Hz - 2 kHz + Detection range: convergence zone (CZ) 50-80 km (deep water) + + Towed array: + Thin-line array (TB-29, TB-34 SURTASS): + Hydrophone sections in neutrally buoyant hose + Tow cable: 1-2 km for submarine, up to 5 km for surface + Array length: 200-800 m (acoustic aperture) + Frequency range: 5 Hz - 1 kHz + Depth: below layer depth for CZ exploitation + Types: + TB-29: thin-line, submarine-towed + TB-34: SURTASS (surveillance towed array sensor system) + Twin-line: two parallel arrays for port/starboard ambiguity resolution + + Sonar equation (passive): + Signal excess SE [dB]: + SE = SL − TL − (NL − DI) − DT + Where: + SL = source level of target [dB re 1 μPa @ 1m] + TL = transmission loss [dB] + NL = ambient noise level [dB] + DI = directivity index of receiving array [dB] + DT = detection threshold [dB] (typically 10-15 dB) + + Detection when SE > 0 dB +``` + +#### 7.2 Proposed API + +```cpp +namespace vde::defense_weapons { + +enum class HullMaterial { HY_100, HY_130, HY_80, Titanium_Ti6Al4V, Composite_CFRP }; +enum class PropulsionType_Sub { Diesel_Electric, AIP_PEM_FuelCell, AIP_Stirling, Nuclear_PWR, PMM_DirectDrive }; +enum class SonarArrayType { Bow_Spherical, Flank_Array, Towed_ThinLine_TB29, Towed_SURTASS, Conformal }; + +struct PressureHullSpec { + HullMaterial material; + double yield_strength_MPa; + double shell_thickness_mm; + double mean_radius_mm; + double frame_spacing_mm; + std::string frame_type; // "Tee-bar", "I-beam" + double frame_web_height_mm; + double frame_flange_width_mm; + double design_depth_m; + double test_depth_m; // 1.25 × design depth + double crush_depth_m; // estimated + double interframe_collapse_pressure_MPa; + double buckling_safety_factor; + double hull_mass_tonnes; + double overall_length_m; + double beam_m; + double displacement_submerged_tonnes; +}; + +struct PropulsionSpec_Sub { + PropulsionType_Sub type; + double shaft_power_kW; + double max_speed_submerged_knots; + double cruise_speed_knots; + double max_range_at_cruise_nm; + double battery_capacity_kWh; + std::string battery_type; // "Lead-acid", "Li-ion", "AgO-Zn" + bool pump_jet_propulsor; + double propeller_blade_count; + double propeller_diameter_m; + double skew_angle_deg; + bool aip_installed; + double aip_power_kW; // for AIP + double aip_endurance_days; + double indiscretion_ratio_pct; // snorkel time / patrol time + double acoustic_signature_broadband_dB; +}; + +struct AnechoicTileSpec { + std::string material; // "Butyl rubber with air voids" + double thickness_mm; + double insertion_loss_dB_at_5kHz; + double insertion_loss_dB_at_10kHz; + double echo_reduction_dB; + double areal_density_kg_per_m2; + double adhesion_strength_MPa; + double service_life_years; + double max_depth_rating_m; +}; + +struct SonarSpec { + bool bow_spherical_array; + double bow_array_diameter_m; + int bow_elements; + double bow_freq_min_Hz; + double bow_freq_max_Hz; + double bow_active_source_level_dB; + bool active_transmit_capability; + + bool flank_array; + double flank_array_length_m; + double flank_freq_min_Hz; + double flank_freq_max_Hz; + double flank_directivity_index_dB; + + bool towed_array; + std::string towed_array_type; // "TB-29 thin-line", "TB-34 SURTASS" + double towed_array_length_m; + double towed_cable_length_m; + double towed_freq_min_Hz; + double towed_freq_max_Hz; + double towed_directivity_index_dB; + + double signal_processing_gain_dB; + double detection_threshold_dB; + bool automated_target_classification; +}; + +struct SubSpec { + std::string designation; // "Virginia class", "Type 212CD", "Barracuda" + std::string classification; // "SSN", "SSK", "SSBN", "SSGN" + PressureHullSpec hull; + PropulsionSpec_Sub propulsion; + AnechoicTileSpec anechoic; + SonarSpec sonar; + double displacement_surface_tonnes; + double displacement_submerged_tonnes; + double max_depth_m; + double test_depth_m; + int crew; + int torpedo_tubes; + int torpedo_inventory; + bool vls_installed; // VLS tubes for cruise missiles + int vls_tubes; + double patrol_endurance_days; +}; + +struct SubState { + double current_depth_m; + double current_speed_knots; + double battery_state_of_charge_pct; + double aip_endurance_remaining_hours; + double hull_cycles; // depth cycles accumulated + double cumulative_operating_hours; + bool snorkeling; + bool sonar_active; + double self_noise_level_dB; + double ambient_noise_level_dB; +}; + +struct SubPerformance { + double max_depth_operational_m; + double radiated_noise_broadband_dB; + double radiated_noise_tonal_dB; + double passive_detection_range_km; + double active_detection_range_km; + double patrol_endurance_days; + double indiscretion_ratio_pct; + double target_strength_dB; // own submarine + double hull_fatigue_life_remaining_pct; +}; + +SubSpec design_submarine(std::string designation, HullMaterial material, PropulsionType_Sub propulsion, double displacement_tonnes, double design_depth_m); + +SubState initialize_sub_state(const SubSpec& spec); + +SubPerformance simulate_submarine_patrol(const SubSpec& spec, SubState& state, double patrol_days, double avg_speed_knots, double water_depth_m, double sea_state); + +double calculate_pressure_hull_buckling(double t_mm, double R_mm, double l_frame_mm, double sigma_y_MPa, double E_GPa); + +double calculate_hydrostatic_pressure(double depth_m); + +double calculate_passive_sonar_range(double SL_target_dB, double TL_per_km_dB, double NL_dB, double DI_dB, double DT_dB); + +double calculate_target_strength(double submarine_length_m, double diameter_m, double freq_kHz, double aspect_angle_deg); + +} // namespace vde::defense_weapons +``` + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Primary Types | +|-----------|--------|---------------| +| `vde::defense_weapons` | `vde/defense_weapons/firearms_ammo.h` | `FirearmSpec`, `FirearmState`, `FirearmPerformance`, `BarrelSpec`, `ActionSpec`, `TriggerSpec`, `AmmoSpec`, `BallisticsSpec`, `TerminalBallisticsSpec`, `BulletSpec`, `PropellantSpec`, `PrimerSpec` | +| `vde::defense_weapons` | `vde/defense_weapons/armored_vehicles.h` | `ArmorSpec`, `ArmorState`, `ArmorPerformance`, `HullSpec`, `CompositeArmorSpec`, `ERA_Spec`, `APS_Spec`, `SuspensionSpec`, `PowerpackSpec`, `NBC_Spec`, `ArtillerySpec`, `ArtilleryState`, `ArtilleryPerformance`, `BarrelAssemblySpec`, `BreechSpec`, `RecoilSpec`, `FireControlSpec`, `AutoLoaderSpec` | +| `vde::defense_weapons` | `vde/defense_weapons/naval_weapons.h` | `NavalGunSpec`, `CIWS_Spec`, `VLS_Spec`, `AntiShipMissileSpec`, `SAM_Spec`, `NavalWeaponsState`, `NavalWeaponsPerformance`, `TorpedoSpec`, `TorpedoPropulsionSpec`, `TorpedoHomingSpec`, `MineSpec`, `MCM_Spec`, `UnderwaterWarfareState`, `UnderwaterWarfarePerformance`, `SubSpec`, `PressureHullSpec`, `PropulsionSpec_Sub`, `AnechoicTileSpec`, `SonarSpec`, `SubState`, `SubPerformance` | + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|---|---|---| +| SAAMI Z299.1-2018 | Voluntary Industry Performance Standards for Pressure and Velocity of Centerfire Rifle Sporting Ammunition | Small arms chamber pressure MAP specifications | +| CIP (Permanent International Commission) | PMAX standards for ammunition proof | European ammunition pressure standards | +| MIL-DTL-12560 | Armor Plate, Steel, Wrought, Homogeneous (for use in combat-vehicles and for ammunition testing) | RHA steel for armored vehicles | +| STANAG 4569 | Protection Levels for Occupants of Logistic and Light Armoured Vehicles | Vehicle protection level standards | +| NATO AEP-55 Vol 1-3 | Procedures for Evaluating the Protection Level of Armoured Vehicles | Ballistic and mine blast testing procedures | +| MIL-STD-810 | Environmental Engineering Considerations and Laboratory Tests | Environmental qualification of military equipment | +| ITAR (22 CFR Parts 120-130) | International Traffic in Arms Regulations | Export control for defense articles | +| MIL-STD-882 | System Safety | Safety requirements for weapon systems | +| NATO STANAG 4383 | Minimum Standards for Ammunition Interchangeability | Small arms ammunition compatibility | +| CIP/SAAMI | Proof testing of firearm barrels and actions | Barrel/action proof pressure verification | +| MIL-PRF-71196 | Cartridge, 5.56mm, Ball, M855A1 | Enhanced performance round specification | +| MIL-DTL-24496 | Recoil Mechanisms for Naval Guns | Naval gun recoil system design | +| MIL-STD-2105 | Hazard Assessment Tests for Non-Nuclear Munitions | Insensitive munitions compliance | +| ABYC H-40 | Anchoring, Mooring, and Strong Points | Guidance for naval anchoring/mooring (reference for mine mooring) | +| STANAG 2897 | Guide Specification for Ammunition Data Exchange | NATO ammunition data encoding | +| MIL-STD-1472 | Human Engineering Design Criteria | Ergonomic weapon system design | +| GB 50263-2010 | Specification for Engineering Acceptance of Fire Extinguishing System | Reference standard for fire suppression (referenced for NBC) | +| JP 1-02 | Department of Defense Dictionary of Military and Associated Terms | Common defense terminology | +| MIL-STD-1553 | Digital Time Division Command/Response Multiplex Data Bus | Avionics data bus for fire control integration | +| STANAG 4568 | Naval Guns — Integration | Naval gun ship integration standard | +| MIL-S-901 | Shock Tests, H.I. (High-Impact) Shipboard Machinery, Equipment and Systems | Shock qualification of shipboard equipment | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| Assault Rifle | Heckler & Koch | HK416A5 / HK416A7 | 5.56×45mm, short-stroke piston, CHF barrel 1:7 twist, >20,000 round barrel life | +| Assault Rifle | Colt / CZ | M4A1 / M16A4 | 5.56×45mm, direct impingement, MIL-B-11595E barrel, M4 14.5", M16 20" | +| Battle Rifle | FN Herstal | SCAR-H (Mk17) | 7.62×51mm, short-stroke piston, adjustable gas, chrome-lined CHF | +| Submachine Gun | Heckler & Koch | MP5 / MP7A1 | 9×19mm roller-delayed / 4.6×30mm gas piston, high controllability | +| Sniper Rifle | Accuracy International | AW / L115A3 / AXMC | .338 Lapua Magnum, cold-hammer-forged barrel, 0.5 MOA accuracy guarantee | +| Anti-Materiel Rifle | Barrett | M82A1 / M107 | .50 BMG (12.7×99mm), semi-automatic, recoil-operated, 10-round magazine | +| Handgun | Glock | G17 / G19 / G17 Gen5 | 9×19mm, polymer frame, Safe Action trigger, 17-round double-stack | +| Handgun | SIG Sauer | P320 / M17 MHS / P226 | 9×19mm, modular chassis system, striker-fired | +| Medium Machine Gun | FN Herstal | FN MAG / M240 | 7.62×51mm, gas-operated, open-bolt, belt-fed, quick-change barrel | +| General Purpose MG | Rheinmetall | MG3 / MG5 (HK121) | 7.62×51mm, MG3 recoil-operated roller-locked, MG5 gas-operated | +| 120mm Smoothbore | Rheinmetall | L/44 / L/55 Rh120 | 120mm smoothbore, autofrettaged, chrome-plated bore, APFSDS 1,750 m/s | +| 155mm Howitzer | BAE Systems Land | M777A2 | Towed 155mm L/39, titanium structure, 4,200 kg, digital fire control | +| 155mm SPH | KMW | PzH 2000 | Self-propelled 155mm L/52, 60 rounds, autoloader, 10 rpm, MRSI capability | +| 155mm SPH | Nexter | CAESAR 6×6 / 8×8 | Truck-mounted 155mm L/52, 18 rounds ready, shoot-and-scoot < 2 min | +| MBT | KMW | Leopard 2A7 / 2A8 | 120mm L/55, composite + wedge armor, 1,500 hp MTU MB 873, APS integration | +| MBT | GDLS | M1A2 SEPv3 / SEPv4 Abrams | 120mm M256 (L/44), DU composite armor, AGT1500 turbine 1,500 hp, Trophy APS | +| IFV | KMW / Rheinmetall | Puma IFV | 30mm MK30-2/ABM, modular composite armor, ERA, MUSS soft-kill, 1,088 hp MTU | +| IFV | BAE Systems Hägglunds | CV90 MkIV | 35/50mm Bushmaster, modular armor, active damping suspension, D-Series turret | +| MRAP | Oshkosh / GDLS | M-ATV / JLTV | V-shaped hull, energy absorbing seats, scalable armor, STANAG 4569 Level 3+ | +| Wheeled AFV | Patria | AMV XP 8×8 | Modular armor, STANAG 4569 Level 4+ ballistic, Level 4a/b mine | +| UGV | Milrem | THeMIS | Modular unmanned ground vehicle, hybrid diesel-electric, up to 1,200 kg payload | +| Active Protection | Rafael | Trophy APS (HV/LV) | Hard-kill, Ka-band radar, MEFP interceptor, P_kill > 0.95 demonstrated | +| Active Protection | IMI Systems / Elbit | Iron Fist | Hard-kill, optical + radar sensor, blast interceptor, trainable launcher | +| Naval Gun 76mm | OTO Melara / Leonardo | 76/62 Super Rapid | 120 rpm, dual feed, water-cooled, DART guided ammunition compatible | +| CIWS | Raytheon | Phalanx Block 1B | 20mm M61A1, 4,500 rpm, Ku-band closed-loop, IR camera, anti-surface mode | +| VLS | Lockheed Martin | Mk41 Baseline VII | 8-cell module, hot launch, strike-length, SM-2/SM-6/Tomahawk/ESSM quad-pack | +| Anti-Ship Missile | Kongsberg | NSM (Naval Strike Missile) | Subsonic, sea-skimming, IIR terminal seeker, autonomous target recognition, >185 km | +| SAM | Raytheon | SM-6 Dual I (RIM-174) | Active radar terminal seeker, >240 km range, anti-surface capability, over-the-horizon | +| Heavyweight Torpedo | Raytheon | Mk48 Mod7 CBASS | 533mm, Otto fuel II, pump-jet, wire-guided + broadband acoustic, 55+ knots | +| Heavyweight Torpedo | Atlas Elektronik | DM2A4 SeaHake | 533mm, electric (AgO-Zn battery), fiber optic wire, wake + active/passive acoustic | +| Lightweight Torpedo | SAAB | Lightweight Torpedo (SLWT) | 400mm, electric propulsion, active/passive homing, helicopter/ship/aircraft launch | +| Bottom Mine | BAE Systems | Stonefish | Influence mine, magnetic+acoustic+pressure, 600 kg TNT, programmable ship count | +| Minehunting | Thales | Minehunting sonar + CAPTAS-4 | VDS sonar, 1-5 kHz, multi-static capable, ROV integration | +| Submarine SSN | HII / GD Electric Boat | Virginia class Block V | 7,800 tons submerged, S9G PWR reactor, pump-jet, 12 VLS VPM tubes | +| Submarine SSK | TKMS | Type 212CD / Type 214 / 218SG | PEM fuel cell AIP, PMM propulsion, non-magnetic steel hull, extreme low signature | +| Submarine SSK | Saab Kockums | A26 Blekinge | Stirling AIP, multi-mission flexible payload, modular design, >18,000 nm range | +| Submarine | Naval Group | Barracuda / Suffren class | SSN, hybrid diesel-electric + turbine, pump-jet, SYCOBS combat system | +| Submarine Torpedo | Naval Group | F21 Artemis | 533mm heavy torpedo, AgO-Al battery, fiber optic wire, advanced signal processing | + +--- + +## Acceptance Criteria + +1. **Small Arms Design (必选):** Engine shall design firearm barrels using CHF/button/cut methods with configurable twist rate (1:7-1:12 in), SAAMI/CIP chamber specifications, and muzzle device type. Bolt thrust (F_thrust = P_chamber × A_case_head_internal) and lug shear stress shall be computed with safety factor > 2.0. Trigger mechanism (single-stage/two-stage) with sear engagement, disconnector timing, and safety interlocks shall be modeled. Magazine feed reliability via cartridge presentation angle and spring force (full to empty) shall be analyzed. Barrel life estimate > 10,000 rounds for CHF chrome-lined construction. + +2. **Ammunition Engineering (必选):** Engine shall design complete cartridge assemblies including cartridge case (brass Cu70Zn30 deep drawing, water capacity), bullet (FMJ gilding metal Cu90Zn10, steel core AP, frangible), propellant (single-base NC, double-base NG, 7-hole multi-perforated grain geometry, Vieille's law burn rate r = β × P^n), and primer (lead styphnate/DDNP composition with Ba(NO₃)₂ oxidizer). Internal ballistics (piezoelectric SAAMI MAP/proof pressure 125%+, pressure-time curve), external ballistics (G1/G7 BC drag models, Doppler radar validated), and terminal ballistics (10% ordnance gelatin, FBI protocol 12"+ penetration) shall be computed. + +3. **Artillery & Gun Systems (必选):** Engine shall design artillery barrels using autofrettage hydraulic process (Bessler method, residual compressive stress field, OSR 0.5-0.7) and multi-layer shrink-fit jacket. Recoil system (hydro-pneumatic recuperator nitrogen fill, variable orifice throttling for constant force, recuperator energy efficiency >95%) shall be modeled. Fire control system (eye-safe 1.54μm laser rangefinder, full met message ballistic computer with Coriolis correction, muzzle velocity Doppler radar, GPS/INS laying) shall be simulated. Autoloader (carousel or bustle type) with cycle time and rate of fire shall be validated. Muzzle velocity dispersion < 1% SD. + +4. **Armored Vehicle Design (必选):** Engine shall design hull/turret with RHA (MIL-DTL-12560 Class 3), multi-layer composite armor (ceramic + UHMWPE + air gap + backing, mass efficiency E_m ≥ 1.5), ERA (flyer plate + insensitive HE sandwich, residual penetration reduction >50%), and APS (hard-kill Ka-band radar + MEFP interceptor, P_kill > 0.90; soft-kill LWR + multispectral smoke). Mine blast protection (V-shaped hull deflector 30-45°, D-Strut energy absorbing seats DRI < 17.7, floating floor, aramid spall liner). STANAG 4569 Level 6 protection against 30mm APFSDS at 500m shall be verified. Powerpack (diesel MTU 883 / turbine AGT1500), hydropneumatic suspension IASU, and NBC collective overpressure filtration shall be modeled. + +5. **Naval Gun & Missile Systems (必选):** Engine shall design medium caliber naval guns (76mm OTO Melara, water-cooled barrel, dual feed APFSDS+HE, autoloader below-deck magazine), CIWS (Phalanx 20mm Gatling, Ku-band search+track radar, closed-loop spotting), VLS (Mk41 8-cell module, hot launch gas management plenum+uptake, cold launch option), anti-ship missiles (sea skimming 2-5m, active radar terminal seeker, waypoint navigation, terminal pop-up maneuver), and SAM (SARH CW illumination + active seeker terminal). Ship integration and multi-threat engagement capability shall be verified. + +6. **Torpedo & Mine Systems (必选):** Engine shall design heavyweight torpedoes (533mm, Otto fuel II swashplate engine with pump-jet, acoustic homing passive broadband/active, fiber optic wire guidance), mines (bottom influence mine with magnetic+acoustic+pressure sensor fusion, P_D > 0.90; moored mine; SLMM), and MCM (minehunting side-scan+VDS sonar, ROV mine disposal vehicle, magnetic/acoustic/mechanical sweep). Torpedo homing acquisition range > 2 km and mine target detection probability > 0.9 shall be validated. + +7. **Submarine Design (必选):** Engine shall design pressure hull (HY-100/HY-130 steel or Ti-6Al-4V titanium, ring-stiffened cylinder buckling analysis, interframe collapse pressure, design depth → test depth 1.25× → crush depth 1.5-2×), propulsion (7-blade skewback propeller, pump-jet shrouded rotor+stator, PMM direct-drive, diesel-electric + AIP PEM fuel cell+LOX / Stirling), anechoic tiles (butyl rubber voided absorption, 50-100mm, insertion loss 10-20 dB), and sonar (bow spherical array, flank array, towed thin-line TB-29/TB-34). Safe dive test at 1.25× design depth shall be verified by buckling analysis. + +8. **Unit Consistency (必选):** All functions shall accept and return SI-derived units with defense conventions (pressure in psi/MPa/bar, velocity in m/s or knots, range in m/km/nm, mass in kg/g/grains, energy in J, power in kW, depth in m, frequency in Hz/kHz, acoustic in dB re 1μPa@1m, angle in degrees/mils). Ballistic units: caliber in mm, twist in inches/revolution, BC in lb/in², chamber pressure in psi/bar. Naval units: range in km/nm, depth in m, speed in knots, displacement in tonnes. ITAR/export control classification tags shall be applied to all export-controlled weapon specifications. + diff --git a/docs/feedback/VDE-1149.md b/docs/feedback/VDE-1149.md new file mode 100644 index 000000000..228c857ed --- /dev/null +++ b/docs/feedback/VDE-1149.md @@ -0,0 +1,2273 @@ +# VDE-1149: Space Launch Systems Engine Requirements (航天发射系统引擎需求) + +**Date**: 2026-08-09 +**Source**: ViewDesign SpaceLaunchEngine — launch vehicle structure, liquid rocket engine, solid rocket motor, GNC avionics & flight software, payload & fairing, AIT assembly integration test, launch site & ground support, recovery & reuse +**Module**: `vde/space_launch/launch_vehicle.h`, `vde/space_launch/integration_test.h`, `vde/space_launch/payload_fairing.h` +**Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Domain-specific engineering modules belong in ViewDesign application layer. Triaged 2026-08-09 cron.) +**Priority**: P1 +**Category**: Space Launch / Launch Vehicle / Rocket Engine / Payload / Launch Site + +--- + +## Background + +Space launch systems represent the pinnacle of aerospace engineering, integrating advanced propulsion, lightweight structures, precision guidance, and rigorous integration and test processes. The global launch vehicle market has transformed dramatically from government-dominated programs to a competitive commercial landscape driven by reusable launch technology, constellation deployment, and deep space exploration ambitions. + +Launch vehicle structure design involves the optimization of propellant tanks using advanced aluminum-lithium alloys (Al-Li 2195/2219) with isogrid/orthogrid machining patterns that simultaneously provide stiffening and reduce mass. Friction stir welding (FSW) has replaced traditional fusion welding for longitudinal and circumferential tank welds, producing superior joint efficiency (>0.95) with minimal heat-affected zone defects. Common bulkhead designs with Y-ring interfaces separate cryogenic propellants while minimizing intertank mass. Tank pressurization systems using cold helium spheres with heat exchangers maintain structural stability during flight, while POGO accumulators damp combustion-instability-driven longitudinal oscillations. + +Liquid rocket engine (LRE) design encompasses the thrust chamber assembly with regenerative cooling circuits where fuel (typically hydrogen) flows through milled channels in a copper-silver-zirconium (Cu-Ag-Zr) alloy liner before injection. Nozzle extensions use radiatively cooled carbon-carbon (C-C) composites for upper stages to save mass. Injector designs span coaxial shear elements, impinging doublet/triplet patterns, and pintle injectors (TRW design heritage). Turbopump assemblies combine axial inducers with centrifugal impellers on hydrostatic or angular-contact ball bearings operating in cryogenic fluids. Engine cycles range from simple gas generator (3-5% flow tapped to drive turbine, dumped overboard) through oxygen-rich staged combustion (all oxidizer + partial fuel in preburner, driving turbine at high pressure) to full-flow staged combustion (separate oxidizer-rich and fuel-rich preburners driving independent turbopumps). Ignition systems use pyrophoric TEA-TEB (triethylaluminum-triethylborane) hypergolic fluids, torch igniters with spark plugs and gaseous O₂/H₂, or solid propellant cartridges. Thrust vector control employs hydraulic gimbal actuators or electromechanical actuators (EMA). + +Solid rocket motors (SRM) use carbon-fiber filament-wound cases with EPDM rubber internal insulation. Propellant grain geometries (center-perforated, star, wagon wheel, finocyl, end-burning) control the thrust-time profile through progressive, neutral, or regressive burn surface evolution. Nozzles employ carbon-carbon throat inserts and carbon-phenolic ablative liners with flex-seal bearings for omniaxis thrust vector control. + +Guidance, navigation, and control (GNC) systems integrate ring laser gyro (RLG), fiber optic gyro (FOG), or hemispherical resonator gyro (HRG) inertial measurement units with quartz flex accelerometers. Multi-constellation GNSS (GPS+GLONASS+BeiDou) provides precision navigation with RAIM integrity monitoring. Atmospheric guidance uses gravity turn steering, while exo-atmospheric guidance employs powered explicit guidance (PEG) or iterative guidance mode (IGM) algorithms. Control systems use gain-scheduled PID controllers with bending filters (notch) and slosh baffle compensation. Flight termination systems (FTS) implement autonomous destruct criteria (thrust/attitude/position violations) with command destruct capability for range safety officers. + +Payload fairings use aluminum honeycomb core with CFRP facesheet sandwich construction, incorporating acoustic protection blankets (MLI + foam) for sound absorption. Payload separation systems use Marman clamp bands (ESA 1194/937 standards, 15-60"), pyrotechnic bolts, and frangible nuts, with separation tip-off rates controlled to <5°/s. + +Assembly, Integration, and Test (AIT) processes span horizontal integration with erector raising, mobile launch platforms (MLP), and vertical integration in Vehicle Assembly Buildings (VAB). Ground vibration tests (GVT) with multi-shaker sine sweeps extract modal parameters via frequency response functions (FRF). Static firing tests validate engine performance at facilities like NASA Stennis Space Center. Propellant loading sequences require cryogenic chilldown and boil-off management for LH2/LOX systems. + +Launch site ground support includes water-cooled flame deflectors, sound suppression water deluge systems, lightning protection catenary wire systems, and environmental control purge air. Propellant farms store LOX in vacuum-jacketed tanks, LH2 in perlite-insulated spherical tanks (up to 850,000 gallons), and LN2 for liner purge. Range safety relies on C-band skin track radar, telemetry dish arrays, and optical KTM telescopes. + +Recovery and reuse technology for first stages includes PICA (Phenolic Impregnated Carbon Ablator) thermal protection, titanium grid fins for steering, cold gas RCS thrusters for attitude control, landing burns with single/multi-engine throttling, deployable aluminum honeycomb crush-core landing legs, and autonomous spaceport drone ship (ASDS) dynamic positioning. Fairing recovery uses GPS-guided parafoil descent to mid-air helicopter capture or catch net ships. Refurbishment processes include visual borescope engine inspection, static fire acceptance tests, leg retraction, grid fin service, and thermal protection replacement. + +VDE currently lacks: +- Propellant tank design (isogrid/orthogrid machined Al-Li 2195/2219, FSW friction stir welding, common bulkhead Y-ring, helium pressurization, POGO accumulator) +- Liquid rocket engine design (regenerative cooling Cu-Ag-Zr liner, injector coax/impinging/pintle, turbopump inducer+impeller on cryo bearings, engine cycles GG/ORSC/FRSC, TEA-TEB ignition, TVC gimbal/EMA) +- Solid rocket motor design (CF filament winding case, EPDM insulation, grain geometry finocyl, C-C throat, flex-seal TVC) +- GNC avionics (IMU RLG/FOG/HRG, GNSS multi-constellation, PEG/IGM guidance, gain-scheduled PID with bending filter, FTS autonomous destruct) +- Payload fairing design (CFRP sandwich, MLI acoustic blanket, Marman clampband separation, tip-off rate <5°/s) +- AIT processes (horizontal/vertical integration, GVT modal test, static firing, cryo loading chilldown) +- Launch site ground support (flame deflector, water deluge, propellant farm LOX/LH2, range safety radar/telemetry/optical) +- Recovery and reuse (PICA TPS, grid fins, landing burn, ASDS landing, fairing parafoil recovery, refurbishment flow) + +This proposal defines the engineering domain model, formulas, C++ API, and acceptance criteria for a VDE-native space launch systems engine. + +--- + +## Detailed Requirements + +### 1. Launch Vehicle Structure + +**Priority**: P1 + +#### 1.1 Propellant Tank, Interstage, and Payload Adapter + +``` +Launch vehicle propellant tank design: + Modern launch vehicle tanks use machined isogrid/orthogrid patterns + to provide integral stiffening while minimizing mass. Aluminum-lithium + alloys provide lower density and higher modulus than conventional + aluminum alloys. + +Tank material: + Al-Li 2195 (Al-Cu-Li-Mg-Ag-Zr): + Density: 2.71 g/cm³ (~5% lower than 2219) + Yield strength σ_y: 510-550 MPa (T8 temper) + Ultimate tensile σ_u: 560-590 MPa + Young's modulus E: 78.5 GPa + Weldability: good for FSW, challenging for fusion + Used in: Space Shuttle Super Lightweight Tank (SLWT), SLS core stage + + Al-Li 2219 (Al-Cu-Mn): + Density: 2.84 g/cm³ + Yield strength σ_y: 350-390 MPa (T87 temper) + Ultimate tensile σ_u: 440-470 MPa + Extensive cryogenic property data available + Used in: Saturn V S-IC/S-II stages, Delta IV + +Isogrid/orthogrid machining: + Isogrid: equilateral triangular rib pattern (isotropic stiffness) + Orthogrid: rectangular rib pattern (orthotropic stiffness) + + Rib geometry: + Rib height h_r: 15-25 mm + Rib thickness t_r: 2-4 mm + Pocket (skin) thickness t_s: 1.5-3.0 mm + Node spacing (pocket width): 100-200 mm + + Grid-stiffened cylinder buckling: + General instability (Euler column buckling): + P_cr = (π² × E × I_eff) / L_eff² + + Skin buckling between ribs: + σ_cr_skin = k_s × E × (t_s / b)² + Where: + k_s = buckling coefficient (~3.62 for simply-supported edges) + b = pocket width (distance between ribs) + + Rib crippling: + σ_cr_rib = k_r × E × (t_r / h_r)² + k_r ~ 0.5-1.2 depending on edge conditions + +FSW — Friction Stir Welding: + Process: + Rotating tool with pin penetrates joint + Friction heating plasticizes material (no melting) + Tool traverses along weld seam + Forged joint with fine, equiaxed grain structure + + Weld parameters: + Rotation speed: 200-600 rpm (Al alloys) + Traverse speed: 100-300 mm/min + Axial force: 5-15 kN + Pin length: 0.1-0.3 mm less than workpiece thickness + + Joint efficiency: + η = σ_weld / σ_base > 0.95 for proper FSW parameters + Superior to fusion welding (η ~ 0.6-0.8 for Al-Li) + Applications: longitudinal barrel welds, circumferential dome-to-barrel + + Weld inspection: + Phased array ultrasonic testing (PAUT) + X-ray radiography + Dye penetrant for surface defects + +Common bulkhead: + Separates LOX (forward) from LH2 (aft) tanks + Y-ring interface: machined aluminum ring connecting both tank domes + Thermal isolation: honeycomb or foam core between metallic facesheets + ΔT across bulkhead: ~110 K (LOX at 90 K, LH2 at 20 K) + + Cryogenic compatible seal materials: + Fluorocarbon elastomers (Viton) + Polytetrafluoroethylene (PTFE) based + +Tank pressurization: + Cold helium sphere: + Gaseous helium (GHe) stored at 300-400 bar in composite overwrapped + pressure vessels (COPV) or titanium spheres + Heated through heat exchanger (turbine exhaust or ambient) + Injected into ullage space to maintain tank pressure + + Ullage pressure control: + Required ullage pressure P_ullage [bar]: + P_ullage > P_NPSH + P_vapor(T) + ΔP_feedline + margin + Where: + P_NPSH = net positive suction head required by turbopump + P_vapor = propellant vapor pressure at temperature T + ΔP_feedline = pressure drop in feed lines + + POGO accumulator: + Gas-filled volume (typically GHe) connected to feed line + Acts as compliant element (gas spring) to decouple + structural vibration from propulsion system + + Natural frequency tuning: + f_accumulator = (1 / 2π) × √(k_gas / m_fluid_equivalent) + + Damping of longitudinal (POGO) instability: + The accumulator absorbs pressure pulsations at the + structural resonance frequency of the vehicle + +Interstage structure: + CFRP sandwich honeycomb: + Facesheets: CFRP (carbon fiber reinforced polymer) woven fabric + Core: aluminum honeycomb (3-5 mm cell size, 0.025-0.05 mm foil) + Bonding: film adhesive (epoxy) cured under heat + pressure + Areal density: 2-5 kg/m² + + Separation system: + Pneumatic pusher: + Compressed gas (helium or nitrogen) actuates pistons + Provides separation impulse and velocity ΔV_sep + No contamination (vs. pyrotechnic) + + Retro motor (ullage): + Small solid rocket motors on spent stage + Fire to decelerate spent stage (prevent re-contact) + Thrust: 1-5 kN, burn time: 0.5-2 seconds + + Linear separation system: + Expanding tube assembly or frangible joint + Severed by detonating cord (MDC — mild detonating cord) + Clean separation of structural connection + +Payload adapter: + Marman clampband (ESA 1194/937 standard): + Circumferential V-band clamp + Tensioned by pyrotechnic bolt or frangible nut + Standard diameters: 15", 24", 37", 60", 94", 1194mm, 937mm + + Preload force F_preload [N]: + F_preload = T_bolt / (K × d_bolt) + Where: + T_bolt = bolt torque [N·m] + K = nut factor (0.15-0.20 for dry threads) + d_bolt = bolt diameter [m] + + Separation: + Pyro bolt fires → clampband tension released + Radial springs push band segments clear + Axial separation springs push spacecraft away + Tip-off rate: <5°/s (acceptable spacecraft tumble) + + Separation velocity ΔV [m/s]: + ΔV = F_sep × Δt / m_spacecraft + Typical: 0.5-2.0 m/s + Ensure >6σ clearance (no re-contact) verified by FEA +``` + +#### 1.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class GridPattern { Isogrid_Triangular, Orthogrid_Rectangular, Waffle_Square, Skin_Stringer, Monocoque }; +enum class TankMaterial { AlLi_2195_T8, AlLi_2219_T87, Al_2024_T3, Stainless_301_Cryo, CFRP_Composite }; +enum class WeldProcess { FSW_FrictionStir, TIG_TungstenInertGas, EB_ElectronBeam, Laser_Beam }; +enum class SeparationMechanism { Pyro_Bolt, Frangible_Nut, Pneumatic_Pusher, Spring_Loaded, Marman_Clampband }; + +struct GridStiffenedPanelSpec { + GridPattern pattern; + double skin_thickness_mm; + double rib_height_mm; + double rib_thickness_mm; + double node_spacing_mm; + double pocket_width_mm; + double mass_per_area_kg_per_m2; + double bending_stiffness_EI_Nm2; +}; + +struct TankSpec { + std::string propellant; // "LOX", "LH2", "RP-1", "CH4(LNG)" + TankMaterial material; + double volume_m3; + double diameter_m; + double cylindrical_length_m; + GridStiffenedPanelSpec grid; + WeldProcess longitudinal_weld; + WeldProcess circumferential_weld; + double weld_joint_efficiency; + double ullage_pressure_bar; + double burst_pressure_bar; + double proof_test_pressure_bar; // 1.25 × MEOP + bool common_bulkhead; + double bulkhead_thermal_gradient_K; + bool pogo_accumulator; + double accumulator_volume_L; + double helium_pressurization_bottle_volume_L; + double helium_pressure_bar; + double tank_dry_mass_kg; + double insulation_type; // SOFI spray-on, MLI multilayer +}; + +struct InterstageSpec { + double length_m; + double diameter_m; + std::string material; // "CFRP honeycomb sandwich" + double areal_density_kg_per_m2; + double mass_kg; + SeparationMechanism separation; + double separation_impulse_Ns; + double separation_delta_V_mps; + bool retro_motors; + double retro_thrust_kN; + double retro_burn_time_s; + double structural_margin_of_safety; +}; + +struct PayloadAdapterSpec { + double clampband_diameter_mm; // 937, 1194, etc. + std::string standard; // "ESA 1194", "NASA standard" + SeparationMechanism separation; + int separation_bolt_count; + double preload_per_bolt_kN; + double separation_spring_force_N; + double separation_velocity_mps; + double tip_off_rate_max_deg_per_s; + double payload_mass_capacity_kg; + bool debris_containment; + int separation_shock_SRS_g; // shock response spectrum +}; + +struct LaunchVehicleStructureSpec { + std::string designation; // "Falcon 9 v1.2", "Atlas V 401", "Ariane 64" + int number_of_stages; + std::vector stages; + std::vector interstages; + PayloadAdapterSpec payload_adapter; + double vehicle_height_m; + double vehicle_diameter_m; + double gross_lift_off_mass_kg; + double dry_mass_total_kg; + double propellant_mass_total_kg; + double structural_mass_fraction; // dry mass / GLOW +}; + +struct TankState { + double fill_level_pct; + double ullage_pressure_bar; + double helium_bottle_pressure_bar; + double tank_wall_temperature_K; + bool pogo_accumulator_charged; +}; + +LaunchVehicleStructureSpec design_launch_vehicle_structure(int stages, double payload_mass_kg, double target_orbit_altitude_km, double target_inclination_deg); + +TankSpec design_propellant_tank(std::string propellant, double volume_m3, TankMaterial material, GridPattern grid); + +double calculate_grid_buckling_load(double t_s, double t_r, double h_r, double b, double E, double sigma_y); + +double calculate_fsw_weld_strength(double base_strength_MPa, double rpm, double traverse_speed, double axial_force_kN); + +double calculate_payload_separation(double clampband_diameter_mm, int bolt_count, double preload_kN, double payload_mass_kg); + +} // namespace vde::space_launch +``` + +--- + +### 3. Solid Rocket Motor + +**Priority**: P1 + +#### 3.1 Case, Propellant Grain, Nozzle, and Igniter + +``` +Solid rocket motor (SRM) overview: + SRMs provide high thrust with mechanical simplicity. Propellant grain + geometry controls the thrust-time profile. No moving parts in the main + motor, though thrust vector control requires actuated nozzles. + +Motor case: + Carbon fiber filament winding: + Tow material: T700, T800, IM7 carbon fiber + Resin: epoxy (high Tg, ≥180°C for operational temperatures) + Winding patterns: helical + hoop layers + Helical angle: ±15-30° (transmits axial load) + Hoop layers: 90° (contains hoop stress) + + Case design pressure P_design: + P_design = MEOP × safety_factor (1.25-1.5) + Hoop stress: σ_hoop = P × R / t_case + Axial stress: σ_axial = P × R / (2 × t_case) + + Stress rupture: + Long-term sustained pressure at elevated temperature + Epoxy matrix stress relaxation and fiber creep + Service life limited by cumulative damage + + Case-to-insulation bond: + Surface preparation critical for adhesion + Rubber-to-composite bondline integrity verified by NDT + + EPDM rubber internal insulation: + Ethylene Propylene Diene Monomer (EPDM) + Filled with: silica, aramid fibers, carbon black + Ablation mechanism: char layer formation + Char protects virgin material from hot gas (~3,000 K) + Thickness: 2-15 mm (varies axially — thicker near head end) + Thermal conductivity: 0.2-0.4 W/(m·K) + Density: 0.9-1.3 g/cm³ + +Propellant grain: + Propellant composition: + Ammonium perchlorate (AP): oxidizer, 60-75% by weight + Aluminum powder: fuel, 10-20% + HTPB (Hydroxyl-Terminated Polybutadiene): binder/fuel, 10-15% + Other: curing agents, bonding agents, burn rate modifiers + + Burn rate (Saint Robert's law): + r = a × P_c^n + Where: + a = burn rate coefficient (depends on propellant formulation) + n = pressure exponent (0.3-0.5 desired, <1 required for stability) + P_c = chamber pressure + + Burn rate modifiers: + Fe₂O₃ (iron oxide): increases burn rate (catalyst) + Oxamide: decreases burn rate (inhibitor) + Carbon black: opacifier (radiative heat transfer control) + + Grain geometry and thrust profile: + Burn surface S_b(t) evolves as propellant regresses + + Center-perforated (circular bore): + Burn surface increases with time → progressive burn + Web fraction w = 2×W/D_grain + Thrust increases throughout burn + + Star grain: + Star-shaped internal perforation + Multiple "points" increase initial surface area + Progressive to neutral (as points burn out, surface decreases) + Used for: high initial thrust (boost-sustain profile) + + Wagon wheel: + Similar to star with more complex geometry + Neutral burning over longer portion of web + + Finocyl (fin + cylinder): + Radial fins at ends of circular bore + Fins burn out early → surface area drops → regressive + Then circular bore → progressive + Produces tailored thrust-time profile + + End-burning: + Only end surface burns (all other surfaces inhibited) + Constant burn surface → neutral thrust throughout + Very long burn times (minutes to hours) + Low thrust for given diameter + + Ballistic analysis: + Mass flow rate ṁ [kg/s]: + ṁ = ρ_propellant × S_b(t) × r(P_c) + + Chamber pressure equilibrium: + P_c = (ρ × a × S_b × c* / A_t)^(1/(1−n)) + Where: + c* = characteristic velocity + A_t = nozzle throat area + + Thrust: + F = ṁ × I_sp = ṁ × c* × C_F / g₀ + C_F = thrust coefficient (nozzle geometry + pressure ratio) + +Nozzle: + Carbon-carbon (C-C) throat: + High-density C-C composite (1.7-1.9 g/cm³) + Ablation rate at throat: 0.05-0.2 mm/s depending on propellant + aluminized propellant: higher ablation (Al₂O₃ particle erosion) + non-aluminized: lower ablation + Multi-directional fiber preform → balanced erosion + + Carbon-phenolic exit cone: + Carbon fabric (rayon-based or PAN-based) with phenolic resin + Ablative cooling: resin pyrolyzes, gas injection into boundary layer + Ply angle: 30-45° to nozzle axis + Tape-wrapped or molded + Thickness: 10-50 mm (thicker at throat, thinner at exit) + + Flex-seal bearing (omniaxis TVC): + Alternating layers of elastomer (natural rubber) and metal/composite shims + Allows nozzle to pivot up to ±7-8° in any direction + No sliding surfaces, no lubrication needed + Actuation: hydraulic or EMA servoactuators + Stiffness: must be overcome by actuators but provide restoring force + + Flex-seal stiffness K [N·m/°]: + K = G_eff × Σ(r_i² × A_i / t_i) / θ_allowable + Where: + G_eff = effective shear modulus of elastomer layers + r_i = radius of each shim layer + A_i = area of each shim layer + t_i = thickness of each elastomer layer + +Igniter: + Pyrogen igniter: + Small rocket motor (pyrotechnic + propellant grain) + Mounted at head end of main motor + Fires into main grain perforation + Hot gas and particles ignite main propellant surface + + Igniter sizing: + Mass flow of igniter must sustain chamber pressure above + ignition threshold P_ign until main grain is fully ignited + ṁ_ign > P_ign × A_t / (c*_ign × η_ignition) + + Safe & Arm (S&A) device: + Mechanical barrier prevents inadvertent ignition + Arming: barrier removed (motor armed for flight) + Through-bulkhead initiator (TBI): + Shock wave through metal bulkhead initiates secondary explosive + No hole through bulkhead → maintains pressure integrity +``` + +#### 3.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class GrainGeometry_SRM { Center_Perforated, Star, Wagon_Wheel, Finocyl, End_Burning, Slotted_Tube, Dendrite }; +enum class TVC_SRM { Flex_Seal_Omniaxis, Gimbaled_Nozzle, Jet_Vane, Liquid_Injection, Fixed_Nozzle }; + +struct SRM_CaseSpec { + std::string fiber_type; // "T800", "IM7" + double case_length_m; + double case_diameter_m; + double case_thickness_mm; + double max_expected_operating_pressure_bar; // MEOP + double burst_pressure_bar; + double safety_factor_pressure; + double hoop_stress_MPa_at_MEOP; + std::string insulation_material; // "EPDM rubber" + double insulation_thickness_min_mm; + double insulation_thickness_max_mm; + double case_dry_mass_kg; +}; + +struct GrainSpec { + GrainGeometry_SRM geometry; + double grain_outer_diameter_mm; + double grain_length_mm; + double web_thickness_mm; + double web_fraction; + double port_area_initial_mm2; + double burn_surface_initial_mm2; + double burn_surface_final_mm2; + double volumetric_loading_fraction; // propellant volume / case volume + double star_point_count; // for star grain + double propellant_burn_rate_coeff_a; // Saint Robert's law a + double pressure_exponent_n; // Saint Robert's law n + double propellant_density_kg_per_m3; + double propellant_mass_kg; +}; + +struct SRM_NozzleSpec { + double throat_diameter_mm; + double exit_diameter_mm; + double expansion_ratio; + std::string throat_material; // "C-C composite" + double throat_erosion_rate_mm_per_s; + std::string exit_cone_material; // "Carbon-phenolic" + double exit_cone_half_angle_deg; + TVC_SRM tvc_type; + double flex_seal_gimbal_angle_deg; + double nozzle_mass_kg; +}; + +struct SRM_IgniterSpec { + std::string type; // "Pyrogen", "Pyrotechnic pellet" + double igniter_propellant_mass_kg; + double igniter_mass_flow_kg_per_s; + double ignition_delay_ms; + double chamber_pressure_ignition_threshold_bar; + bool safe_and_arm_device; + bool through_bulkhead_initiator; +}; + +struct SRM_Spec { + std::string designation; // "GEM 63XL", "SRB 5-segment" + SRM_CaseSpec motor_case; + GrainSpec grain; + SRM_NozzleSpec nozzle; + SRM_IgniterSpec igniter; + double vacuum_thrust_avg_kN; + double vacuum_thrust_max_kN; + double vacuum_Isp_s; + double burn_time_s; + double total_impulse_MNs; + double total_mass_kg; + double propellant_mass_fraction; +}; + +struct SRM_State { + double web_remaining_mm; + double chamber_pressure_bar; + double thrust_kN; + double cumulative_burn_time_s; + double throat_diameter_current_mm; // eroded + bool ignited; +}; + +struct SRM_Performance { + double actual_total_impulse_MNs; + double average_thrust_kN; + double average_chamber_pressure_bar; + double thrust_time_profile[]; + double Isp_delivered_s; + double nozzle_erosion_total_mm; +}; + +SRM_Spec design_srm(double target_total_impulse_MNs, double target_burn_time_s, GrainGeometry_SRM geometry); + +SRM_State initialize_srm_state(const SRM_Spec& spec); + +SRM_Performance simulate_srm_burn(const SRM_Spec& spec, SRM_State& state, double time_step_s, double ambient_pressure_bar); + +double calculate_srm_chamber_pressure(double burn_rate_coeff_a, double exponent_n, double S_b, double A_t_mm2, double c_star, double rho_p); + +double calculate_grain_burn_surface(GrainGeometry_SRM geometry, double web_burned_mm, double grain_diameter_mm, double grain_length_mm, int star_points); + +} // namespace vde::space_launch +``` + +--- + +### 4. GNC Avionics & Flight Software + +**Priority**: P1 + +#### 4.1 IMU, GNSS, Guidance, Control, FTS, and Telemetry + +``` +Guidance, Navigation, and Control (GNC): + The GNC system determines vehicle position/velocity/attitude, computes + steering commands, and executes them through engine gimbaling or RCS. + +Inertial Measurement Unit (IMU): + Gyroscope technologies: + Ring Laser Gyro (RLG): + Sagnac effect: counter-propagating laser beams in triangular cavity + Frequency difference Δf proportional to rotation rate Ω: + Δf = (4×A / λ×L) × Ω + Where: A = enclosed area, L = perimeter, λ = wavelength + Bias stability: 0.001-0.01°/hr + Scale factor stability: 1-5 ppm + Used in: Delta IV, Atlas V, many launch vehicles + + Fiber Optic Gyro (FOG): + Similar Sagnac principle with fiber coil (200-1,000 m fiber length) + Bias stability: 0.01-0.1°/hr + Lighter, smaller, lower cost than RLG + Used in: newer launch vehicle IMUs + + Hemispherical Resonator Gyro (HRG): + Vibrating quartz hemispherical shell + Standing wave precession proportional to rotation + Bias stability: 0.0001-0.001°/hr (ultimate precision) + No moving parts (vibratory), very high reliability + Used in: strategic systems, some launch vehicles + + Accelerometer: + Quartz flex accelerometer: + Pendulous proof mass on quartz flexure + Servo-loop maintains null position + Current proportional to acceleration + Bias stability: 10-100 μg + Scale factor: 1-2 mA/g + Used in: high-precision IMUs + + IMU strapdown navigation: + Attitude quaternion q [q₀, q₁, q₂, q₃] integrates gyro rates: + q̇ = ½ × q ⊗ ω_vector + + Velocity integration (navigation frame): + v̇^n = C_b^n × f^b − (2×ω_ie^n + ω_en^n) × v^n + g^n + Where: + C_b^n = body-to-navigation DCM from attitude + f^b = specific force from accelerometers + Coriolis term: 2×ω_ie^n × v^n + g^n = gravity vector in navigation frame + + Position integration: + ṙ^n = v^n + + Gyrocompass alignment (on pad): + Senses Earth rotation ω_e = 15.04°/hr + Determines true north (azimuth alignment) + Leveling: gravity vector provides vertical reference + Alignment time: 5-15 minutes (optical gyrocompass assisted) + + Kalman filter alignment: + Estimates IMU biases, misalignments during stationary period + Velocity updates (zero-velocity update ZUPT) + +GNSS integration: + Multi-constellation: GPS (USA) + GLONASS (Russia) + BeiDou (China) + Pseudorange measurement ρ_i: + ρ_i = c × (t_receiver − t_transmit_i) + c × Δt_clock + errors + + Position computed from ≥4 satellites via least-squares or Kalman filter + + RAIM (Receiver Autonomous Integrity Monitoring): + Fault detection and exclusion + Requires ≥5 satellites for fault detection, ≥6 for exclusion + Protection levels computed: HPL (horizontal), VPL (vertical) + + Precision dilution: + PDOP (Position Dilution of Precision): + Depends on satellite geometry (GDOP decomposed) + Good PDOP < 3, poor PDOP > 6 + +Guidance algorithms: + Atmospheric phase — Gravity turn: + Vehicle thrust vector kept aligned with velocity vector + (zero angle of attack minimizes aerodynamic loads) + Pitch program: pre-programmed pitch vs. time profile + Open-loop until dynamic pressure q_max passes + + Dynamic pressure q [Pa]: + q = ½ × ρ × v² + q_max typically: 30-60 kPa (structural design constraint) + Throttle down through max-q region if needed + + Vacuum phase — Powered Explicit Guidance (PEG): + Linear tangent steering law: + tan(θ(t)) = tan(θ₀) + k × t + Iteratively solves for θ₀ and k to meet: + (a) desired cutoff velocity magnitude + (b) desired cutoff flight path angle + (c) desired cutoff radius + + Unified Powered Flight Guidance (UPFG): + Generalization of PEG for multi-burn missions + Handles constraints: velocity, position, flight path angle + Iterative solution (converges in 3-5 iterations) + + IGM (Iterative Guidance Mode): + Used in Saturn V (Instrument Unit) + Directly targets orbital insertion conditions + Velocity-to-be-gained (v_go) vector computed each guidance cycle + Steering: align thrust with v_go direction + +Control system: + PID controller (gain-scheduled): + Attitude control: + Moment command M_cmd [N·m]: + M_cmd = K_p × (θ_cmd − θ) + K_d × (θ̇_cmd − θ̇) + K_i × ∫(θ_cmd − θ)dt + + Gain scheduling: + Gains vary with flight time (mass, CG, dynamic pressure change) + Typically 5-10 gain sets across ascent + Interpolated between sets + + Bending filter (notch filter): + Suppresses control-structure interaction at bending mode frequencies + Notch filter transfer function: + H(s) = (s² + 2ζ₁ω_n s + ω_n²) / (s² + 2ζ₂ω_n s + ω_n²) + Where ω_n = bending mode natural frequency + + Multiple notch filters for multiple bending modes + Phase stabilization vs. gain stabilization: + Phase stabilize lower modes (guaranteed phase lag < 180°) + Gain stabilize higher modes (open-loop gain < 0 dB) + + Slosh baffle compensation: + Propellant slosh modes: 0.3-2 Hz (large vehicles) + Ring baffles or anti-slosh baffles in tanks + Can be gain-stabilized (filter slosh frequency from control) + Slosh mass-spring-damper model: + m_sloshing = slosh mass (fraction of total propellant) + k_slosh = m_sloshing × ω_slosh² + c_slosh = 2 × ζ_slosh × √(m_sloshing × k_slosh) + + Actuator rate limit: + Engine gimbal rate: 5-20°/s + Must be accounted for in control loop stability + Anti-windup for integrator during rate saturation + +Flight Termination System (FTS): + Autonomous destruct criteria: + Thrust violation: thrust < X% of nominal at given flight time + Attitude violation: pitch/yaw deviation > Y° from nominal + Position violation: vehicle outside 3σ position corridor + These thresholds programmed pre-flight from trajectory dispersion analysis + + Command destruct: + Range safety officer (RSO) monitors from ground + FTS command uplink via UHF telecommand + Destruct mechanism: + Linear shaped charge (LSC) severs propellant tanks + Propellant disperses and burns (not detonates) + Thrust termination (solid motors): blow-out ports on case + + Redundancy: + Dual redundant FTS receivers + Dual redundant battery systems + Arm/fire logic: 2-of-2 vote for safety + +Telemetry: + PCM/FM (Pulse Code Modulation / Frequency Modulation): + Data rates: 1-5 Mbps + Frequency: S-band (2.2-2.4 GHz) typical + + Sensor network (typical measurements): + Accelerations (3-axis, multiple locations): ±50g range + Angular rates (3-axis): ±100°/s range + Strain gauges (structural): 0-5,000 με + Temperature: thermocouples, RTDs (20-3,000 K range) + Pressure: transducers (0-500 bar range) + Vibration: accelerometers (20-2,000 Hz) + Acoustic: microphones (flight environment) + Propellant: level sensors, flow meters + + Data encoding: + IRIG-106 Chapter 4 (PCM standard) + CCSDS (Consultative Committee for Space Data Systems) packets +``` + +#### 4.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class GyroType { Ring_Laser_Gyro, Fiber_Optic_Gyro, HRG_Hemispherical_Resonator, MEMS }; +enum class GuidanceMode { Gravity_Turn_Atmospheric, PEG_Vacuum, IGM_Iterative, Lambert_Targeting }; + +struct IMU_Spec { + GyroType gyro_type; + double gyro_bias_stability_deg_per_hr; + double gyro_angle_random_walk_deg_per_rt_hr; + double accel_bias_stability_micro_g; + double accel_velocity_random_walk_m_per_s_per_rt_hr; + double update_rate_Hz; + double alignment_time_minutes; + bool gyrocompass_capable; +}; + +struct GNSS_Spec { + bool gps_enabled; + bool glonass_enabled; + bool beidou_enabled; + double position_accuracy_m; + double velocity_accuracy_mps; + double update_rate_Hz; + bool raim_enabled; + double protection_level_horizontal_m; + double protection_level_vertical_m; + bool anti_jam_capable; +}; + +struct GuidanceSpec { + GuidanceMode atmospheric_mode; + GuidanceMode vacuum_mode; + double gravity_turn_pitch_rate_deg_per_s; + double max_q_Pa; // structural constraint + double peg_convergence_tolerance_mps; + int peg_max_iterations; + double target_orbit_perigee_km; + double target_orbit_apogee_km; + double target_inclination_deg; +}; + +struct ControlSpec { + double pid_Kp[NUM_GAIN_SETS]; + double pid_Kd[NUM_GAIN_SETS]; + double pid_Ki[NUM_GAIN_SETS]; + int num_gain_sets; + std::vector gain_schedule_time_s; + int num_bending_modes_filtered; + std::vector notch_frequencies_Hz; + std::vector notch_bandwidths_Hz; + double engine_gimbal_rate_limit_deg_per_s; + double actuator_bandwidth_Hz; + bool slosh_filter_enabled; + double slosh_frequency_Hz; + double slosh_damping_ratio; + bool anti_windup; +}; + +struct FTS_Spec { + bool autonomous_destruct_enabled; + double thrust_low_threshold_pct; + double attitude_deviation_threshold_deg; + double position_corridor_3sigma_m; + bool command_destruct_uplink; + int fts_receiver_redundancy; // typically 2 + std::string destruct_mechanism; // "Linear shaped charge" + bool safe_and_arm; + int arm_vote_logic; // 2-of-2, 2-of-3 +}; + +struct TelemetrySpec { + double data_rate_Mbps; + std::string rf_band; // "S-band" + int acceleration_channels; + int strain_channels; + int temperature_channels; + int pressure_channels; + int vibration_channels; + bool ccsds_format; +}; + +struct GNCSpec { + IMU_Spec imu; + GNSS_Spec gnss; + GuidanceSpec guidance; + ControlSpec control; + FTS_Spec fts; + TelemetrySpec telemetry; + bool integrated_navigation_filter; // Kalman filter IMU+GNSS + int flight_computer_redundancy; // typically 3 for triple-redundant +}; + +struct GNC_State { + double position[3]; // ECI or ECEF [m] + double velocity[3]; // [m/s] + double attitude_quaternion[4]; + double angular_rate[3]; // [rad/s] + double mass_kg; + double time_since_liftoff_s; + bool fts_armed; + bool fts_triggered; +}; + +struct GNC_Performance { + double orbit_injection_semi_major_axis_error_km; + double orbit_inclination_error_deg; + double orbit_eccentricity_error; + double attitude_control_error_deg_rms; + double max_q_actual_Pa; + double structural_load_alleviation_pct; +}; + +GNCSpec design_gnc_system(GyroType gyro, bool gnss_integrated, int redundancy); + +GNC_State initialize_gnc_state(const GNCSpec& spec, double launch_latitude_deg, double launch_longitude_deg, double launch_altitude_m); + +GNC_Performance simulate_gnc_ascent(const GNCSpec& spec, GNC_State& state, const EngineSpec& engine, const LaunchVehicleStructureSpec& vehicle); + +double calculate_coriolis_acceleration(double velocity_mps, double latitude_deg); + +double calculate_pid_output(double error, double error_rate, double error_integral, double Kp, double Kd, double Ki, double dt, double rate_limit); + +bool check_fts_destruct_criteria(double thrust_pct, double attitude_err_deg, double position_err_m, const FTS_Spec& fts); + +} // namespace vde::space_launch +``` + +--- + +### 5. Payload & Fairing + +**Priority**: P1 + +#### 5.1 Fairing, Dual-Launch Adapter, Separation, and Environment + +``` +Payload fairing: + Protects spacecraft from aerodynamic, thermal, and acoustic loads + during atmospheric ascent. Jettisoned when dynamic pressure and + free-molecular heating are acceptably low (typically 80-120 km altitude). + +Fairing structure: + Two half-shells (bisected vertically) + Aluminum honeycomb core: + Cell size: 3.2-6.4 mm (1/8-1/4 inch) + Foil thickness: 0.025-0.05 mm (5052 or 5056 aluminum) + Density: 30-80 kg/m³ + CFRP facesheets: + High modulus carbon fiber (M55J, M60J) + Epoxy matrix (177°C cure) + Layup: [0/±45/90]s quasi-isotropic (4-8 plies per facesheet) + Facesheet thickness: 0.5-2.0 mm each + + Fairing dimensions (typical medium/heavy class): + Diameter: 3.7-5.4 m + Length: 10-20 m + Mass: 800-2,500 kg + Payload volume: 50-200 m³ + +Acoustic protection: + MLI (Multi-Layer Insulation) blankets: + Alternating layers of aluminized Kapton/Mylar and Dacron net spacer + Outer layer: beta cloth or Kapton (durable surface) + 10-30 layers total + Provides both thermal and acoustic protection + + Foam acoustic blanket: + Melamine foam (e.g., Basotect) or polyimide foam (e.g., Solimide) + Thickness: 25-75 mm + Density: 8-12 kg/m³ + Sound absorption coefficient α > 0.9 at 250-4,000 Hz + + Acoustic environment: + Diffuse field inside fairing during liftoff and max-q + Overall sound pressure level (OASPL): 140-150 dB (re 20 μPa) + Frequency range: 31.5 Hz - 8,000 Hz (octave bands) + + Acoustic reduction (insertion loss IL): + IL_target > 12 dB (A-weighted overall) + 1/3 octave band insertion loss ~5-20 dB (frequency dependent) + +Fairing separation: + Horizontal split line: + Two half-shells separate and rotate away from vehicle axis + Pyrotechnic release: expanding tube or frangible joint along each side + + Vertical separation plane: + Base joint: frangible ring or pyrotechnic bolts + Fairing base adaptor to launch vehicle interface + + Push-off springs: + Radial spring force: 2-10 kN per side + Separates fairing halves from payload envelope + + Separation clearance analysis: + Must ensure >6σ clearance between fairing and payload/adapter + Monte Carlo simulation with variations: + Separation timing (pyro event simultaneity ±5 ms) + Spring force tolerance (±10%) + Aerodynamic forces (if separated in residual atmosphere) + Mass properties uncertainty + Hinge friction (if hinged design) + + Debris containment: + Pyrotechnic debris captured by containment systems + Frangible joint debris impingement shields + No liberated debris >1g in payload envelope + +Dual-launch adapter: + SYLDA (Système de Lancement Double Ariane): + Internal structure within fairing + Supports lower payload, upper payload sits above + CFRP sandwich shell construction + Provides load path for upper payload + Separates after upper payload deployment + + VESPA (VEga Secondary Payload Adapter): + Smaller version for Vega launch vehicle + Similar concept: internal dual-payload support structure + +Payload separation: + Clampband separation: + Same Marman clampband design as launch vehicle interface + Spacecraft-side adapter cone + separation springs + + Separation dynamics: + Relative velocity ΔV between spacecraft and upper stage + Tip-off angular rate ω_tipoff: + ω_tipoff = Σ(r_i × F_i × Δt_i) / I_spacecraft + Must be <5°/s (3-axis) + + Nutation after separation: + If ω_initial non-zero, spacecraft will nutate + Nutation angle θ_nut = ω_transverse / ω_spin_axis + + Separation shock: + Pyrotechnic events generate high-frequency shock + SRS (Shock Response Spectrum) at spacecraft interface: + Typically 1,000-5,000 g at 1,000-10,000 Hz + Attenuation through adapter: 20-40 dB reduction at spacecraft deck + + Payload environment: + Random vibration: PSD (Power Spectral Density) specification + Frequency: 20-2,000 Hz + Overall GRMS: 5-15 g_rms + Breakpoints defined in launch vehicle user manual + + Acoustic: diffuse field SPL per octave band + Thermal: fairing internal air temperature 15-35°C (conditioned) + Purge air flow: conditioned, HEPA filtered + Cleanliness: Class 100,000 (ISO 8) or better inside fairing +``` + +#### 5.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class FairingSeparation { Horizontal_Clamshell, Vertical_Release, Frangible_Joint }; + +struct FairingSpec { + double diameter_m; + double cylindrical_length_m; + double total_length_m; + double ogive_ratio; // nose cone length/diameter + std::string sandwich_core; // "Aluminum honeycomb 3.2mm cell" + std::string facesheet_material; // "CFRP M55J/epoxy" + double facesheet_thickness_mm; + double areal_density_kg_per_m2; + double mass_kg; + + bool acoustic_blanket; + std::string blanket_type; // "MLI + melamine foam" + double blanket_thickness_mm; + double acoustic_insertion_loss_dB_A; + + FairingSeparation separation_type; + double separation_altitude_km; + int pyrotechnic_bolt_count; + double spring_force_per_side_kN; + double separation_velocity_radial_mps; + double tip_off_rate_deg_per_s; + + bool debris_containment; + double internal_volume_m3; + double payload_envelope_diameter_mm; + double payload_envelope_length_mm; +}; + +struct DualLaunchAdapterSpec { + std::string designation; // "SYLDA", "VESPA" + double height_m; + double lower_payload_volume_m3; + double upper_payload_volume_m3; + double mass_kg; + std::string structure_material; // "CFRP sandwich" +}; + +struct PayloadSeparationSpec { + double clampband_diameter_mm; + int bolt_count; + double preload_per_bolt_kN; + double separation_velocity_mps; + double tip_off_rate_max_deg_per_s; + int spring_count; + double spring_stroke_mm; + double separation_shock_SRS_at_100Hz_g; + double separation_shock_SRS_at_1000Hz_g; + double separation_shock_SRS_at_10000Hz_g; +}; + +struct PayloadEnvironmentSpec { + double max_random_vibration_grms; + double random_psd_freq_range_min_Hz; + double random_psd_freq_range_max_Hz; + double max_acoustic_OASPL_dB; + double acoustic_freq_range_min_Hz; + double acoustic_freq_range_max_Hz; + double fairing_internal_temp_min_C; + double fairing_internal_temp_max_C; + double purge_air_flow_m3_per_h; + int cleanliness_class_ISO; + double max_axial_acceleration_g; + double max_lateral_acceleration_g; +}; + +struct PayloadSpec { + std::string spacecraft_designation; + double launch_mass_kg; + double center_of_gravity_z_mm; // from separation plane + double moment_of_inertia_roll_kgm2; + double moment_of_inertia_pitch_kgm2; + double moment_of_inertia_yaw_kgm2; + double first_natural_frequency_Hz; // > launch vehicle constraint + PayloadSeparationSpec separation; + PayloadEnvironmentSpec environment; +}; + +FairingSpec design_payload_fairing(double payload_diameter_m, double payload_length_m, FairingSeparation separation_type); + +PayloadSeparationSpec design_separation_system(double payload_mass_kg, double clampband_diameter_mm); + +double calculate_acoustic_insertion_loss(double blanket_thickness_mm, double blanket_density, double freq_Hz); + +double calculate_separation_tip_off(double forces[], double positions[], int count, double inertia_tensor[]); + +bool verify_separation_clearance(const FairingSpec& fairing, const PayloadSpec& payload, double confidence_level_sigma); + +} // namespace vde::space_launch +``` + +--- + +### 6. Assembly, Integration & Test (AIT) + +**Priority**: P1 + +#### 6.1 Integration, Testing, and Propellant Loading + +``` +AIT processes overview: + Assembly, Integration, and Test (AIT) encompasses the full flow from + component-level testing through integrated vehicle checkout to launch + readiness. The AIT campaign validates that all systems function + correctly as an integrated vehicle. + +Vehicle integration: + Horizontal integration: + Stages assembled horizontally in integration facility + Vehicle transported horizontally on transporter-erector (TE) + Erected to vertical at launch pad + Advantages: lower facility cost (no tall VAB), simpler overhead crane + Used by: SpaceX (Falcon 9), Rocket Lab (Electron), Soyuz + + Transporter-Erector: + Hydraulic rams rotate vehicle to vertical + Erection time: 10-30 minutes + TE also serves as launch mount structure (Falcon 9) + + Vertical integration: + Stages stacked vertically in Vehicle Assembly Building (VAB) + Mobile Launch Platform (MLP) carries vehicle to pad + Crawler-transporter: 2,700-tonne tracked vehicle (NASA) + Advantages: traditional, payload access at top + Used by: NASA (SLS/Artemis), ULA (Atlas V at SLC-41), ESA (Ariane 6) + + Mobile Launch Platform (MLP): + Two-story steel structure + Umbilical connections, propellant lines integrated + Weighs 3,700-4,200 tonnes (SLS ML) + Crawler speed: 1.6 km/h loaded + +Functional testing: + Electrical checkout: + Continuity tests: all electrical connections verified + Insulation resistance: >10 MΩ (power circuits) + Bus communication: MIL-STD-1553 or Ethernet bus verification + Sensor calibration: verify sensor output against known stimuli + + HIL (Hardware-In-the-Loop) simulation: + Flight computer connected to real-time simulator + Simulator provides sensor inputs (IMU data, GNSS signals) + Flight software executes as in flight + Actuator commands captured and validated + Simulates nominal + failure scenarios + Closed-loop testing of GNC, FTS, sequencing + + Flight software verification: + Step-through nominal timeline + Inject fault conditions: sensor failure, actuator jam, bus dropout + Verify FTS logic (autonomous destruct criteria) + Verify redundancy management (failover to backup) + + Independent verification & validation (IV&V): + Separate team reviews software independently + Static code analysis (MISRA C/C++ compliance) + All paths tested (MC/DC — modified condition/decision coverage) + +Modal test — Ground Vibration Test (GVT): + Vehicle mounted on soft suspension (free-free boundary condition) + Multi-shaker excitation: + Typically 4-8 shakers at strategic locations + Sine sweep: 0.1-100 Hz (typical launch vehicle frequencies) + Random excitation: broad-spectrum + + Frequency Response Function (FRF): + H_ij(ω) = X_i(ω) / F_j(ω) + Where X_i = response at measurement point i + F_j = excitation at shaker location j + + Modal parameter extraction: + Natural frequencies ω_n + Damping ratios ζ (typically 0.5-2% for launch vehicles) + Mode shapes Φ + Modal effective mass: fraction of total mass participating in each mode + + Validation: + Test-analysis correlation: + MAC (Modal Assurance Criterion) between test and FEM + MAC > 0.9 for primary modes + Frequency error <5% between test and FEM + FEM updated (model reconciliation) based on test results + +Full-scale structural test: + Static firing (SF): + Vehicle restrained on test stand + Engines fired (full duration or abbreviated) + Loads measured: thrust, side loads, vibration + + Static load test: + Limit load: maximum expected flight load + Ultimate load: 1.25 × limit (for crew) or 1.4 × limit (uncrewed) + Load cases: max acceleration, engine-out, wind shear, separation + + Strain measurements: hundreds of channels + Deflection: photogrammetry or laser tracker + Must not exhibit permanent deformation at limit load + Must carry ultimate load without catastrophic failure + +Stage test: + First stage acceptance firing: + Full-duration static firing of assembled stage + Typically at Stennis Space Center (NASA) or McGregor (SpaceX) + Test stand water deluge for acoustic/noise suppression + + Measured parameters: + Thrust (load cells on test stand) + Chamber pressure (all engines) + Turbopump speeds, temperatures + TVC actuator response + Structural strains, vibration, acoustic + Propellant flow rates, tank pressures + + Acceptance criteria: + Thrust within ±3% of predicted + Engine performance within qualified envelope + No structural exceedances + Post-test inspections: no cracks, leaks, deformation + +Hold-down: + Vehicle held on pad after engine ignition + Thrust verified (all engines at rated thrust) + If thrust OK → release hold-down clamps → liftoff + If thrust anomaly → engine shutdown (abort) + + Load cells in hold-down arms measure thrust + Decision time: 0.5-2.0 seconds after ignition + +Propellant loading: + Cryogenic LOX loading (normal boiling point 90 K): + Chilldown (cooldown) phase: + Small LOX flow to cool transfer lines and tank + Vaporizes initially on contact with warm surfaces + Chilldown complete when liquid appears at tank bottom + Duration: 20-60 minutes (depending on tank size) + + Fast fill: + High flow rate (~1,000-5,000 L/min) + Fills main tank volume + Boil-off rate: 0.1-0.5% per hour + + Replenish (topping): + Compensates for boil-off losses + Maintains tank at 100% until just before launch + + Cryogenic LH2 loading (NBP 20 K): + Similar sequence but greater challenges: + More boil-off (lower NBP) + Helium purge required (avoid air condensation in lines) + Insulation more critical + + Terminal countdown: + Auto sequencer controls final steps + T-0: engine ignition + T+2s: hold-down release (after thrust verification) + + Propellant conditioning: + LOX temperature: must be subcooled for density (mass optimization) + LH2: minimize boil-off + Propellant stratification management (mixing, circulation) +``` + +#### 6.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class IntegrationMethod { Horizontal_with_Erector, Vertical_in_VAB, Hybrid }; +enum class TestPhase { Subsystem_Checkout, Integrated_Electrical, HIL_GNC, Modal_GVT, Static_Fire, Wet_Dress_Rehearsal }; + +struct IntegrationSpec { + IntegrationMethod method; + bool transporter_erector; + double erection_time_min; + bool mobile_launch_platform; + double mlp_mass_tonnes; + double crawler_speed_kmh; + double vab_height_m; // if vertical integration + int integration_flow_days; +}; + +struct ElectricalTestSpec { + int continuity_test_points; + double insulation_resistance_min_MOhm; + std::string data_bus_type; // "MIL-STD-1553", "Ethernet" + int bus_nodes; + bool sensor_calibration_required; + int calibration_points_per_sensor; +}; + +struct HIL_TestSpec { + bool imu_simulator; + bool gnss_simulator; + double real_time_factor; // 1.0 = real time + int nominal_mission_scenarios; + int fault_injection_scenarios; + std::vector fault_types; // "Sensor fail", "Actuator jam" + bool fts_logic_checked; + bool redundancy_failover_verified; +}; + +struct ModalGVTSpec { + int num_exciter_shakers; + double frequency_range_min_Hz; + double frequency_range_max_Hz; + double sine_sweep_rate_oct_per_min; + int num_response_accelerometers; + int expected_num_modes; + double mac_threshold; // Modal Assurance Criterion + double freq_error_max_pct; // Test vs. FEM + bool fem_updating_required; +}; + +struct StaticFireTestSpec { + double burn_duration_s; + bool full_duration; + int num_engines_fired; + double thrust_acceptance_band_pct; // ±3% + int strain_gauge_channels; + int vibration_channels; + int acoustic_channels; + bool water_deluge_used; + double water_flow_rate_L_per_s; + int post_test_inspections; +}; + +struct PropellantLoadingSpec { + std::string propellant; // "LOX", "LH2", "RP-1", "CH4" + double chilldown_duration_min; + double chilldown_flow_rate_L_per_min; + double fast_fill_flow_rate_L_per_min; + double fast_fill_duration_min; + double boil_off_rate_pct_per_hour; + double replenish_flow_rate_L_per_min; + double target_temperature_K; + bool subcooled; // densified propellant + double tank_volume_m3; + double total_propellant_mass_kg; +}; + +struct AIT_Spec { + std::string vehicle_designation; + IntegrationSpec integration; + ElectricalTestSpec electrical_test; + HIL_TestSpec hil_test; + ModalGVTSpec modal_test; + StaticFireTestSpec static_fire; + std::vector propellant_loading; + bool wet_dress_rehearsal; + bool terminal_countdown_auto_sequencer; + double total_ait_campaign_days; +}; + +struct AIT_State { + int current_test_phase; + double test_progress_pct; + bool modal_test_completed; + bool static_fire_completed; + bool wet_dress_completed; + int test_anomalies_found; + int test_anomalies_resolved; +}; + +struct AIT_Performance { + bool electrical_verified; + bool gnss_flight_software_verified; + double mac_correlation_score; // test vs FEM + double static_fire_thrust_error_pct; + double static_fire_isp_error_pct; + bool vehicle_cleared_for_flight; +}; +``` + +--- + +### 7. Launch Site & Ground Support + +**Priority**: P1 + +#### 7.1 Pad, Propellant Farm, Umbilical Tower, and Range Safety + +``` +Launch pad design: + Flame deflector: + Redirects engine exhaust away from vehicle and pad structure + Typically wedge-shaped or curved deflector + Water-cooled: water film on surface prevents melting + Material: refractory concrete or steel with ablative coating + Withstand: exhaust temperatures >3,000 K, heat flux >1 MW/m² + + Sound suppression water deluge: + Peak water flow rates: + Saturn V: 1,200,000 L/min (peak) + SLS: 1,700,000 L/min (peak) + Falcon 9: ~300,000 L/min + Water injected into flame trench and around pad + + Noise reduction mechanism: + Water absorbs acoustic energy (two-phase momentum transfer) + Reduces OASPL by 10-15 dB + Protects vehicle from acoustic damage + Water droplets attenuate high frequencies preferentially + + Water tower: + Elevated tank (gravitational head provides flow) + Volume: 1-4 million liters + Nitrogen pressurization for initial burst (before gravity flow) + + Lightning protection: + Catenary wire system: + Tall towers (3-4, ~100 m height) surrounding pad + Catenary (suspended) wires between towers + Creates Faraday cage over vehicle + Provides preferred lightning strike path + Grounding resistance: <5 Ω + + Bonding: + All pad structures bonded to common ground grid + Vehicle bonded to launch mount + + Environmental control: + Purge air system: + HEPA-filtered, temperature and humidity controlled air + Purges fairing interior (payload environment) + Purges interstage and engine compartment + Flow rate: 1,000-5,000 m³/h + Prevents condensation, maintains cleanliness + +Propellant farm: + LOX storage: + Vacuum-jacketed tank (similar to Dewar flask) + Double-walled: + Inner tank: stainless steel (304L or 9% Ni steel) + Outer jacket: carbon steel + Annulus: vacuum + perlite insulation + Volume: 100-5,000 m³ + Boil-off rate: 0.1-0.3% per day + Pressure: 1-5 bar(g) + + LH2 storage: + Vacuum-jacketed perlite-insulated spherical tank + Inner sphere: stainless steel (304L) + Outer sphere: carbon steel + Vacuum + perlite powder in annulus + Typical volume: 3,200 m³ (~850,000 gallons) + Boil-off rate: 0.3-0.5% per day + + Boil-off compressor: + Compresses boil-off H₂ gas + Either re-liquefies or vents/flares + Reliquefier: GHe Brayton cycle refrigerator (20 K) + + LN2 storage: + Used for: + Purge gas (inerting lines and tanks) + Precooling LOX/LH2 transfer lines + Thermal shield in LH2 tank annulus + + Propellant transfer: + Vacuum-jacketed transfer lines (cryo) + Pump or pressure-fed + Flow control valves (pneumatic or electric actuated) + Filters (5-10 μm absolute) + Flow meters (Coriolis or turbine) + +Umbilical tower: + Tail Service Mast (TSM): + Located at base of vehicle + Connections: + Propellant fill/drain lines + Pneumatic (helium, nitrogen) lines + Electrical power (28 VDC, 400 Hz AC) + Data (Ethernet, telemetry coax, fiber optic) + Quick disconnect couplings: + Poppet valves (spring-loaded) + Automatically close on disconnect + Prevent propellant spillage + + Swing arms: + Retractable arms at multiple levels + Provide access to vehicle at various heights + Retract 2-5 seconds before liftoff + Fallback: spring-actuated retraction (fail-safe) + + Umbilical connections carried on each arm: + Purge gas supply + Electrical power and data + Air conditioning duct (crew access arm) + Propellant vent lines + Hazardous gas detection sensors + +Range safety: + Radar tracking: + C-band (5.4-5.9 GHz) skin track radar + Precision: range <5 m, angle <0.1 mil + Update rate: 10-20 Hz + Multiple radars for triangulation + Provides real-time position/velocity to RSO + + Telemetry (TM) antennas: + Dish arrays (2-6 m diameter) + Auto-tracking (monopulse tracking feed) + S-band receive (2.2-2.4 GHz) + Diversity combining (multiple antennas reduce data dropouts) + + Optical tracking: + KTM (Kinetic Tracking Mount) telescopes + High-speed cameras (500-1,000 fps) + Provide visual tracking of vehicle + Used for post-flight anomaly investigation + Trajectory reconstruction via triangulation from multiple sites + + Downrange tracking stations: + Ground stations or ships along flight path + Receive telemetry, track vehicle + Maintain FTS command link capability + Airborne: NASA WB-57 or similar high-altitude aircraft +``` + +--- + +### 8. Recovery & Reuse + +**Priority**: P1 + +#### 8.1 Reentry TPS, Landing Burn, Fairing Recovery, and Refurbishment + +``` +Reentry and landing: + Reusable first stages perform a boostback burn (optional), reentry burn, + and landing burn to return to launch site or land on autonomous drone ship. + + Reentry Thermal Protection (TPS): + PICA (Phenolic Impregnated Carbon Ablator): + Carbon fiber substrate (FiberForm) impregnated with phenolic resin + Density: 0.27-0.45 g/cm³ + Ablation mechanism: pyrolysis, char formation, surface recession + Peak heat flux capability: >1,000 W/cm² + Used in: SpaceX Dragon, Stardust sample return capsule + + TUFROC (Toughened Uni-piece Fibrous Refractory Oxidation-resistant Ceramic): + Two-layer: high-temperature carbon cap + lower-T insulating base + Integrated manufacturing (no bondline) + Used in: X-37B, some booster applications + + Reentry environment: + Peak heating at ~40-60 km altitude (hypersonic) + Total heat load [J/m²]: Q = ∫q_dot(t) dt + Surface temperature: 1,000-2,000 K (depends on entry velocity) + + Grid fins: + Titanium casting: + Ti-6Al-4V investment casting + Dimensions: ~1.2 m × 1.5 m (Falcon 9) + Lattice grid pattern: provides control authority + Deploy after stage separation (stowed against stage during ascent) + + Aerodynamic control: + Hinge axis perpendicular to flow + Pitch, yaw, roll control via differential grid fin deflection + Control authority: C_mδ ≈ 0.01-0.03 per degree at supersonic + + Cold gas RCS (Reaction Control System): + Nitrogen cold gas thrusters + Thrust: 100-500 N per thruster + Used for attitude control during coast phase and reentry + I_sp: 65-75 s (cold gas) + Stored at 200-400 bar in COPV + + Landing burn: + Single engine or multi-engine: + Merlin 1D throttled to 40-57% (depending on variant) + Landing burn: ~30 seconds duration + Deceleration from ~2,000 m/s (entry) to ~0 m/s at touchdown + + Guidance for landing: + Powered descent guidance: + Targets landing pad coordinates + Constraint: velocity = 0 at altitude = 0 + Uses convex optimization (lossless convexification) or + successive convexification for real-time trajectory generation + + Deployable landing legs: + Aluminum honeycomb crush core: + Absorbs landing energy via plastic deformation + Crush force constant over stroke length + Stroke: 300-500 mm + Energy absorption: 50-200 kJ per leg + + Leg deployment: + Pneumatic or pyrotechnic actuation + Deploy time: 2-5 seconds + Lock in deployed position + + Touchdown dynamics: + Vertical velocity: 2-5 m/s at contact + Horizontal drift: <1 m/s (controlled) + Leg loads: 100-500 kN peak (per leg) + + ASDS (Autonomous Spaceport Drone Ship): + Dynamic positioning (DP): + Azimuth thrusters (2-4) + GPS position hold within ±3 m + Maintain station in sea states up to significant wave height 3-4 m + Deck size: ~70 m × 50 m (approx.) + Landing target precision: <10 m from target center + Octagrabber robot: secures rocket after landing + +Fairing recovery: + Parafoil descent: + GPS-guided steerable parafoil + Deployed after fairing half separates and re-enters + Descent rate: 5-15 m/s + Parafoil area: 50-100 m² + + Mid-air capture: + Helicopter with capture hook + Catches parafoil before fairing touches seawater + Prevents saltwater contamination + Requires precise helicopter positioning and timing + + Catch net ship: + Ship with large net structure + Fairing descends into net on parafoil + Alternative to mid-air capture (lower operational complexity) + Examples: Ms. Tree, Ms. Chief (SpaceX) + +Refurbishment: + Engine inspection and servicing: + Visual borescope inspection: + Turbine blades, combustion chamber, injector face + Check for cracking, erosion, hot spots + Static fire acceptance test: + Short-duration firing to verify engine health + All engines fired individually or together + Performance compared to baseline + Replace consumables: + TEA-TEB ignition fluid ampoules + Helium COPV (if depleted or nearing end of life) + + Leg retraction: + Hydraulic/pneumatic retraction mechanism + Crush core inspection: replaced if activated (decel > threshold) + Leg lock mechanism check + + Grid fin servicing: + Check for deformation, cracks + Bearing/bushing wear inspection + Actuator functional test + + TPS (Thermal Protection System): + Visual inspection of base heat shield + Replace damaged TPS tiles/sheets + Reapply ablative coating on engine bay (if applicable) + Re-waterproof (some TPS absorbs moisture) + + Overall re-flight flow: + Stage returned to port → transported to hangar + Inspection (1-2 weeks) + Refurbishment actions (variable, 1-8 weeks) + Integration with new upper stage and payload + Pre-launch checkout and static fire + Ready for re-flight +``` + +#### 8.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class TPS_Material { PICA_Ablator, TUFROC, AVCOAT, Shuttle_Tile, Cork_Ablator }; +enum class LandingLocation { RTLS_ReturnToLaunchSite, ASDS_DroneShip, Expendable }; + +struct ReentryTPSSpec { + TPS_Material material; + double thickness_mm; + double density_g_per_cm3; + double max_heat_flux_W_per_cm2; + double recession_rate_mm_per_kJ; + double surface_area_m2; + double mass_kg; +}; + +struct GridFinSpec { + int fin_count; // typically 4 + double span_m; + double chord_m; + std::string material; // "Ti-6Al-4V investment cast" + double max_deflection_deg; + double actuator_rate_deg_per_s; + double control_authority_Cm_per_deg; + double mass_per_fin_kg; +}; + +struct LandingLegSpec { + int leg_count; + double deployed_length_m; + double stroke_mm; + std::string crush_core_type; // "Al honeycomb crush core" + double crush_force_kN; + double energy_absorption_per_leg_kJ; + std::string deployment_mechanism; // "pneumatic", "pyro" + double deploy_time_s; + double mass_per_leg_kg; +}; + +struct RecoverySpec { + bool boostback_burn; + double boostback_duration_s; + bool reentry_burn; + double reentry_burn_duration_s; + bool landing_burn; + double landing_burn_duration_s; + LandingLocation landing_location; + int landing_engines; + double landing_throttle_pct; + + ReentryTPSSpec tps; + GridFinSpec grid_fins; + LandingLegSpec landing_legs; + bool cold_gas_rcs; + double rcs_thrust_N; + double rcs_isp_s; + + bool fairing_recovery; + std::string fairing_recovery_method; // "Mid-air capture", "Catch net ship" + double parafoil_area_m2; + double fairing_descent_rate_mps; + + double landing_precision_m; // CEP from target + double asds_position_hold_accuracy_m; +}; + +struct RefurbishmentSpec { + bool visual_borescope_engine; + bool static_fire_acceptance; + double static_fire_duration_s; + bool leg_crush_core_replace; + bool tps_repair; + bool grid_fin_servicing; + bool teb_teb_replenish; + double total_refurbishment_days; + double refurbishment_cost_percent_of_new; + int max_reflight_count; // design life +}; + +struct RecoveryState { + int current_flight_number; + double cumulative_engine_burn_time_s; + int landings_attempted; + int landings_successful; + bool fairing_recovered; + bool tps_inspected; + bool ready_for_reflight; +}; + +struct RecoveryPerformance { + double landing_success_rate_pct; + double average_landing_accuracy_m; + double refurbishment_turnaround_days; + double reuse_cost_savings_pct_vs_new; + int flights_this_core; + double remaining_life_estimate_flights; +}; +``` + +--- + +## C++ API Namespace Summary + +| Namespace | Header | Primary Types | +|-----------|--------|---------------| +| `vde::space_launch` | `vde/space_launch/launch_vehicle.h` | `LaunchVehicleStructureSpec`, `TankSpec`, `InterstageSpec`, `PayloadAdapterSpec`, `GridStiffenedPanelSpec`, `EngineSpec`, `ThrustChamberSpec`, `InjectorSpec`, `TurbopumpSpec`, `SRM_Spec`, `SRM_CaseSpec`, `GrainSpec`, `SRM_NozzleSpec` | +| `vde::space_launch` | `vde/space_launch/payload_fairing.h` | `FairingSpec`, `PayloadSpec`, `PayloadSeparationSpec`, `PayloadEnvironmentSpec`, `DualLaunchAdapterSpec` | +| `vde::space_launch` | `vde/space_launch/integration_test.h` | `AIT_Spec`, `IntegrationSpec`, `ModalGVTSpec`, `StaticFireTestSpec`, `PropellantLoadingSpec`, `GNCSpec`, `IMU_Spec`, `GuidanceSpec`, `ControlSpec`, `FTS_Spec`, `RecoverySpec`, `ReentryTPSSpec`, `GridFinSpec`, `LandingLegSpec`, `RefurbishmentSpec` | + +--- + +## Industry Standards & References + +| Standard | Title | Relevance | +|---|---|---| +| MIL-STD-1540 | Test Requirements for Space Vehicles | Environmental and acceptance testing of launch vehicles and spacecraft | +| NASA-STD-5017 | Design and Development Requirements for Mechanisms | Fracture control, separation mechanisms, deployment systems | +| GEVS GSFC-STD-7000B | General Environmental Verification Standard | Vibration, acoustic, thermal, and EMC/EMI testing | +| AFSPCMAN 91-710 | Range Safety User Requirements Manual | Flight termination system, range safety criteria | +| FAA 14 CFR Part 417 | Launch Safety | US commercial launch safety regulations | +| FAA 14 CFR Part 450 | Launch and Reentry License Requirements | Streamlined Part 450 launch licensing | +| ECSS-E-ST-32-10C | Structural factors of safety for spaceflight hardware | European structural design factors | +| ECSS-E-ST-35C | Propulsion general requirements | European liquid/solid propulsion standards | +| ISO 14620-1 | Space systems — Safety requirements — Part 1: System safety | International space safety standard | +| ISO 24113 | Space debris mitigation requirements | Debris prevention, passivation, disposal | +| MIL-STD-1553 | Digital Time Division Command/Response Multiplex Data Bus | Avionics data bus standard | +| IRIG-106 | Telemetry Standards | Chapter 4: PCM telemetry format, Chapter 10: solid state recorder | +| CCSDS | Consultative Committee for Space Data Systems standards | Packet telemetry, space link protocols | +| NASA-STD-5001 | Structural Design and Test Factors of Safety for Spaceflight Hardware | NASA structural factor of safety | +| AIAA S-114 | Moving Mechanical Assemblies for Space and Launch Vehicles | Mechanisms qualification | +| ESA 1194 / ESA 937 | Payload Adapter Standard | Marman clampband interface definition | +| NPR 8715.3 | NASA General Safety Program Requirements | NASA safety program requirements | + +--- + +## Benchmarks + +| Equipment Type | Benchmark Vendor | Model / System | Key Spec | +|---|---|---|---| +| Launch Vehicle | SpaceX | Falcon 9 v1.2 Full Thrust (Block 5) | 22,800 kg to LEO, reusable first stage, 9× Merlin 1D+, LOX/RP-1 GG, 10+ reflights | +| Launch Vehicle | SpaceX | Falcon Heavy | 63,800 kg to LEO, 3 × Falcon 9 cores, 27 engines, 2× side booster RTLS, center core ASDS | +| Launch Vehicle (In Dev) | SpaceX | Starship / Super Heavy | 100-150 t to LEO (fully reusable), 33× Raptor 2 on SH, 6× Raptor on SS, LOX/CH4 FFSC | +| LRE — GG | SpaceX | Merlin 1D+ | 845 kN SL thrust, LOX/RP-1, GG cycle, pintle injector, TEA-TEB ignition, deep throttle 40% | +| LRE — FFSC | SpaceX | Raptor 2 / Raptor 3 | 2,300 kN SL (Raptor 2), 2,700 kN (Raptor 3), LOX/CH4, FFSC, >300 bar P_c, I_sp 327/350s | +| LRE — ORSC | Blue Origin | BE-4 | 2,450 kN SL, LOX/LNG(CH4), ORSC cycle, 130 bar P_c, used on Vulcan/New Glenn | +| LRE — Expander | Blue Origin | BE-3U | 712 kN vac, LOX/LH2, expander bleed cycle, upper stage New Glenn | +| Launch Vehicle | NASA | SLS Block 1/1B | 95 t to LEO (Block 1), 105 t (Block 1B), RS-25 core + SRBs, Orion spacecraft | +| LRE — FRSC | Aerojet Rocketdyne | RS-25 / SSME | 2,280 kN vac, LOX/LH2, FRSC cycle, I_sp 452s vac, reusable (Shuttle/SLS) | +| LRE — Expander | Aerojet Rocketdyne | RL10C-X | 108 kN vac, LOX/LH2, expander cycle, I_sp 460s+, upper stage workhorse | +| Launch Vehicle | ULA | Atlas V | 8-20 t to LEO, RD-180 engine (LOX/RP-1 ORSC), Centaur upper stage RL10 | +| Launch Vehicle | ULA | Vulcan Centaur | 27 t to LEO, BE-4 first stage engines, Centaur V upper, GEM 63XL SRMs | +| LRE — ORSC | NPO Energomash | RD-180 | 3,830 kN SL, LOX/RP-1, ORSC, dual thrust chamber, 257 bar P_c, I_sp 311/338s | +| LRE — ORSC | NPO Energomash | RD-191 | 1,920 kN SL, single-chamber RD-180 derivative, used on Angara | +| Launch Vehicle | ArianeGroup | Ariane 6 (A62/A64) | 5/10.3 t to GTO (A62: 2 SRB, A64: 4 SRB), Vulcain 2.1 core, Vinci upper, P120C SRM | +| LRE — GG | ArianeGroup | Vulcain 2.1 | 1,370 kN vac, LOX/LH2, GG cycle, I_sp 431s, Ariane 6 core | +| LRE — Expander | ArianeGroup | Vinci | 180 kN vac, LOX/LH2, expander cycle, I_sp 465s, restartable 5×, Ariane 6 upper | +| SRM | Europropulsion | P120C | 4,500 kN avg, 135s burn, C-C throat, flex-seal TVC, Ariane 6/Vega C | +| LRE — Prometheus | ArianeGroup | Prometheus | 1,000 kN, LOX/CH4, GG cycle, low-cost (~€1M target), reusable 5+ flights | +| Launch Vehicle | Rocket Lab | Electron | 300 kg to LEO, 9× Rutherford pump-fed electric turbopump LOX/RP-1 engines | +| Launch Vehicle (In Dev) | Rocket Lab | Neutron | 8-15 t to LEO, Archimedes LOX/CH4 GG engine, reusable fairing (captive design) | +| Solid Motor | Northrop Grumman | GEM 63 / GEM 63XL | Graphite Epoxy Motor, CF filament wound case, HTPB propellant, used on Atlas V/Vulcan | +| Solid Booster | Northrop Grumman | SLS 5-segment RSRMV | 16,000 kN thrust, Shuttle-derived 5-segment SRB, SLS Block 1 | +| Launch Vehicle | JAXA / MHI | H3 | 4-7.9 t to GTO, LE-9 expander bleed cycle (LOX/LH2), SRB-3 solids | +| LRE — Expander | MHI | LE-9 | 1,471 kN vac, LOX/LH2, expander bleed cycle, I_sp 425s, H3 core | +| Launch Vehicle | ISRO | LVM3 (GSLV Mk III) | 4-10 t to LEO, 2× S200 solid boosters, L110 liquid core (Vikas), C25 cryo upper (CE-20) | +| Cryo Engine | ISRO | CE-20 | 200 kN, LOX/LH2, GG cycle, I_sp 443s, upper stage LVM3 | +| Launch Vehicle | CASC / CALT | Long March 5/5B (CZ-5) | 25 t to LEO (5B), 14 t to GTO (5), YF-77 LOX/LH2 core + YF-100 LOX/RP-1 boosters | +| Launch Vehicle | CASC | Long March 8 (CZ-8) | 5 t to SSO, reusable first stage concept, YF-100 engines | +| GNC / Avionics | Various | IMU (RLG/FOG/HRG) | 0.001-0.1°/hr bias stability, quartz flex accel 10-100 μg | +| Payload Fairing | RUAG Space / Beyond Gravity | 5.4m fairing for Atlas V / Vulcan / Ariane | CFRP sandwich, OASPL attenuation >12dB, OoA (Out of Autoclave) manufacturing | +| Launch Site | NASA KSC | LC-39A / LC-39B | Pad, flame trench, water deluge, lightning towers, VAB, MLP, crawler | +| Launch Site | CCSFS / VSFB | SLC-40 / SLC-4E | Falcon 9 launch complex, horizontal integration, transporter-erector | +| Launch Site | CSG (Guiana Space Center) | ELA-4 (Ariane 6) | Mobile gantry (vertical integration), cryo propellant farm, downrange tracking | + +--- + +## Acceptance Criteria + +1. **Launch Vehicle Structure (必选):** Engine shall design propellant tanks with isogrid/orthogrid machined Al-Li 2195/2219 panels. Grid buckling analysis (skin buckling σ_cr_skin and rib crippling) shall be performed. FSW friction stir welding with joint efficiency > 0.95 shall be modeled. Common bulkhead design with Y-ring interface shall be supported. Helium pressurization (ullage pressure > P_NPSH + P_vapor + ΔP + margin) and POGO accumulator (tuned to damp structural resonance) shall be integrated. Payload adapter with Marman clampband (ESA 1194/937) and separation system (ΔV, tip-off rate <5°/s, >6σ clearance) shall be verified. + +2. **Liquid Rocket Engine (必选):** Engine shall design thrust chamber with regenerative cooling (Bartz correlation hot-gas side, Dittus-Boelter coolant side). Injector types (coaxial shear, impinging doublet/triplet, pintle) with momentum flux ratio and pressure drop shall be selectable. Turbopump with axial inducer, centrifugal impeller, cryogenic bearings (hydrostatic/Si₃N₄ ball), and turbine (impulse/reaction) shall be designed. Engine cycles (GG, ORSC, FRSC, expander) with configurable preburner split and turbine exhaust routing shall be modeled. Ignition (TEA-TEB pyrophoric, torch igniter, solid cartridge) and TVC (hydraulic gimbal/EMA) shall be specified. Specific impulse I_sp > 450s (LOX/H2 vacuum) shall be achievable. + +3. **Solid Rocket Motor (必选):** Engine shall design SRM case (CF filament winding, EPDM insulation, stress rupture), propellant grain geometry (center-perforated, star, wagon wheel, finocyl, end-burning) with burn surface evolution, nozzle (C-C throat with ablation erosion, carbon-phenolic exit cone, flex-seal omniaxis TVC), and igniter (pyrogen with S&A device). Saint Robert's law burn rate modeling and chamber pressure equilibrium shall be computed. + +4. **GNC Avionics & Flight Software (必选):** Engine shall model IMU (RLG/FOG/HRG with configurable bias <0.01°/hr, quartz flex accelerometer), multi-constellation GNSS with RAIM integrity, guidance (gravity turn atmospheric, PEG/IGM vacuum with v_go targeting), control (gain-scheduled PID with bending notch filters and slosh baffle compensation, actuator rate limit), FTS (autonomous destruct criteria: thrust/attitude/position violation, command destruct uplink), and telemetry (PCM/FM S-band). Navigation filter (IMU+GNSS Kalman) shall be implemented. + +5. **Payload & Fairing Design (必选):** Engine shall design CFRP/honeycomb sandwich fairing (two half-shells), acoustic protection blanket (MLI + foam,--- + +### 2. Liquid Rocket Engine + +**Priority**: P1 + +#### 2.1 Thrust Chamber, Injector, Turbopump, Engine Cycle, and Ignition + +``` +Liquid rocket engine thrust chamber: + The thrust chamber must withstand extreme heat fluxes (>10 MW/m² in throat) + while maintaining structural integrity through regenerative cooling. + +Thrust chamber thermal design: + Regenerative cooling: + Fuel (typically LH₂ or RP-1) flows through cooling channels + machined into the chamber liner before injection + + Heat transfer balance at hot gas wall: + q_conv_hot_gas = q_conduction_wall = q_convection_coolant + + Hot gas side (Bartz correlation): + h_g = (0.026/D_t^0.2) × (μ^0.2×c_p/Pr^0.6) × + (P_c^0.8/c*^0.8) × (D_t/R_c)^0.1 × (A_t/A)^0.9 + Where: + D_t = throat diameter [m] + μ = gas viscosity [Pa·s] + c_p = specific heat [J/(kg·K)] + Pr = Prandtl number + P_c = chamber pressure [Pa] + c* = characteristic velocity [m/s] + R_c = throat radius of curvature [m] + + Coolant side: + h_c = Nu × k_c / D_h + Nu = 0.023 × Re^0.8 × Pr^0.4 (Dittus-Boelter, turbulent) + + Wall temperature T_w [K]: + Must stay below material limits: + Cu-Ag-Zr (NARloy-Z, GRCop-84): < 800 K + Stainless steel (347, Inconel 718): < 1,100 K + C-C composite (nozzle extension): < 3,200 K (radiatively cooled) + + Slotted liner: + Milled axial channels in Cu-Ag-Zr alloy liner + Channel aspect ratio (h/w): 4:1 to 8:1 + Channel width: 1-2 mm + Channel height: 4-12 mm + Land width (between channels): 0.5-1 mm + Outer jacket: electroformed nickel or Inconel (structural closeout) + + Film cooling (supplemental): + ~2-10% of fuel injected as film along wall + Reduces wall heat flux by insulating boundary layer + Reduces specific impulse (fuel not fully combusted) + + Nozzle extension (radiatively cooled): + Upper stage engines benefit from radiatively cooled nozzle + Carbon-Carbon (C-C) composite: + Operating temperature: up to 3,000 K + Density: 1.6-1.8 g/cm³ + Coating: SiC or CVD (chemical vapor deposition) for oxidation protection + Nozzle area ratio ε = A_e/A_t: + Upper stage: 50:1 to 300:1 (vacuum optimized) + Booster stage: 16:1 to 40:1 (sea level optimized) + +Injector design: + Coaxial shear (coax) — LH₂/LOX engines: + Central LOX post: liquid oxygen flows through inner tube + Annular H₂ gap: gaseous hydrogen flows in outer annulus + Mixing: shear layer between coaxial streams + LOX post recess: 0.5-2.0 × LOX post inner diameter + Enhances mixing, affects stability + + Momentum flux ratio: + M_ratio = (ρ×v²)_H2 / (ρ×v²)_LOX + Typical: 2-10 (drives mixing and combustion efficiency) + + Impinging jets (doublet/triplet) — storable propellant: + Like-on-like doublet: two streams of same propellant impinge + Unlike doublet: oxidizer + fuel streams impinge + Fan angle: 30-60° between jet axes + Orifice diameter: 0.3-2.0 mm + Pressure drop: 15-25% of chamber pressure (for stability) + + Pintle injector (TRW design): + Single central injection element + Radial fuel slots + axial oxidizer annulus + Deep throttling capability (10:1 or more) + Used in: Apollo LM descent engine, Merlin 1D, SpaceX SuperDraco + + Pintle opening: + Variable area pintle for throttling + Fuel film on pintle tip → sheets into oxidizer flow + Combustion stabilized by recirculation zones + +Turbopump assembly: + Axial inducer: + Low head-rise, high suction performance stage + Prevents cavitation in main impeller + Blade count: 2-4 helical blades + Tip clearance: 0.2-0.5% of diameter + Head coefficient ψ_inducer ≈ 0.1-0.2 (low but cavitation resistant) + + Suction specific speed S_s: + S_s = N × √Q / NPSH_r^0.75 + Inducer enables S_s > 40,000 (US units) + Without inducer: S_s < 10,000 for centrifugal pump + + Centrifugal impeller: + High head rise per stage + Specific speed N_s: + N_s = N × √Q / H^0.75 + Typical: 500-1,500 (US units) + + Euler turbomachinery equation: + H = (u_2×c_u2 − u_1×c_u1) / g + Where: + u = blade tip speed [m/s] + c_u = tangential component of absolute velocity [m/s] + + Impeller tip speed limited by material strength: + u_tip_max = √(σ_allowable / ρ) ≈ 450-550 m/s (Ti alloy) + + Bearings: + Hydrostatic bearing: + Pressurized fluid film separates shaft and bearing + No metal-to-metal contact at operating speed + Requires clean working fluid (propellant filtered) + + Angular contact ball bearing (cryogenic): + Si₃N₄ (silicon nitride) ceramic balls → lower density, higher stiffness + Cage material: glass-filled PTFE or silver-plated steel + Lubrication: by propellant (LOX/LH2) or grease pack + DN limit (bore diameter mm × rpm): 1.5-2.5 million + Cryogenic operation: thermal contraction must be accommodated + + Turbine: + Impulse turbine: + Pressure drop only in stationary nozzle (nozzle guide vanes) + Buckets (blades) extract kinetic energy + Degree of reaction: 0 (pure impulse) + + Reaction turbine: + Pressure drop in both stator and rotor + Higher efficiency at design point + Degree of reaction: 0.5 (50% in rotor) + + Blade design: + Material: nickel-based superalloy (Inconel 718, Mar-M247) + Directionally solidified or single crystal for highest T capability + Cooling: film/convection cooling if T_gas > material limit + Blade root: fir-tree or dovetail attachment + + Shaft critical speed: + First bending critical speed ω_cr1 [rad/s]: + ω_cr1 = (π/L)² × √(E×I / (ρ×A)) + Must be separated from operating speed range + Margin: ±20% from any operating speed + +Engine cycles: + Gas generator (GG): + Flow split: 3-5% of total propellant to gas generator + GG combustion: fuel-rich (T < 1,000 K, turbine material compatible) + Turbine exhaust: dumped overboard (single nozzle or twin exhaust) + Specific impulse penalty: 3-8 seconds vs. closed cycle + Examples: Merlin 1D, RS-68, Vulcain 2, F-1 + + Oxygen-rich staged combustion (ORSC): + Oxidizer-rich preburner: + ALL oxidizer + portion of fuel → oxidizer-rich hot gas + T_preburner: 600-900 K (oxygen-rich, material compatibility critical) + Hot O₂-rich gas drives turbine + All propellants eventually reach main chamber (closed cycle) + High chamber pressure: 250-300 bar achievable + Examples: RD-180, RD-191, NK-33, BE-4 + + Full-flow staged combustion (FFSC): + Oxidizer-rich preburner → oxidizer turbopump + Fuel-rich preburner → fuel turbopump + Both turbine exhausts → main combustion chamber + Gas-gas injection (both propellants gaseous) → high combustion efficiency + Lower turbine temperatures (full flow = more mass to drive turbines) + Examples: Raptor 2, Integrated Powerhead Demonstrator (IPD) + + Expander cycle: + Fuel heated in regenerative cooling circuit vaporizes + Hot gaseous fuel drives turbine → then injected into chamber + Closed cycle → high I_sp + Chamber pressure limited by heat pickup in cooling jacket + Upper stage engines: RL10, Vinci, LE-5B + + Comparison of cycles: + GG: simplest, lowest cost, low P_c, I_sp penalty + ORSC: highest P_c, high I_sp, metallurgy challenge (O₂-rich) + FFSC: highest theoretical I_sp, most complex, gas-gas injection + Expander: highest I_sp for upper stage, P_c limited by heat transfer + +Ignition: + TEA-TEB (triethylaluminum-triethylborane): + Pyrophoric: ignites spontaneously on contact with oxygen (air or LOX) + TEA: Al(C₂H₅)₃ — hypergolic with O₂ + TEB: B(C₂H₅)₃ — hypergolic with O₂, also with H₂O + Mixture (TEA-TEB 85/15): optimized ignition properties + Stored in pressurized ampoules, injected at startup + Green flash on ignition (boron emission) + Used in: Merlin, MVac, RS-25 (augmented spark igniter) + + Torch igniter: + Spark plug ignites small flow of gaseous O₂ + H₂ + Torch flame (~2,000 K) directed into main injector + Multiple ignition attempts possible (unlike pyrophoric) + Used in: RL10, J-2X, RS-25 (main ignition) + + Solid propellant cartridge: + Small solid propellant grain in igniter body + Electrically initiated + Hot gas/fire directed into main chamber + Single-use (replaceable cartridge) + Used in: large solid boosters, some hypergolic engines + +Thrust vector control (TVC): + Hydraulic gimbal actuator: + Actuator stroke: 50-100 mm + Gimbal angle: ±5-10° + Force capacity: 50-500 kN (large engines) + Hydraulic supply pressure: 3,000-5,000 psi (207-345 bar) + Working fluid: MIL-PRF-83282 or Skydrol (fire-resistant) + + Electromechanical actuator (EMA): + Electric motor + gearbox + ballscrew or rollerscrew + No hydraulic system → reduced mass, no fluid leaks + Peak power: 20-50 kW per actuator + Used in: newer designs (Vulcain 2.1, Prometheus) +``` + +#### 2.2 Proposed API + +```cpp +namespace vde::space_launch { + +enum class EngineCycle { Gas_Generator, Oxygen_Rich_Staged_Combustion, Fuel_Rich_Staged_Combustion, Full_Flow_Staged_Combustion, Expander_Bleed, Expander_Closed, Tap_Off, Pressure_Fed }; +enum class InjectorType { Coaxial_Shear, Impinging_Doublet, Impinging_Triplet, Pintle, Showerhead, Swirl_Coaxial }; +enum class IgnitionType { TEA_TEB_Pyrophoric, Torch_Igniter_Spark, Solid_Propellant_Cartridge, Hypergolic, Laser }; +enum class TVC_Type { Hydraulic_Gimbal, Electromechanical_EMA, Jet_Vane, Differential_Throttle }; +enum class NozzleType { Regeneratively_Cooled, Radiatively_Cooled_C_C, Film_Cooled_Extension, Dump_Cooled }; + +struct ThrustChamberSpec { + double chamber_pressure_bar; // P_c + double chamber_diameter_mm; + double chamber_length_mm; + double characteristic_length_L_star_m; // V_c / A_t + double contraction_ratio; // A_c / A_t + double throat_diameter_mm; + double nozzle_area_ratio; // ε = A_e/A_t + double nozzle_exit_diameter_mm; + NozzleType nozzle_type; + std::string chamber_liner_material; // "Cu-Ag-Zr NARloy-Z", "GRCop-84" + double liner_channel_count; + double channel_width_mm; + double channel_height_mm; + double wall_max_temperature_K; + double film_cooling_flow_pct; + bool radiatively_cooled_nozzle; + std::string nozzle_material; // "C-C composite", "C-103 Nb alloy" +}; + +struct InjectorSpec { + InjectorType type; + int element_count; + double oxidizer_orifice_diameter_mm; + double fuel_orifice_diameter_mm; + double pressure_drop_oxidizer_pct; // % of P_c + double pressure_drop_fuel_pct; + double momentum_flux_ratio; + double mixture_ratio_design; // O/F + double lox_post_recess_ratio; // for coax injector + double pintle_diameter_mm; // for pintle injector + bool face_cooling; // porous faceplate or film +}; + +struct TurbopumpSpec { + double oxidizer_pump_power_kW; + double fuel_pump_power_kW; + double pump_speed_rpm; + double inducer_tip_diameter_mm; + double impeller_tip_diameter_mm; + double impeller_tip_speed_mps; + std::string impeller_material; // "Ti-6Al-4V", "Inconel 718" + bool inducer_installed; + double NPSH_required_m; + double suction_specific_speed; + std::string bearing_type; // "Hydrostatic", "Si3N4 ball bearing" + double bearing_DN_limit; + + double turbine_power_kW; + double turbine_inlet_temperature_K; + double turbine_inlet_pressure_bar; + double turbine_pressure_ratio; + double turbine_efficiency_pct; + std::string turbine_blade_material; // "Inconel 718", "Mar-M247 DS" + bool cooled_blades; + double shaft_critical_speed_rpm; + double shaft_bending_margin_pct; // vs. operating speed +}; + +struct EngineSpec { + std::string designation; // "Merlin 1D+", "Raptor 3", "RS-25", "BE-4" + EngineCycle cycle; + std::string propellant_combination; // "LOX/LH2", "LOX/RP-1", "LOX/CH4" + double vacuum_thrust_kN; + double sea_level_thrust_kN; + double vacuum_specific_impulse_s; + double sea_level_specific_impulse_s; + double chamber_pressure_bar; + double mixture_ratio_O_F; // oxidizer to fuel ratio + double total_mass_flow_kg_per_s; + double throttling_range_pct; // e.g., 40-100% + + ThrustChamberSpec thrust_chamber; + InjectorSpec injector; + TurbopumpSpec turbopump; + + IgnitionType ignition; + double teb_teb_mass_per_start_kg; + double start_transient_time_s; + double shutdown_transient_time_s; + + TVC_Type tvc; + double gimbal_angle_max_deg; + int tvc_actuator_count; + double tvc_actuator_force_kN; + + double engine_dry_mass_kg; + double thrust_to_weight_ratio; + bool restart_capable; + int design_restarts; + double total_burn_time_s; // per mission +}; + +struct EngineState { + double actual_thrust_kN; + double actual_chamber_pressure_bar; + double actual_specific_impulse_s; + double turbine_speed_rpm; + double turbine_inlet_temperature_K; + double turbopump_bearing_temperature_K; + double chamber_wall_temperature_K; + double cumulative_burn_time_s; + int restart_count; + bool tvc_operational; +}; + +struct EnginePerformance { + double average_Isp_s; + double thrust_std_dev_pct; + double combustion_efficiency_pct; + double nozzle_efficiency_pct; + double c_star_efficiency_pct; // characteristic velocity + double total_impulse_MNs; + double remaining_life_pct; +}; + +EngineSpec design_liquid_rocket_engine(std::string propellants, double target_thrust_kN, EngineCycle cycle, double target_Isp_s); + +EngineState initialize_engine_state(const EngineSpec& spec); + +EnginePerformance simulate_engine_operation(const EngineSpec& spec, EngineState& state, double burn_time_s, double throttle_cmd_pct, double ambient_pressure_bar); + +double calculate_regenerative_cooling(double P_c_bar, double O_F, double D_t_mm, double channel_geometry[], std::string liner_material); + +double calculate_nozzle_exit_pressure(double P_c_bar, double area_ratio, double gamma); + +double calculate_c_star(double T_c_K, double gamma, double M_molecular_weight); + +double calculate_engine_thrust(double m_dot_total, double Isp, double P_e_bar, double A_e_m2, double P_ambient_bar); + +} // namespace vde::space_launch +``` diff --git a/docs/feedback/VDE-1150.md b/docs/feedback/VDE-1150.md new file mode 100644 index 000000000..7a0b2aa87 --- /dev/null +++ b/docs/feedback/VDE-1150.md @@ -0,0 +1,531 @@ +# VDE-1150: Nuclear Facility Equipment Engine Requirements (核设施设备引擎需求) + +**Date**: 2026-08-09 | **Module**: `vde/nuclear_facility/` | **Status**: Closed — Out of Scope (Application-layer domain feature, not a VDE geometry kernel concern. Nuclear facility equipment design is a specialized domain engineering application. VDE provides core geometry building blocks; domain-specific engineering belongs in the ViewDesign application layer. Triaged 2026-08-09 cron.) | **Priority**: P1 +**Category**: Nuclear / Reactor / Safety / Fuel Cycle / Radiation / Decommissioning + +## Background +核设施设备对几何引擎提出了严格的工程需求,涉及反应堆压力容器(RPV)、堆芯燃料组件、一回路主系统、安全壳与专设安全设施、严重事故管理、核燃料循环、辐射防护与退役等核心领域。需要 VDE 提供精确的几何建模能力,支持 ASME BPVC Section III 核级部件设计、热工水力分析接口、燃料循环设备建模等。 + +## 1. Reactor Pressure Vessel (反应堆压力容器) + +反应堆压力容器是核电站最核心的承压设备。筒体采用低合金钢SA-508 Gr.3 Cl.2环锻件,内壁堆焊不锈钢(SS308L/309L)衬里,要求精确的几何建模支持焊接和辐照监督。 + +``` +RPV 筒体结构示意: + ┌────────────────────────────────────────┐ + │ 上封头 (Closure Head) │ + │ ├── CRDM贯穿件 (CRDM Penetration) │ + │ └── 排气口 (Vent) │ + ├────────────────────────────────────────┤ + │ 筒体法兰 (Vessel Flange) │ + │ └── 主螺栓 M170 │ + ├────────────────────────────────────────┤ + │ 筒体段 (Shell Courses) │ + │ ├── 入口接管 (Inlet Nozzle) │ + │ ├── 出口接管 (Outlet Nozzle) │ + │ └── 堆芯活性段 (Core Beltline) │ + ├────────────────────────────────────────┤ + │ 下封头 (Bottom Head) │ + │ └── 堆内测量贯穿 (ICI Penetration) │ + └────────────────────────────────────────┘ +``` + +材质要求: +- Beltline辐照敏感区: RT_NDT (无延性转变参考温度) 随中子注量漂移 +- 辐照监督管 (Surveillance Capsule): 装于堆芯活性区外 +- PTS (Pressurized Thermal Shock): 承压热冲击分析 + +```cpp +namespace vde::nuclear_facility { + +struct RPVSpec { + // 几何参数 + double inner_diameter = 4.0; // 内径 (m) + double shell_thickness = 0.20; // 筒体壁厚 (m) + double clad_thickness = 0.006; // 堆焊层厚度 (m) + int num_shell_courses = 3; // 筒体锻件段数 + + // 材料参数 + double sa_508_yield = 345.0; // SA-508 室温屈服 (MPa) + double sa_508_uts = 550.0; // 抗拉强度 (MPa) + double rt_ndt_initial = -20.0; // 初始RT_NDT (°C) + double rt_ndt_shift_rate = 0.3; // 辐照脆化速率 (°C/年) + + // 接管参数 + struct Nozzle { + double diameter = 0.75; // 接管内径 (m) + double thickness = 0.08; // 接管壁厚 (m) + double elevation = 20.0; // 接管标高 (m) + double azimuth = 0; // 方位角 (deg) + }; + std::vector nozzles; + + // CRDM + struct CRDMSpec { + int num_penetrations = 61; // 贯穿件数量 + double penetration_diameter = 0.08; + double scram_time = 2.5; // 紧急停堆时间 (s) + bool latch_type = true; // 棘爪式 + } crdm; + + // 法兰主螺栓 + struct StudBolt { + int count = 54; + double diameter = 0.170; // M170 + double preload = 6500; // 预紧力 (kN) + } bolts; +}; + +} // namespace vde::nuclear_facility +``` + +## 2. Fuel Assembly & Core Design (堆芯燃料设计) + +PWR堆芯燃料组件是核反应堆的核心,通常采用17×17排列,含264根燃料棒、24根控制棒导向管和1根中子测量管。 + +``` +17×17 PWR Fuel Assembly: + ┌─────────────────────────────┐ + │ ╔═════════════════════════╗ │ + │ ║ G G G G ○ G G G ○ G G G ║ │ ── 上管座Nozzle + │ ║ G G G ○ G G G ○ G G G G ║ │ + │ ║ G G ○ R R R R R R R ○ G ║ │ ── 定位格架Grid (8-11层) + │ ║ G ○ R R R R R R R R ○ G ║ │ 带混流翼Mixing Vane + │ ║ ○ G ... (fuel rods) ║ │ + │ ╚═════════════════════════╝ │ + └─────────────────────────────┘ + G=Guide Thimble R=Fuel Rod ○=Instrument Tube + +燃料棒 (Fuel Rod): + 外径 9.5mm | 包壳厚 0.57mm + UO₂芯块: Φ8.19mm × 10mm (碟形+倒角) + 氦气加压: 2-3 MPa + 弹簧压紧 +``` + +热工水力关键参数: +- MDNBR (最小偏离泡核沸腾比) ≥ 1.33 (W-3关系式) +- LOCA PCT (大破口失水事故峰值包壳温度) < 1204°C +- 子通道分析: 质量流速 G、空泡份额 α、压降 ΔP + +```cpp +struct FuelRodSpec { + double od = 9.5e-3; // 外径 (m) + double cladding_thickness = 0.57e-3;// 包壳壁厚 (m) + double pellet_diameter = 8.19e-3; // 芯块直径 (m) + double pellet_length = 10.0e-3; // 芯块长度 (m) + double dish_depth = 0.3e-3; // 碟形深度 (m) + double plenum_length = 0.18; // 气腔长度 (m) + double helium_pressure = 2.5; // 氦气充压 (MPa) + double pellet_density_pct = 95.0; // 芯块致密度 (%) + + enum CladdingMaterial { + Zircaloy_4, // 传统锆-4 + M5, // 新一代锆合金 + ZIRLO, // 高性能锆合金 + FeCrAl // 事故容错燃料ATF + } cladding_type = M5; +}; + +struct CoreSpec { + int num_assemblies = 157; // 组件数 + int fuel_assembly_array = 17; // FA排列 (17×17) + double active_height = 4.2; // 活性段高度 (m) + double thermal_power = 3400; // 热功率 (MWth) + + // 富集度分区 + std::vector enrichment_zones = {2.1, 2.6, 3.1, 3.6, 4.4}; + + // 可燃毒物 + struct BurnablePoison { + enum Type { Gadolinia, IFBA, WABA, Erbia }; + Type type = Gadolinia; + double loading_pct; // Gd₂O₃重量百分比 + int poison_rods_per_fa; // 毒物棒数 + } bp; + + // 反应性系数 + double doppler_coeff = -3.5e-5; // Δk/k/°C (多普勒) + double mtc = -3.0e-4; // 慢化剂温度系数 (Δk/k/°C) + double boron_worth = -8.0e-3; // 硼价值 (Δk/k/ppm) +}; +``` + +## 3. Primary Coolant Loop (一回路主系统) + +``` +一回路布置: + ┌──────────────────────────────────┐ + │ ┌─────┐ │ + │ ┌──│ PZR │──┐ │ PZR = 稳压器 + │ │ └─────┘ │ Surge Line │ + │ │ │ (波动管) │ + │ ┌──┴──┐ ┌───┴───┐ │ + │ │ SG-1│ │ RPV │ │ SG = 蒸汽发生器 + │ │U管 │ │ │ │ + │ └──┬──┘ └───┬───┘ │ + │ │ │ │ + │ ┌──┴───────────┴───┐ │ + │ │ 热管段 (Hot Leg)│ RCP-1 │ + │ └──┬───────────┬───┘ │ RCP = 反应堆冷却剂泵 + │ │ ┌──────┐ │ │ + │ └──┤RCP-1 ├─┘ │ + │ └──┬───┘ │ + │ ┌────────┴──────────┐ │ + │ │ 冷管段 (Cold Leg) │ │ + │ └────────────────────┘ │ + └──────────────────────────────────┘ +``` + +```cpp +struct PrimaryLoopSpec { + int num_loops = 4; // 环路数 (2/3/4) + double operating_pressure = 15.5; // 运行压力 (MPa) + double hot_leg_temp = 327.0; // 热管段温度 (°C) + double cold_leg_temp = 292.0; // 冷管段温度 (°C) + + // 反应堆冷却剂泵 + struct RCPSpec { + double power = 6.0; // 电机功率 (MW) + double flow_rate = 25000; // 流量 (m³/h) + double head = 110; // 扬程 (m H₂O) + double flywheel_inertia = 4500;// 飞轮惯量 (kg·m²) + double coastdown_time = 180; // 惰转时间 (s) + double seal_injection_flow = 2.0; // 密封注入流量 (L/min) + } rcp; + + // 蒸汽发生器 + struct SGSpec { + int num_tubes = 5500; // U形管数量 + double tube_od = 19.05e-3; // 管外径 (m) + double tube_wall = 1.09e-3; // 管壁厚 (m) + double tube_material_id = 690; // Inconel 690TT + double tube_pitch = 15.0; // 管排间距 (mm) + double steam_pressure = 6.8; // 出口蒸汽压力 (MPa) + } sg; + + // 稳压器 + struct PZRSpec { + double volume = 50.0; // 容积 (m³) + double spray_flow = 45.0; // 喷淋流量 (t/h) + double heater_kw = 2000; // 电加热器功率 (kW) + } pzr; +}; +``` + +## 4. Containment & Engineered Safety (安全壳与专设安全设施) + +安全壳是防止放射性物质外泄的最后一道屏障,由预应力混凝土 + 钢衬里组成。 + +``` +安全壳系统: + ┌──────────────────────────────────────────────┐ + │ ╭─────╮ │ + │ ← 喷淋管 ← │喷淋│ ← 喷淋管 │ + │ ╰──┬──╯ │ + │ NaOH添加 │ + │ ┌─────────────────────────────────────┐ │ + │ │ 操作层 (Operating Floor) │ │ + │ │ ┌──────────┐ │ │ + │ │ │ 反应堆厂房 │ │ │ + │ │ │ Refueling│ │ │ + │ │ │ Cavity │ │ │ + │ │ └────┬─────┘ │ │ + │ │ ┌─────────┴─────────┐ │ │ + │ │ │ RPV │ │ │ ← 钢安全壳 + │ │ └────────┬──────────┘ │ │ (Steel) + │ │ ┌─────────┴─────────┐ │ │ + │ │ │ 堆腔 (Cavity) │ │ │ + │ └───│ │──────────────┘ │ + │ └───────────────────┘ │ + │ ← 预应力混凝土 (Prestressed Concrete) → │ + └──────────────────────────────────────────────┘ + +ECCS 安注系统: + 安注水箱(Accumulator, N₂加压硼水) + ↓ (6.4MPa 自动注) + 高压安注 HHSI (离心泵, 高扬程) + ↓ + 冷管段注入/热管段注入 + ↓ + 低压安注 LHSI (换料水箱 RWST → 地坑再循环 Sump Recirc) +``` + +```cpp +struct ContainmentSpec { + double design_pressure = 0.42; // 设计压力 (MPa) + double design_temperature = 150.0; // 设计温度 (°C) + double leak_rate_pct_per_day = 0.1; // 日泄漏率 (%/day) + double free_volume = 70000; // 自由容积 (m³) + + enum ContainmentType { + Large_Dry_PCCV, // 大型干式预应力混凝土 + Steel_Sphere, // 钢球型 + BWR_Mark_III // 沸水堆Mark III + } type = Large_Dry_PCCV; + + // 喷淋系统 + struct SpraySystem { + double flow_rate = 1200; // 喷淋流量 (m³/h) + double naoh_concentration = 0.3; // NaOH浓度 (wt%) + int num_rings = 2; // 喷淋环数 + } spray; + + // 氢控制 + struct HydrogenControl { + int num_par_units = 44; // PAR单元数 + double par_capacity = 5.0; // 单PAR氢气处理率 (kg/h) + int num_igniters = 88; // 点火器数量 + } h2_control; +}; + +struct ECCSSpec { + // 蓄压安注 + struct Accumulator { + int num_tanks = 4; + double volume = 40.0; // 容积 (m³) + double nitrogen_pressure = 4.2;// N₂压力 (MPa) + double boron_conc = 2400; // 硼浓度 (ppm) + } accumulators; + + // 高压安注 + struct HHSI { + double pump_head = 1200; // 泵扬程 (m) + double flow_rate = 150; // 流量 (m³/h) + } hhsi; + + // 低压安注/余热排出 + struct LHSI_RHR { + double pump_flow = 800; // 流量 (m³/h) + double heat_exchanger_capacity = 30; // 热交换器容量 (MW) + double sump_water_level_min = 1.5; // 地坑最低水位 (m) + } lhsi_rhr; + + // 应急柴油发电机 + struct EDG { + int num_units = 2; // 台数 + double rating = 6000; // 功率 (kWe) + double start_time = 10.0; // 启动时间 (s) + double fuel_capacity_days = 7; // 燃油容量 (天) + } edg; +}; +``` + +## 5. Severe Accident Management (严重事故管理) + +严重事故(堆芯熔毁)管理设施包括堆内熔融物滞留(IVR)、堆芯捕集器(Core Catcher)和安全壳过滤排放系统(FCVS)。 + +``` +严重事故缓解: + ┌─────────────────┐ + │ 堆芯熔化 │ + │ Corium Pool │ + ├─────────────────┤ + │ 下封头 │ + │ (外部冷却 ERVC) │ ← IVR 策略: 堆腔注水 + │ q" ≤ q"_CHF │ + ├─────────────────┤ + │ 堆坑 Cavity │ + │ ┌─────────────┐ │ + │ │ 牺牲材料 │ │ ← Core Catcher + │ │ Fe₂O₃+ZrO₂ │ │ + │ │ 水冷却通道 │ │ + │ └─────────────┘ │ + └─────────────────┘ + +FCVS 过滤排放系统: + 安全壳大气 → 文丘里洗涤器 → 金属纤维过滤器 + → Ag-沸石碘吸附 → 排放烟囱 + (气溶胶滞留率 > 99.9%, 元素碘滞留率 > 99%) +``` + +```cpp +struct SevereAccidentSpec { + // 堆内熔融物滞留 (IVR) + struct IVR { + double cavity_flooding_level = 12.0; // 堆腔注水高度 (m) + double chf_margin = 1.2; // CHF裕量比 + double vessel_wall_ablation = 0.005; // 容器壁烧蚀 (m) + } ivr; + + // 堆芯捕集器 + struct CoreCatcher { + double spreading_area = 50.0; // 熔融物扩展面积 (m²) + double sacrificial_thickness = 0.5; // 牺牲材料厚度 (m) + double cooling_flow = 100; // 冷却水流量 (kg/s) + } core_catcher; + + // 过滤排放 FCVS + struct FCVS { + double aerosol_retention = 99.9; // 气溶胶滞留率 (%) + double iodine_retention = 99.0; // 碘滞留率 (%) + double venturi_pressure_drop = 15.0; // 文丘里压降 (kPa) + int num_filter_stages = 3; // 过滤级数 + } fcvs; + + // 裂变产物源项 + struct SourceTerm { + double cs137_release = 2.2e16; // Cs-137释放 (Bq) + double i131_release = 3.5e17; // I-131释放 (Bq) + double noble_gas_release = 1.0e18; // 惰性气体释放 (Bq) + } source_term; +}; +``` + +## 6. Fuel Cycle Front End (核燃料循环前端) + +铀矿冶(地浸ISL→黄饼)→转化(UF₆)→浓缩(离心)→燃料组件制造 + +```cpp +struct FuelCycleSpec { + // 地浸开采 ISL + struct ISL { + double wellfield_area = 0.5; // 井场面积 (km²) + int injection_wells = 50; // 注入井数 + int production_wells = 100; // 生产井数 + double uranium_grade = 0.1; // 铀品位 (%) + double recovery_rate = 75.0; // 回收率 (%) + } isl; + + // 铀浓缩 + struct Enrichment { + double product_assay = 4.45; // 产品丰度 (%) + double tails_assay = 0.25; // 尾料丰度 (%) + double swu_per_year = 5000000; // 年分离功 (SWU) + int num_centrifuges = 10000; // 离心机台数 + } enrichment; + + // 燃料制造 + struct FuelFabrication { + double annual_capacity = 1200; // 年产能力 (tHM) + double pellet_sinter_temp = 1750; // 烧结温度 (°C) + double pellet_density_min = 94.5; // 芯块最小密度 (%TD) + } fuel_fab; +}; +``` + +## 7. Spent Fuel & Waste Management (乏燃料与废物管理) + +``` +乏燃料管理流程: + 堆芯卸料 → 乏燃料水池 (湿式储存 SFP) + ├── 硼水冷却 (衰变热去除) + ├── 组件完整性检查 + └── 中期储存 (≥5年) + ↓ + 干式储存 Dry Cask + (Holtec HI-STORM / 自然对流空冷) + ↓ + 后处理 Reprocessing (可选) + (PUREX流程: 剪切→HNO₃溶解→TBP萃取→U/Pu分离) + ↓ + HLW 高放废物 + → 玻璃固化 Vitrification (硼硅玻璃 → 钢容器) + → 地质处置库 Geological Repository +``` + +```cpp +struct SpentFuelSpec { + // 乏燃料池 + struct SpentFuelPool { + double pool_volume = 1500; // 池容量 (m³) + int max_assembly_storage = 1500; // 最大组件储存量 + double boron_concentration = 2500; // 硼浓度 (ppm) + double decay_heat_removal_cap = 15; // 衰变热去除能力 (MW) + double keff_limit = 0.95; // 临界安全限值 + } sfp; + + // 干式储存 + struct DryCask { + int num_cask_positions = 32; // 每罐组件位 + double cask_height = 5.8; // 罐高度 (m) + double cask_diameter = 3.5; // 罐直径 (m) + double max_heat_load = 40; // 最大热负荷 (kW) + } dry_cask; +}; + +struct ReprocessingSpec { + double annual_throughput = 800; // 年处理能力 (tHM) + double uranium_recovery = 99.8; // 铀回收率 (%) + double pu_recovery = 99.5; // 钚回收率 (%) + + // 玻璃固化 + struct Vitrification { + double melter_temp = 1150; // 熔炉温度 (°C) + double glass_density = 2.65; // 玻璃密度 (g/cm³) + double waste_loading = 15.0; // 废物包容量 (wt%) + } vitrification; +}; +``` + +## 8. Radiation Protection & Decommissioning + +```cpp +struct RadProtectionSpec { + // 剂量限值 + double worker_dose_limit = 20; // 工作人员年剂量限值 (mSv) + double public_dose_limit = 1.0; // 公众年剂量限值 (mSv) + + // 屏蔽设计 + struct Shielding { + enum Material { Concrete, Lead, Steel, Water, Borated_PE }; + double concrete_thickness = 1.2; // 混凝土屏蔽厚 (m) + double hvl_co60 = 0.062; // ⁶⁰Co半值层 (m 混凝土) + double neutron_shield_thickness; // 中子屏蔽厚 (m) + } shielding; + + // 退役策略 + struct Decommissioning { + enum Strategy { DECON_Immediate, SAFSTOR_Deferred, ENTOMB }; + Strategy strategy = DECON_Immediate; + double estimated_duration = 15; // 退役周期 (年) + double waste_volume_llw = 5000; // 低放废物体积 (m³) + double waste_volume_ilw = 500; // 中放废物体积 (m³) + } decommissioning; +}; +``` + +## Acceptance Criteria + +| 项目 | 验收标准 | +|------|----------| +| RPV RT_NDT | < 93°C at EOL 60年 | +| 燃料棒破损率 | < 10根/堆芯/循环 | +| 安全壳泄漏率 | < 0.1%/天 (设计压力) | +| LOCA PCT | < 1204°C (1477K) | +| EDG启动带载 | < 10秒 | +| 乏燃料储存临界 | keff < 0.95 | +| PUREX铀回收率 | > 99.8% | +| PUREX钚回收率 | > 99.5% | + +## Industry Standards + +| 标准 | 说明 | +|------|------| +| ASME BPVC Sec.III Div.1 NB | 核级部件设计建造 | +| ASME BPVC Sec.XI | 在役检查 | +| 10 CFR 50 App.K | ECCS评价模型 | +| IAEA SSR-2/1 | 核电厂设计安全 | +| IAEA GSR Part 3 | 辐射防护与辐射源安全 | +| ANSI/ANS-51.1 | 核电厂安全设计准则 | +| WENRA Safety Objectives | 西欧核安全目标 | +| EUR Rev.D | 欧洲用户要求文件 | + +## Benchmarks + +| 厂商/机构 | 产品/系统 | +|-----------|----------| +| Westinghouse | AP1000, APWR, eVinci SMR | +| Framatome/EDF | EPR (Olkiluoto 3/Flamanville 3) | +| KHNP/KEPCO | APR1400 (Barakah/Shin Kori) | +| CNNC/CGN | 华龙一号 HPR1000 | +| GE Hitachi | ABWR, ESBWR, BWRX-300 | +| ROSATOM | VVER-1200 (AES-2006) | +| Doosan Heavy | RPV, Steam Generator 锻件 | +| JCFC/JSW | 大型锻件 | +| Urenco | 气体离心浓缩 | +| Orano/Areva | La Hague后处理, Melox MOX | +| Holtec International | HI-STORM 干式储存 | +| NAC International | MAGNASTOR 干式储存 | +| IAEA | 国际安全标准 | +| US NRC | 10 CFR 50/52/73 法规 |