{
  "version": 1,
  "topic": "PV06",
  "title": "Calculate gas density with absolute pressure and temperature",
  "createdAt": "2026-10-24",
  "case": {
    "title": "Real Gas Density",
    "premise": "Fixed controls: M_g = 18.82855 lb/lbmol; z = 0.85 dimensionless; R = 10.732 psia ft³/(lbmol °R); T = 600 °R. P is varied as shown.",
    "formula": "rho_g = P M_g / (z R T)",
    "variables": "P: Pressure (psia). M_g: Gas Molecular Weight (lb/lbmol). z: Gas Compressibility Factor (dimensionless). R: Gas Constant (psia ft³/(lbmol °R)). T: Temperature (°R).",
    "steps": [
      {
        "label": "Define the baseline",
        "calculation": "Pressure (psia) = 1000",
        "explanation": "Fixed controls: M_g = 18.82855 lb/lbmol; z = 0.85 dimensionless; R = 10.732 psia ft³/(lbmol °R); T = 600 °R. P is varied as shown."
      },
      {
        "label": "Select the relation",
        "calculation": "rho_g = P M_g / (z R T)",
        "explanation": "P: Pressure (psia). M_g: Gas Molecular Weight (lb/lbmol). z: Gas Compressibility Factor (dimensionless). R: Gas Constant (psia ft³/(lbmol °R)). T: Temperature (°R)."
      },
      {
        "label": "Substitute the values",
        "calculation": "P = 1000; M_g = 18.82855; z = 0.85; R = 10.732; T = 600 → rho_g = 3.44006015 lb/ft³",
        "explanation": "Retain intermediate precision. The displayed values are rounded only after evaluation."
      },
      {
        "label": "Read the result",
        "calculation": "rho_g (lb/ft³) = 3.44006015",
        "explanation": "Z and absolute temperature are held fixed to isolate pressure proportionality."
      }
    ],
    "result": "rho_g (lb/ft³) = 3.44006015",
    "interpretation": "Z and absolute temperature are held fixed to isolate pressure proportionality.",
    "control": "Pressure (psia)",
    "columns": [
      "Pressure (psia)",
      "rho_g (lb/ft³)"
    ],
    "rows": [
      [
        100,
        0.3440060146309735
      ],
      [
        500,
        1.7200300731548677
      ],
      [
        1000,
        3.4400601463097353
      ],
      [
        2000,
        6.880120292619471
      ],
      [
        3000,
        10.320180438929206
      ]
    ],
    "baseline": 2,
    "rowNotes": [
      "Pressure (psia) = 100. rho_g (lb/ft³): 0.344006015.",
      "Pressure (psia) = 500. rho_g (lb/ft³): 1.72003007.",
      "Pressure (psia) = 1000. rho_g (lb/ft³): 3.44006015.",
      "Pressure (psia) = 2000. rho_g (lb/ft³): 6.88012029.",
      "Pressure (psia) = 3000. rho_g (lb/ft³): 10.3201804."
    ],
    "provenance": "Replayed with the same equation record and calculation engine as /calculators/real-gas-density. Original synthetic inputs; engine outputs are saved in the downloadable record.",
    "questions": [
      {
        "question": "Reproduce the baseline rho_g (lb/ft³) without rounding intermediate values.",
        "answer": "P = 1000; M_g = 18.82855; z = 0.85; R = 10.732; T = 600 → rho_g = 3.44006015 lb/ft³. rho_g (lb/ft³) = 3.44006015. Z and absolute temperature are held fixed to isolate pressure proportionality."
      },
      {
        "question": "Compare the first and last recorded scenarios. Which input changes?",
        "answer": "Pressure (psia) changes from 100 to 3000. Other controls remain as stated in the premise. rho_g (lb/ft³) changes from 0.344006015 to 10.3201804."
      },
      {
        "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. P: Pressure (psia). M_g: Gas Molecular Weight (lb/lbmol). z: Gas Compressibility Factor (dimensionless). R: Gas Constant (psia ft³/(lbmol °R)). T: Temperature (°R). Z and absolute temperature are held fixed to isolate pressure proportionality."
      }
    ]
  },
  "recorded": {
    "kind": "scalar",
    "equation": "real-gas-density",
    "parameter": "P",
    "inputs": {
      "P": "3000",
      "M_g": "18.82855",
      "z": "0.85",
      "R": "10.732",
      "T": "600"
    },
    "values": [
      100,
      500,
      1000,
      2000,
      3000
    ],
    "outputs": [
      {
        "expression": "(P * M_g) / (z * R * T)",
        "intermediates": {},
        "inputs": {
          "P": 100,
          "M_g": 18.82855,
          "z": 0.85,
          "R": 10.732,
          "T": 600
        },
        "target": "rho_g",
        "unit": "lb/ft³",
        "value": 0.3440060146309735
      },
      {
        "expression": "(P * M_g) / (z * R * T)",
        "intermediates": {},
        "inputs": {
          "P": 500,
          "M_g": 18.82855,
          "z": 0.85,
          "R": 10.732,
          "T": 600
        },
        "target": "rho_g",
        "unit": "lb/ft³",
        "value": 1.7200300731548677
      },
      {
        "expression": "(P * M_g) / (z * R * T)",
        "intermediates": {},
        "inputs": {
          "P": 1000,
          "M_g": 18.82855,
          "z": 0.85,
          "R": 10.732,
          "T": 600
        },
        "target": "rho_g",
        "unit": "lb/ft³",
        "value": 3.4400601463097353
      },
      {
        "expression": "(P * M_g) / (z * R * T)",
        "intermediates": {},
        "inputs": {
          "P": 2000,
          "M_g": 18.82855,
          "z": 0.85,
          "R": 10.732,
          "T": 600
        },
        "target": "rho_g",
        "unit": "lb/ft³",
        "value": 6.880120292619471
      },
      {
        "expression": "(P * M_g) / (z * R * T)",
        "intermediates": {},
        "inputs": {
          "P": 3000,
          "M_g": 18.82855,
          "z": 0.85,
          "R": 10.732,
          "T": 600
        },
        "target": "rho_g",
        "unit": "lb/ft³",
        "value": 10.320180438929206
      }
    ]
  }
}
