How lucianopatruno/phasexpert works
PhaseXpert is an iPhone application for traceable thermophysical and phase-property calculations on CO₂-rich mixtures. The principal workflow is entering operating conditions and composition, validating the request, dispatching it through a registered thermodynamic provider, and presenting immutable results with provenance. Users can also save and compare cases, explore phase diagrams and property sweeps, screen streams, estimate impurity reactions, and export reports. The graph follows documented architecture and indexed or excerpted references; unsampled feature internals are represented by their exact source directories.
Main entry points: CalculatorViewModel.swift Calculator UI · ProviderRegistry.swift Provider registry · RootView.swift App navigation · StreamScreeningViewModel.swift Stream screening
Components 26
App and calculation
- App navigation
PhaseXpert/App/RootView.swift - Calculator UI
PhaseXpert/Features/Calculator/CalculatorViewModel.swift - Property formatting
PhaseXpert/Features/Calculator/EngineeringPropertyFormatter.swift
Core domain and validation
- Calculation models
PhaseXpertCore/Sources/PhaseXpertCore/Domain/CalculationModels.swift - Canonical composition
PhaseXpertCore/Sources/PhaseXpertCore/Domain/CanonicalComposition.swift - Request validation
PhaseXpertCore/Sources/PhaseXpertCore/Validation/CalculationValidator.swift - Validation evidence
PhaseXpertCore/Sources/PhaseXpertCore/Validation/ValidationEvidenceEvaluator.swift - CCS capabilities
PhaseXpertCore/Sources/PhaseXpertCore/Providers/AdvancedCCSCapabilityMatrix.swift
Thermodynamic providers
- Provider registry
PhaseXpertCore/Sources/PhaseXpertCore/Providers/ProviderRegistry.swift - Provider contract
PhaseXpertCore/Sources/PhaseXpertCore/Providers/ThermodynamicModelProvider.swift - CoolProp provider
PhaseXpertCore/Sources/PhaseXpertCore/Providers/CoolPropProvider.swift - Native CoolProp engine
PhaseXpertCore/Sources/PhaseXpertCore/Providers/NativeCoolPropEngine.swift - CoolProp bridge
Native/CoolPropBridge/src/PhaseXpertCoolPropBridge.cpp - teqp provider
PhaseXpertCore/Sources/PhaseXpertCore/Providers/TeqpProvider.swift - Native teqp engine
PhaseXpertCore/Sources/PhaseXpertCore/Providers/NativeTeqpEngine.swift - teqp bridge
Native/TeqpBridge/src/PhaseXpertTeqpBridge.cpp
Engineering analysis
- Phase diagrams
PhaseXpert/Features/PhaseDiagram/PhaseDiagramView.swift - Phase-map orchestration
PhaseXpertCore/Sources/PhaseXpertCore/Orchestration/PhaseMap.swift - Property sweeps
PhaseXpert/Features/PropertySweep/MultiCasePropertySweep.swift - Stream screening
PhaseXpert/Features/StreamScreening/StreamScreeningViewModel.swift - Stream mixing
PhaseXpertCore/Sources/PhaseXpertCore/Orchestration/StreamMixing.swift - Impurity reactions
PhaseXpertCore/Sources/PhaseXpertCore/Orchestration/ImpurityReactions.swift
Cases and exports
- Saved cases
PhaseXpert/Features/SavedCases/SavedCasesView.swift - Calculation exports
PhaseXpert/Export/CalculationExport.swift - Case comparison
PhaseXpert/Features/SavedCases/CaseBatchComparison.swift
Other components
- Engineer
Connections 25
- Engineer → App navigation: uses
- App navigation → Calculator UI: opens
PhaseXpert/App/RootView.swift - App navigation → Phase diagrams: opens
PhaseXpert/App/RootView.swift - App navigation → Saved cases: opens
PhaseXpert/App/RootView.swift - Calculator UI → Calculation models: creates request
- Calculator UI → Request validation: validates
- Request validation → Canonical composition: canonicalizes
PhaseXpertCore/Sources/PhaseXpertCore/Domain/CanonicalComposition.swift - Calculator UI → Provider registry: dispatches through
- Provider registry → Provider contract: registers
PhaseXpertCore/Sources/PhaseXpertCore/Providers/ProviderRegistry.swift - CoolProp provider → Provider contract: conforms to
PhaseXpertCore/Sources/PhaseXpertCore/Providers/ProviderRegistry.swift - Provider registry → CoolProp provider: selects
PhaseXpertCore/Sources/PhaseXpertCore/Providers/ProviderRegistry.swift - CoolProp provider → Native CoolProp engine: delegates to
- Native CoolProp engine → CoolProp bridge: calls
PhaseXpertCore/Sources/PhaseXpertCore/Providers/NativeCoolPropEngine.swift - teqp provider → Native teqp engine: delegates to
PhaseXpertCore/Sources/PhaseXpertCore/Providers/NativeTeqpEngine.swift - Native teqp engine → teqp bridge: calls
PhaseXpertCore/Sources/PhaseXpertCore/Providers/NativeTeqpEngine.swift - Validation evidence → CCS capabilities: evaluates
PhaseXpertCore/Sources/PhaseXpertCore/Validation/ValidationEvidenceEvaluator.swift - Phase diagrams → Phase-map orchestration: requests map
- Phase diagrams → Provider registry: uses providers
PhaseXpert/Features/PhaseDiagram/PhaseDiagramView.swift - Property sweeps → Provider registry: uses providers
PhaseXpert/Features/PropertySweep/MultiCasePropertySweep.swift - Stream screening → Stream screening: presents screening
PhaseXpert/Features/StreamScreening/StreamScreeningView.swift - Stream screening → Stream mixing: uses mixing
- Saved cases → Case comparison: compares records
- Saved cases → Calculation exports: exports records
PhaseXpert/Features/SavedCases/SavedCasesView.swift - Calculator UI → Property formatting: formats values
- Impurity reactions → Stream screening: supports screening