/** * CouplingManager — Multi-physics solver orchestration. * * ## Mathematical Formulation * * **Approach**: Sequential (staggered) operator splitting. * * Each timestep, the coupled system is solved by advancing each * domain solver in sequence, with field transfers between them: * * 1. Solve thermal → extract temperature field T * 2. Transfer T → structural (thermal strain: ε_th = α_L·ΔT) * 3. Transfer T → hydraulic (viscosity: μ(T)) * 4. Solve structural → extract stress field σ * 5. Solve hydraulic → extract pressure/flow fields * 6. Transfer flow → thermal (convective HTC update) * 7. Monitor saturation thresholds * * ## Coupling Chains * * Thermal → Structural: thermal strain ε_th = α_L·(T - T_ref) * Thermal → Saturation: phase change detection at T_melt * Thermal → Hydraulic: viscosity μ(T) via Sutherland or table lookup * Hydraulic → Thermal: convective HTC h from flow velocity * Hydraulic → Saturation: overpressure detection * Structural → Saturation: yield point warning (σ_VM > σ_yield) * * ## Field Transfer * * Fields are transferred between solvers via transform functions * registered per coupling chain. The transform maps the source * solver's output field to the target solver's input parameter. * * ## Limitations * * - **Sequential, not iterative**: Each coupling is one-directional per * timestep. No Gauss-Seidel iteration between solvers within a step. * This means strong two-way coupling (e.g., fluid-structure interaction * with large deformations) is not accurately captured. * - **No sub-cycling**: All solvers advance with the same timestep. * - **First-order splitting error**: The sequential approach introduces * O(dt) splitting error even if individual solvers are higher-order. * * ## References * * - Felippa, C.A. et al., "Partitioned analysis of coupled mechanical * systems", Computer Methods in Applied Mechanics and Engineering, * 190(24-25), 3247-3270, 2001 * * @see ThermalSolver — heat equation solver * @see StructuralSolver — linear elastic FEM * @see HydraulicSolver — pipe network solver * @see SaturationManager — threshold monitoring */ import type { ThermalSolver } from './ThermalSolver'; import type { StructuralSolver } from './StructuralSolver'; import type { HydraulicSolver } from './HydraulicSolver'; import { SaturationManager, type SaturationEvent } from './SaturationManager'; export interface FieldCoupling { /** Source solver and field name */ source: { solver: string; field: string; }; /** Target solver and field name */ target: { solver: string; field: string; }; /** Transform function: source value → target value */ transform: (value: number) => number; /** Whether this coupling is active */ enabled?: boolean; } export interface CouplingStats { solverCount: number; couplingCount: number; saturationMonitors: number; totalEvents: number; lastStepMs: number; } export declare class CouplingManager { private solvers; private couplings; private saturationManagers; private lastEvents; private totalEvents; private lastStepMs; /** * Register a solver with a unique name. */ registerSolver(name: string, type: 'thermal' | 'structural' | 'hydraulic', solver: ThermalSolver | StructuralSolver | HydraulicSolver): void; /** * Add a field coupling between two solvers. */ addCoupling(coupling: FieldCoupling): void; /** * Add a saturation monitor on a solver's field. */ addSaturationMonitor(monitor: SaturationManager): void; /** * Step all solvers, transfer coupled fields, check saturation. * * Order: * 1. Step all time-dependent solvers (thermal) * 2. Transfer coupled fields (thermal → structural, etc.) * 3. Re-solve steady-state solvers if inputs changed (structural, hydraulic) * 4. Check saturation thresholds */ step(dt: number): SaturationEvent[]; /** * Transfer a field value from source solver to target solver. */ private transferField; /** * Get a named field from a solver. */ private getField; /** Get events from the last step */ getLastEvents(): SaturationEvent[]; /** Enable/disable a coupling by index */ setCouplingEnabled(index: number, enabled: boolean): void; getStats(): CouplingStats; dispose(): void; } //# sourceMappingURL=CouplingManager.d.ts.map