PO.PVT.Cg.ByDefinition
Description
Calculates gas compressibility, [1/psi].
Syntax
=PO.PVT.Cg.ByDefinition(P, T_degR, SG_gas)Parameters
| Parameter | Description |
|---|---|
| P | Pressure, [psi]. |
| T_degR | Temperature, [degR]. |
| SG_gas | Gas specific gravity, [dimensionless]. |
SI Unit Version
Lambda Name
PO.PVT.Cg.ByDefinition.SIFormula
=LAMBDA(P, T_K, SG_gas, LET(
P_psi, PO.UnitConverter(P, "kPa", "psi"),
T_degR, PO.UnitConverter(T_K, "degK", "degR"),
result_1psi, PO.PVT.Cg.ByDefinition(P_psi, T_degR, SG_gas),
PO.UnitConverter(result_1psi, "1/psi", "1/kPa")))SI Parameters
| Parameter | Unit | Description |
|---|---|---|
P |
kPa | Pressure |
T_K |
degK | Temperature |
SG_gas |
- | Gas specific gravity (air = 1.0) |
How to save as a reusable Excel function
LAMBDA is a built-in Excel feature (Microsoft 365) that lets you create custom functions without VBA. The formula above works as-is when pasted into a cell.
To save a LAMBDA as a reusable named function:
- Go to Formulas → Name Manager → New
- Enter a name, e.g.
PO.PVT.Cg.ByDefinition.SI - In Refers to, paste the LAMBDA formula without the trailing invocation
(...) - Click OK
Now use =PO.PVT.Cg.ByDefinition.SI(...) anywhere in your workbook.