Skip to content

Scientific Computing, Linear Algebra, Surrogates & Digital Twins ​

Implementation:


1. Davis SuiteSparse Left-Looking Cholesky (LLT) ​

Academic Citations ​

  • Davis, T. A. (2006). Direct Methods for Sparse Linear Systems.
    SIAM. DOI: 10.1137/1.9780898718881
  • Chen, Y., Davis, T. A., Hager, W. W., & Rajamanickam, S. (2008). "Algorithm 887: CHOLMOD, supernodal sparse Cholesky factorization and update/downdate."
    ACM Transactions on Mathematical Software, 35(3), pp. 22:1–22:14. DOI: 10.1145/1462166.1462176

ModelScript Rationale & Modifications ​

Solves symmetric positive-definite sparse systems Ax=b arising in finite element analysis, electrical mesh equations, and quadratic programming subproblems.

  • Modifications: Left-looking column-by-column factorization computing non-zero patterns dynamically via elimination trees; operates inside unmanaged WebAssembly linear memory with zero heap fragmentation.

2. Gilbert-Peierls Left-Looking Sparse LU (PAQ=LU) ​

Academic Citations ​

  • Gilbert, J. R., & Peierls, T. (1988). "An approach to sparse LU factorization based on graph coloring and topological sort."
    International Conference on Supercomputing.
  • Davis, T. A. (2006). Direct Methods for Sparse Linear Systems. SIAM. Chapter 5.

ModelScript Rationale & Modifications ​

Factorizes unsymmetric, highly irregular sparse Jacobians generated by torn physical DAE systems.

  • Modifications: Depth-first search (DFS) topological ordering to find the exact non-zero structure of each column in L and U in time proportional to arithmetic operations; threshold partial pivoting with diagonal preference to preserve physical sparsity.

3. Householder QR with Column Pivoting ​

Academic Citations ​

  • Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations (4th ed.).
    Johns Hopkins University Press.
  • Businger, P., & Golub, G. H. (1965). "Linear least squares solutions by Householder transformations."
    Numerische Mathematik, 7(3), pp. 269–276. DOI: 10.1007/BF01436084

ModelScript Rationale & Modifications ​

Computes numerically stable orthogonal factorizations AP=QR for rank-deficient least-squares calibration and parameter sensitivity studies.


4. Buchberger's Gröbner Basis Engine with Gebauer-Möller Criteria ​

Academic Citations ​

  • Buchberger, B. (1965). An Algorithm for Finding the Basis Elements of the Residue Class Ring of a Zero Dimensional Polynomial Ideal.
    PhD thesis, University of Innsbruck.
  • Gebauer, R., & Möller, H. M. (1988). "On an installation of Buchberger's algorithm."
    Journal of Symbolic Computation, 6(2-3), pp. 275–286. DOI: 10.1016/S0747-7171(88)80048-8
  • Cox, D., Little, J., & O'Shea, D. (2015). Ideals, Varieties, and Algorithms (4th ed.).
    Springer. DOI: 10.1007/978-3-319-16721-3

ModelScript Rationale & Modifications ​

Solves small non-linear algebraic loops analytically to avoid numerical Newton iterations entirely. Computes the Gröbner basis under lexicographic monomial ordering (Lex) to triangularize polynomial systems into univariate root problems.

  • Modifications: Implements the Gebauer-Möller criteria (Bnew and Mnew sets) to eliminate over 90% of redundant S-polynomial reduction checks; operates over exact rational coefficients Q.

5. Proper Orthogonal Decomposition (POD) / Snapshot SVD ​

Academic Citations ​

  • Sirovich, L. (1987). "Turbulence and coherence in Catherine's wheel: Method of snapshots."
    Quarterly of Applied Mathematics, 45(3), pp. 561–571. DOI: 10.1090/qam/910462
  • Berkooz, G., Holmes, P., & Lumley, J. L. (1993). "The proper orthogonal decomposition in the analysis of turbulent flows."
    Annual Review of Fluid Mechanics, 25, pp. 539–575. DOI: 10.1146/annurev.fl.25.010193.002543

ModelScript Rationale & Modifications ​

Extracts reduced-order models (ROM) from massive 3D CFD or FEA simulation field snapshots (N>106 nodes):

u(x,t)≈u¯(x)+∑k=1rak(t)ϕk(x)
  • Modifications: Employs Sirovich's snapshot method to compute eigenvalues of the small M×M temporal correlation matrix (M≪N snapshots), retaining 99% cumulative kinetic energy in ≤16 spatial modes.

6. Buckingham π Dimensional Analysis & Similarity Engine ​

Academic Citations ​

  • Buckingham, E. (1914). "On physically similar systems; illustrations of the use of dimensional equations."
    Physical Review, 4(4), pp. 345–376. DOI: 10.1103/PhysRev.4.345
  • Vaschy, A. (1892). "Sur les lois de similitude en physique."
    Annales Télégraphiques, 19, pp. 25–28.
  • Barenblatt, G. I. (1996). Scaling, Self-Similarity, and Intermediate Asymptotics.
    Cambridge Texts in Applied Mathematics 14. DOI: 10.1017/CBO9781107050242

ModelScript Rationale & Modifications ​

Reduces parameter dimensionality in surrogate modeling by converting raw physical quantities (q1,…,qn) into dimensionless similarity groups (Π1,…,Πn−r):

  • Modifications: Computes the null-space of the 7-dimensional SI unit exponent matrix using exact rational Gaussian elimination with coprime integer exponents; canonical fingerprint matching recognizes standard dimensionless numbers (Reynolds Re, Nusselt Nu, Mach Ma, Froude Fr).

7. Operational Digital Twin Estimation & Prognostics (packages/simulate/src/twin/) ​

Academic Citations ​

  • Rao, C. V., Rawlings, J. B., & Mayne, D. Q. (2003). "Constrained state estimation for nonlinear discrete-time systems: stability and moving horizon approximations."
    IEEE Transactions on Automatic Control, 48(2), pp. 246–258. DOI: 10.1109/TAC.2002.808470
  • Julier, S. J., & Uhlmann, J. K. (2004). "Unscented filtering and nonlinear estimation."
    Proceedings of the IEEE, 92(3), pp. 401–422. DOI: 10.1109/JPROC.2003.823141
  • Page, E. S. (1954). "Continuous inspection schemes."
    Biometrika, 41(1/2), pp. 100–115. DOI: 10.2307/2333009
  • Miner, M. A. (1945). "Cumulative damage in fatigue."
    Journal of Applied Mechanics, 12(3), pp. A159–A164.

ModelScript Architectural Overview ​

Rendering diagram...

1. Moving Horizon Estimation (MHE) over the Linear-Memory DAE Arena (arena-mhe.ts) ​

MovingHorizonEstimator reconciles streaming physical sensor windows (TelemetryWindow over [t−W,t]) against the in-memory DAEBuilder arena by solving a box-constrained trajectory-tracking problem:

minθ,w12∑k=0N−1‖ysim(tk;θ,w)−ymeas(tk)‖22+12∑iλi(θi−θiprior)2+λw2∥w−wprior∥22s.t.θmin≤θ≤θmax,F(x˙,x,y,θ,w,t)=0
  • Joint Physical & Neural Hybrid Calibration: Simultaneously estimates physical DAE parameters θ and embedded ArenaNeuralBlock surrogate weights w inside the same optimization vector.
  • Adjoint-Driven L-BFGS-B: Evaluates exact objective gradients via DaeAdjointSolver (solveDaeAdjoint) and converges in ≤25 quasi-Newton lbfgsbSolve iterations, automatically warm-starting initial states from window boundaries t0.

2. Unscented Kalman Filter (UKF) & Multi-Strategy Parameter Calibration (calibrator.ts, bayesian_calibrator.ts) ​

ModelScript provides two complementary calibration engines for offline test-stand identification and online probabilistic tracking:

  • Joint-State Unscented Kalman Filter (BayesianParameterCalibrator): Augments the continuous state vector x∈RNx with unknown physical parameters θ∈RNp into z=[xT,θT]T∈RNx+Np. Propagates 2L+1 deterministic sigma points (α=10−3,β=2,κ=0) through the nonlinear DAE transition zk+1=faug(zk,uk,Δt) and measurement model yk=haug(zk) (UnscentedKalmanFilter), extracting full posterior covariance Pk|k, 95% confidence intervals (θ^i±1.96σi), and automated Digital Thread hypergraph write-back suggestions.
  • Deterministic & Global Metaheuristic Calibration (ModelicaCalibrator in calibrator.ts): Supports Levenberg-Marquardt (lm) with damped normal equations (JTJ+λI)Δθ=−JTr, Sequential Quadratic Programming (sqp) with BFGS Hessian updates, scalable adjoint lbfgsb, Bayesian MCMC / global evolutionary search (cmaes, de, pso), and two-stage hybrid-cmaes-lm global-to-local polishing.

3. Page-Hinkley / CUSUM Statistical Residual Drift Detection (drift-detector.ts) ​

CusumDriftDetector continuously monitors multi-channel innovation residuals rc(t)=ymeas,c(t)−ytwin,c(t) to detect incipient actuator degradation, sensor bias, or structural drift while rejecting zero-mean Gaussian measurement noise:

  • Two-Sided Sequential Cumulative Sum: Normalizes each channel residual z~c=(rc−μc)/σc with minimum detectable shift slack kc=δc2σc (default δc=1.5σc) and updates positive and negative CUSUM statistics:Sc+(t)=max(0,Sc+(t−1)+z~c(t)−kc),Sc−(t)=max(0,Sc−(t−1)−z~c(t)−kc)
  • Adaptive Burn-In & Severity Classification: Supports empirical baseline calibration (calibrateFromData) and triggers structured DriftEvent alerts when max(Sc+,Sc−)≥hc, classifying severity (low, medium, high, critical) by threshold ratio Sc/hc alongside online shift magnitude estimation.

4. Virtual Sensor Synthesis & Remaining Useful Life (RUL) Prognostics (prognostics.ts) ​

  • Virtual Sensor Synthesis (VirtualSensorSynthesizer): Evaluates unobservable internal physical states (e.g., rotor hotspot temperatures, internal valve spool stresses) at arbitrary timestamps t directly from the continuous DenseHermiteCheckpointTape.
  • Physics-of-Failure Damage Accumulation (RulPredictor): Computes instantaneous degradation rates dDdt under three selectable damage laws:
    1. Arrhenius Thermal Aging: dDdt=Aexp(−EakBT)
    2. Miner's Power-Law / Basquin Fatigue: dDdt=kfatσm
    3. Archard Linear Mechanical Wear: dDdt=kwearσ
  • Probabilistic RUL Quantiles: Given current damage D(t)∈[0,Dcrit] and operational duty-cycle load variability σload, projects log-normal survival quantiles:RULP50=Dcrit−D(t)D˙(σduty),RULP10=RULP50exp⁡(−1.28155σload),RULP90=RULP50exp⁡(+1.28155σload)

Upstream & Downstream Pipeline Connections ​

  • Upstream Inputs:
    • Linear matrix systems from TornBlock and TR-BDF2.
    • 3D CFD and FEA continuum field snapshots from CFD and FEA.
    • Live telemetry streams (CSV, ASAM MDF4, MCAP) and DAEBuilder adjoint sensitivities.
  • Downstream Consumers:
    • Embedded into real-time Modelica plant loops via msx surrogate and operational digital twins.
    • Feeds calibrated posterior parameters and RUL health metrics back into the DigitalThreadHypergraph.
    • Accelerates linear solves across all numerical integrators and optimal control routines.

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy