PetroCalcHub
All workflow tools

Coupled Hydrocarbon Thermal and Pressure Profile Calculator

Solve local PR equilibrium, pressure and temperature together with prescribed heat transfer, friction, elevation and changing kinetic energy.

Inputs

Results

Calculate to view linked results. Default values are examples, not recommended operating inputs.

Calculation sequence

  1. Define the uniform pipe, fully specified C1-C6 inlet PT mixture and total mass flow. Phase compositions, mass quality, densities and enthalpy are recalculated locally as pressure and temperature change. Prescribe U on the pipe's inside area, constant surroundings and a Darcy factor; these are closure assumptions, not automatically derived two-phase heat-transfer or friction correlations.
  2. Choose signed inclination: positive uphill, negative downhill, zero horizontal. The homogeneous equilibrium model forces both phases to share one velocity and temperature, but still changes vapor mass fraction and density with local PT equilibrium. It is not the constant-liquid/ideal-gas model used in the simpler pressure-only comparison.
  3. Balance pressure plus phase momentum flux against friction and holdup-weighted gravity. Balance static enthalpy plus mass-weighted kinetic energy against external heat and elevation. Friction converts mechanical to internal energy inside this balance; it must not be counted a second time as external heat. Solve bounded implicit steps and require the pressure/energy Jacobian to remain safely conditioned.
  4. Integrate at 10 and 20 equal intervals, compare coincident stations and reject differences above 0.002 MPa or 0.05 K. Require overall momentum residual below 0.2 Pa and energy residual below 0.02 J/kg. Each returned phase state also passes the independent PR audits. The table retains pressure, temperature, void fraction, velocity, energy and source gradients so the calculation can be reviewed outside the browser.
  5. Calculations run locally in a dedicated WebAssembly worker. The advanced Python/scientific engine is a roughly 33 MB first download, separate from ordinary calculators; it is self-hosted and version pinned. No composition or measurements are sent to a calculation server. Save and file backups retain canonical inputs, while CSV/PDF include returned tables and source notes. The worker is released after idle time and failures never return partial results.

Worked check

For the synthetic horizontal 50 m case at 5 MPa/330 K, D=0.1 m, mass=1 kg/s, surroundings=300 K, U=100 W/(m2.K) and Darcy=0.02, outlet pressure is about 4.999219 MPa and temperature 320.425659 K. A short near-zero pressure drop does not imply zero heat transfer: about 39.1614 kJ/kg is removed.

Synthetic examples for reproducibility, not measured field results.

Assumptions and limitations

  • Six components C1-C6, normal C4-C6, classical PR and all kij=0. No water, isomers, sour gas, heavy fractions, reactions, solids or volume translation. Use the expanded-mixture tools for their explicitly supported alternatives, not by inserting a new species in these fixed feed slots.
  • Every flash trial must remain at 180-450 K and 0.1-10 MPa absolute, with consistent mole fractions summing to one. Near-critical, vanishing-phase or failed closure states are rejected. Single-phase states are not given an invented vapor quality. Independent engine agreement is not experimental validation.
  • Instantaneous equilibrium and the documented steady balance only. No machinery efficiency, transient behavior, separator sizing, phase residence time, mechanical safety approval or claimed field calibration. A rejected or unbracketed root is not extrapolated into an unsupported range.
  • Short uniform interval 0.1-500 m, interior 0.101-9.99 MPa(a), 181-449 K, phase speed <=100 m/s and acceleration determinant >=0.5. HEM no slip; inclination -90 to 90 degrees. No fitted holdup or regime correlation. A failed trial or refinement rejects the entire profile.
  • Constant prescribed U, Darcy factor and surroundings; no transient formation/wall thermal history, changing area, fittings, reactions, water, heavy ends, metastable phase delay or two-way reservoir coupling. Slip calculations require vapor/liquid coexistence with mass quality strictly between 0.001 and 0.999 at every trial; constant C0/drift parameters cannot be extended through a disappearing phase. HEM alone permits single-phase continuation. Numerical closure does not establish a field-valid physical correlation.

Implemented equations

Local phase velocities and transport fluxes

jg=Gwg/ρg,jl=G(1−wg)/ρlα=jgC0(jg+jl)+vdug=jg/α,ul=jl/(1−α)M=G[wgug+(1−wg)ul]E=h+12[wgug2+(1−wg)ul2]\begin{aligned}j_g&=Gw_g/\rho_g,\quad j_l=G(1-w_g)/\rho_l\\\alpha&=\frac{j_g}{C_0(j_g+j_l)+v_d}\\u_g&=j_g/\alpha,\quad u_l=j_l/(1-\alpha)\\\mathcal M&=G[w_gu_g+(1-w_g)u_l]\\E&=h+\tfrac12[w_gu_g^2+(1-w_g)u_l^2]\end{aligned}

Coupled momentum and total-energy balances

d(p+M)ds=−fDG22Dρh−ρhgsin⁡θdEds=πDUm˙(Te−T)−gsin⁡θ\begin{aligned}\frac{d(p+\mathcal M)}{ds}&=-\frac{f_DG^2}{2D\rho_h}-\rho_hg\sin\theta\\\frac{dE}{ds}&=\frac{\pi DU}{\dot m}(T_e-T)-g\sin\theta\end{aligned}

Sources and maintenance

Published by PetroCalcHub Team. Implementation and source checks: . This does not claim independent expert review.

Report a correction

Related tools and references