Ramey Wellbore Liquid Temperature Profile Calculator
Estimate liquid temperature and heat exchange along a wellbore with geothermal gradient, tubing resistance and long-time formation conduction.
Results
Calculate to view linked results. Default values are examples, not recommended operating inputs.
Learn, compare and practice
Worked explanations, controlled studies and printable exercises connected to this calculation.
Calculation sequence
- Set liquid inlet temperature, an undisturbed formation temperature at the same location, and the formation gradient along the direction of flow. A downward injection case normally has positive G; an upward production case normally has negative G. For an inclined straight interval, project the geothermal gradient onto distance along flow before entering it. All temperature inputs are absolute kelvin, while G is a temperature difference per metre.
- Separate wellbore and formation thermal resistance. Enter U based on the tubing inside radius, including the appropriate fluid film, tubing, annulus, casing and completion resistances but not the formation term added here. Set the outer thermal-interface radius consistently; if cement is included in U, this can be the cement outside radius. The tool does not design U or infer completion materials. Synthetic defaults are examples, not recommended heat-transfer coefficients.
- Convert elapsed operating days to seconds, check alpha*t/r_w^2 >= 100, then evaluate the paper's long-time line-source function. The implementation additionally requires at least seven days. These conservative software gates restrict an asymptotic approximation; elapsed time alone does not prove that a particular formation has reached the appropriate thermal regime.
- Evaluate the analytical liquid temperature at 51 stations using cancellation-resistant exponentials. Independently integrate its differential energy balance and compare all stations before accepting output. Net heat gained by the liquid is signed: it may cool near the inlet and heat farther down a warmer formation. The CSV retains local heat to formation per unit length and cumulative net liquid heat gain. U=0 explicitly gives an insulated, constant-temperature liquid.
Worked check
The synthetic case uses liquid at 300 K, inlet formation at 290 K, G=0.03 K/m, 2,000 m of travel, 5 kg/s, cp=4,200 J/(kg.K), r_i=0.03 m, r_w=0.1 m, U=20 W/(m2.K), formation k=2.5 W/(m.K), alpha=0.000001 m2/s and 30 days. Dimensionless time is 259.2. The liquid initially cools toward the colder formation, then warms as the background increases downstream. This is a model demonstration, not a measured well-temperature history.
Synthetic examples for reproducibility, not measured field results.
Assumptions and limitations
- Ramey's approximate single-phase incompressible-liquid case at one fixed operating time, with constant flow rate, heat capacity, U and formation thermal properties. Radial formation conduction and quasi-steady wellbore heat transfer; linear geothermal background along one uniform interval. It does not solve an early-time thermal transient or arbitrary injection/shut-in history.
- No gas/steam, phase change, pressure profile, Joule-Thomson effect, viscosity update, frictional heating, axial conduction, multiple coupled strings, thermal recovery reservoir simulation or hydraulic feedback is included. Verify that the fluid remains liquid at actual local pressure and temperature separately. The thermal and hydraulic workflows are not automatically coupled.
- Software limits: inlet and entire undisturbed formation interval 200-600 K, |G| <= 0.1 K/m, time >= 7 days and tD >= 100, positive conductivity/diffusivity/heat capacity and outer thermal radius greater than tubing inside radius. The line-source expression uses Ramey's rounded constant 0.290; it is not an exact early-time cylindrical solution or a field-accuracy guarantee.
Implemented equations
Long-time radial resistance
Liquid temperature and energy balance
Sources and maintenance
Published by PetroCalcHub Team. Implementation and source checks: . This does not claim independent expert review.
- Ramey (1962), Wellbore Heat Transmission, SPE-96-PA: equations 1-2, long-time line-source expression on printed p.428 and liquid energy balance 12-22 (original paper mirror)
- SPE GEODE (2025), Temperature Modelling in the Well: wellbore energy balance and thermal relaxation context