{
  "version": 1,
  "topic": "TH05",
  "title": "Why phase stability is different from solver convergence",
  "createdAt": "2026-10-24",
  "case": {
    "title": "Separate conservation and equilibrium residuals",
    "premise": "Same PR feed and 2 MPa pressure as the EOS comparison; temperature varies among actual two-phase solves.",
    "formula": "component residual = max|zi − (1 − β)xi − βyi|; equilibrium residual = max|ln(fi,L/fi,V)|",
    "variables": "The two errors are dimensionless but measure different conditions. Neither alone establishes experimental accuracy.",
    "steps": [
      {
        "label": "Define the baseline",
        "calculation": "Temperature (K) = 280",
        "explanation": "Same PR feed and 2 MPa pressure as the EOS comparison; temperature varies among actual two-phase solves."
      },
      {
        "label": "Select the relation",
        "calculation": "component residual = max|zi − (1 − β)xi − βyi|; equilibrium residual = max|ln(fi,L/fi,V)|",
        "explanation": "The two errors are dimensionless but measure different conditions. Neither alone establishes experimental accuracy."
      },
      {
        "label": "Substitute the values",
        "calculation": "At 280 K: balance error = 5.55111512e-17; log-fugacity mismatch = 1.86327065e-10",
        "explanation": "Retain intermediate precision. The displayed values are rounded only after evaluation."
      },
      {
        "label": "Read the result",
        "calculation": "Maximum component balance error = 5.55111512e-17; Maximum log-fugacity mismatch = 1.86327065e-10; Relative EOS pressure residual = 8.76188011e-12",
        "explanation": "Inspect stability method, conservation and equilibrium independently. A small residual is numerical evidence for the selected model."
      }
    ],
    "result": "Maximum component balance error = 5.55111512e-17; Maximum log-fugacity mismatch = 1.86327065e-10; Relative EOS pressure residual = 8.76188011e-12",
    "interpretation": "Inspect stability method, conservation and equilibrium independently. A small residual is numerical evidence for the selected model.",
    "control": "Temperature (K)",
    "columns": [
      "Temperature (K)",
      "Maximum component balance error",
      "Maximum log-fugacity mismatch",
      "Relative EOS pressure residual"
    ],
    "rows": [
      [
        240,
        2.949029909160572e-17,
        6.246316797131612e-10,
        1.1935785693140133e-11
      ],
      [
        260,
        5.551115123125783e-17,
        1.7344170544220106e-10,
        1.0192291455268787e-11
      ],
      [
        280,
        5.551115123125783e-17,
        1.8632706488830308e-10,
        8.761880110341735e-12
      ],
      [
        300,
        5.551115123125783e-17,
        7.263132317802956e-10,
        7.569722626499242e-12
      ],
      [
        320,
        2.7755575615628914e-17,
        8.909533111278733e-10,
        6.541656105696347e-12
      ]
    ],
    "baseline": 2,
    "rowNotes": [
      "Temperature (K) = 240. Maximum component balance error: 2.94902991e-17; Maximum log-fugacity mismatch: 6.2463168e-10; Relative EOS pressure residual: 1.19357857e-11.",
      "Temperature (K) = 260. Maximum component balance error: 5.55111512e-17; Maximum log-fugacity mismatch: 1.73441705e-10; Relative EOS pressure residual: 1.01922915e-11.",
      "Temperature (K) = 280. Maximum component balance error: 5.55111512e-17; Maximum log-fugacity mismatch: 1.86327065e-10; Relative EOS pressure residual: 8.76188011e-12.",
      "Temperature (K) = 300. Maximum component balance error: 5.55111512e-17; Maximum log-fugacity mismatch: 7.26313232e-10; Relative EOS pressure residual: 7.56972263e-12.",
      "Temperature (K) = 320. Maximum component balance error: 2.77555756e-17; Maximum log-fugacity mismatch: 8.90953311e-10; Relative EOS pressure residual: 6.54165611e-12."
    ],
    "provenance": "Original synthetic teaching calculation. Equations and fixed controls are stated here; these are not field measurements.",
    "questions": [
      {
        "question": "Reproduce the baseline Maximum component balance error without rounding intermediate values.",
        "answer": "At 280 K: balance error = 5.55111512e-17; log-fugacity mismatch = 1.86327065e-10. Maximum component balance error = 5.55111512e-17. Inspect stability method, conservation and equilibrium independently. A small residual is numerical evidence for the selected model."
      },
      {
        "question": "Compare the first and last recorded scenarios. Which input changes?",
        "answer": "Temperature (K) changes from 240 to 320. Other controls remain as stated in the premise. Maximum component balance error changes from 2.94902991e-17 to 2.77555756e-17."
      },
      {
        "question": "What would be needed to apply this example to a different physical system?",
        "answer": "Replace the synthetic controls with compatible documented inputs and check the relation's assumptions. The two errors are dimensionless but measure different conditions. Neither alone establishes experimental accuracy. Inspect stability method, conservation and equilibrium independently. A small residual is numerical evidence for the selected model."
      }
    ]
  },
  "recorded": null
}
