Nitrogen Volume Calculation for Coiled Tubing N2 Jobs

Worked nitrogen volume calculation from target wellbore volume and downhole conditions to standard gas volume and liquid nitrogen requirement

By Saad Iqbal

Every CT nitrogen lift job starts with the same phone call to the N2 pumping company: how many gallons of liquid nitrogen do we need on location? Guess low and the job stalls with an empty trailer halfway through the lift. Guess high and you’ve paid for a truck load of N2 that never leaves the tank. The honest answer isn’t a guess at all — it’s a nitrogen volume calculation built on the real gas law, because nitrogen compresses far too much at bottomhole pressure and temperature to treat it like an incompressible fluid.

This tutorial works through the compressibility-factor math by hand for a real CT N2 lift job, then automates the whole thing — Z-factor solve included — in Python.

What You’ll Need

  • Target downhole volume: the volume of wellbore (ft³) you need to fill with N2 at bottomhole conditions to achieve the lift
  • Bottomhole pressure (BHP) and bottomhole temperature (BHT), in psia and °R
  • Nitrogen’s critical properties: Tc = 227.2 °R, Pc = 492 psia (these are fixed physical constants for pure N2, not something you look up per job)
  • Python 3 (python.org), no extra libraries required

The worked example below uses a target downhole volume of 500 ft³, BHP of 3,000 psia, and BHT of 150°F (610°R) — a realistic N2 cushion for unloading a mid-depth gas well through coiled tubing.

Wellbore nitrogen cushion diagram showing downhole volume, bottomhole pressure and temperature inputs for nitrogen volume calculation in coiled tubing jobs

Step 1 — Find the Pseudo-Reduced Properties

Because nitrogen is a pure component (not a gas mixture), you use its actual critical temperature and pressure directly — no need for a natural-gas pseudo-critical correlation. Divide your job’s BHP and BHT by those constants:

Ppr = BHP / Pc = 3,000 / 492 = 6.10
Tpr = BHT / Tc = 610 / 227.2 = 2.685

Step 2 — Solve for the Z-Factor

At bottomhole pressure, nitrogen deviates noticeably from an ideal gas, so you need the compressibility factor Z to correct for it. The Dranchuk-Abou-Kassem (DAK) correlation is the industry-standard equation of state for this — it’s implicit in Z, so it’s solved iteratively (the Python function in Step 4 does this in a few lines):

Z = 1 + (A1 + A2/Tpr + A3/Tpr³ + A4/Tpr⁴ + A5/Tpr⁵)ρr + (A6 + A7/Tpr + A8/Tpr²)ρr² − A9(A7/Tpr + A8/Tpr²)ρr⁵ + A10(1 + A11ρr²)(ρr²/Tpr³)exp(−A11ρr²)

where the reduced density ρr = 0.27 × Ppr / (Z × Tpr), and A1 through A11 are the published DAK constants (0.3265, −1.0700, −0.5339, 0.01569, −0.05165, 0.5475, −0.7361, 0.1844, 0.1056, 0.6134, 0.7210). Iterating this at Ppr = 6.10 and Tpr = 2.685 converges to:

Z = 1.055

Pure nitrogen compressibility factor Z chart from Dranchuk Abou-Kassem correlation used in nitrogen volume calculation for coiled tubing jobs

Step 3 — Convert Downhole Volume to Surface Volume

With Z known, the gas formation volume factor Bg tells you how many downhole cubic feet one surface standard cubic foot (scf) of N2 occupies at BHP/BHT (using standard conditions of 14.696 psia and 60°F):

Bg (ft³/scf) = 0.02827 × Z × T(°R) / P(psia)
Bg = 0.02827 × 1.055 × 610 / 3,000 = 0.006065 ft³/scf

Divide your target downhole volume by Bg to get the surface volume you actually need to pump:

scf = V_downhole / Bg = 500 / 0.006065 = 82,434 scf

Nitrogen is trucked to location as liquid, not gas, so convert to gallons of liquid N2 using the standard oilfield expansion ratio of roughly 93 scf of gas per gallon of liquid N2:

gal LN2 = scf / 93 = 82,434 / 93 = ~886 gallons

Worked nitrogen volume calculation from target wellbore volume and downhole conditions to standard gas volume and liquid nitrogen requirement

That’s the number you give the N2 pumping company — with enough margin built in for line fill and pumping inefficiency, which your service company will typically add on top.

Step 4 — Automate It in Python

The DAK Z-factor solve is the one part of this you don’t want to do by hand more than once. Here’s the full calculation, iterative solver included, reproducing the numbers above:

def z_factor_dak(Ppr, Tpr, iters=50):
    """Dranchuk-Abou-Kassem Z-factor, solved by fixed-point iteration."""
    A1, A2, A3, A4, A5 = 0.3265, -1.0700, -0.5339, 0.01569, -0.05165
    A6, A7, A8 = 0.5475, -0.7361, 0.1844
    A9, A10, A11 = 0.1056, 0.6134, 0.7210

    z = 1.0
    for _ in range(iters):
        rho_r = 0.27 * Ppr / (z * Tpr)
        t1 = (A1 + A2/Tpr + A3/Tpr**3 + A4/Tpr**4 + A5/Tpr**5) * rho_r
        t2 = (A6 + A7/Tpr + A8/Tpr**2) * rho_r**2
        t3 = -A9 * (A7/Tpr + A8/Tpr**2) * rho_r**5
        t4 = (A10 * (1 + A11*rho_r**2) * (rho_r**2/Tpr**3)
              * pow(2.71828182845904523536, -A11*rho_r**2))
        z_new = 1 + t1 + t2 + t3 + t4
        z = 0.5*z + 0.5*z_new           # damped update for stable convergence
    return z


def n2_surface_volume(v_downhole_ft3, bhp_psia, bht_degF,
                       tc_n2=227.2, pc_n2=492.0, scf_per_gal=93.0):
    """Surface N2 volume (scf) and liquid N2 (gallons) for a target
    downhole volume at bottomhole pressure/temperature."""
    bht_R = bht_degF + 460
    ppr = bhp_psia / pc_n2
    tpr = bht_R / tc_n2

    z = z_factor_dak(ppr, tpr)
    bg = 0.02827 * z * bht_R / bhp_psia      # ft3/scf

    scf = v_downhole_ft3 / bg
    gal_ln2 = scf / scf_per_gal

    return {
        "ppr": round(ppr, 3),
        "tpr": round(tpr, 3),
        "z_factor": round(z, 4),
        "bg_ft3_per_scf": round(bg, 6),
        "surface_scf": round(scf, 0),
        "liquid_n2_gal": round(gal_ln2, 0),
    }


result = n2_surface_volume(v_downhole_ft3=500, bhp_psia=3000, bht_degF=150)
print(result)
# {'ppr': 6.098, 'tpr': 2.685, 'z_factor': 1.0552,
#  'bg_ft3_per_scf': 0.006065, 'surface_scf': 82434.0,
#  'liquid_n2_gal': 886.0}

Run the function across a range of target volumes and you get the full order-size curve for the job, which scales almost perfectly linearly once Z is fixed:

Python output chart showing liquid nitrogen required versus target downhole gas volume for a coiled tubing nitrogen job

If nitrogen jobs are just one piece of a bigger CT job-design workflow, a library like petropt bundles PVT, hydraulics and multiphase-flow functions alongside gas-compressibility solvers like this one, so you’re not maintaining every correlation yourself.

How Do You Know the Answer Is Right?

  • Z should land above 1.0 at high pressure. Pure nitrogen at pressures above roughly 500 psia and typical wellbore temperatures has Z greater than 1 — meaning it compresses less than an ideal gas would predict, the opposite of hydrocarbon gases in some ranges. If your solved Z is comfortably below 1.0 at BHP above a few thousand psi, double-check your pseudo-reduced properties before trusting the result.
  • Cross-check Ppr and Tpr against the correlation’s valid range. The DAK correlation is validated for 0.2 ≤ Ppr < 30 and 1.0 < Tpr ≤ 3.0. If a job pushes outside that window (very high BHP or unusually low BHT), verify against a published N2 Z-factor chart rather than trusting the correlation blindly.
  • Sanity-check the final gallons number against job history. A typical CT N2 unloading job for a few hundred to a couple thousand feet of cushion usually lands in the hundreds to low thousands of gallons of liquid N2. A result in the tens of thousands of gallons for a modest target volume usually means a units mistake (psia vs psig is the most common one) rather than a real job requirement.

Common Pitfalls

  • psia vs. psig. BHP from a gauge or a gradient survey often comes back in psig. The DAK correlation needs absolute pressure — add 14.7 before you divide by Pc, or your Ppr (and everything downstream of it) will be quietly wrong.
  • °F vs. °R. Bottomhole temperature is almost always reported in °F. Convert to Rankine (°R = °F + 460) before computing Tpr — the Python function above does this for you, but a hand calc will silently give a wrong Z if you forget.
  • The 93 scf/gal conversion is an approximation. It’s the commonly used oilfield rule of thumb for liquid-to-gas N2 expansion at standard conditions, not an exact physical constant — confirm the figure your N2 service company actually bills against, since some use a slightly different reference temperature.

Once you’ve sized the nitrogen job, the other half of the hydraulics picture is coiled tubing friction pressure calculation for the circulating fluid, and if you’re comparing job-design software instead of building your own, see our roundup of AI tools for coiled tubing job design.

Saad Iqbal Avatar

About the author

Saad Iqbal

Petroleum Engineer · Well Intervention & Stimulation Specialist

Saad Iqbal is a petroleum engineer and well intervention and stimulation specialist with more than a decade of field experience in hydraulic fracturing, coiled tubing, CSG, tight sandstone and shale developments. He explores practical AI, automation and data-driven engineering for safer, smarter upstream operations.