Downhole Ballistics Simulator

Performance modeling

Sign in
Back to simulator
Methods · Validation · Provenance

Methods & Validation

This page documents every formula, assumption, and constant used by the simulator. Equations are first-order engineering approximations intended for pre-job screening. Validate against lab burn data and site-specific tests before field deployment.

1. Hydrostatic pressure

Standard oilfield formula relating mud weight (in pounds per gallon) and true vertical depth to the column's hydrostatic head.

Phyd=0.052ρmudTVDP_{\text{hyd}} = 0.052 \cdot \rho_{\text{mud}} \cdot \text{TVD}
  • 0.0520.052 = unit-conversion constant (psi·gal·ft⁻¹·lb⁻¹).
  • ρmud\rho_{\text{mud}} in ppg, TVD\text{TVD} in ft, output in psi.
  • Bottomhole pressure: PBH=Phyd+PsurfaceP_{\text{BH}} = P_{\text{hyd}} + P_{\text{surface}}.

2. Bottomhole temperature

Linear geothermal gradient applied from the surface temperature.

TBH=Tsurf+ggeoTVD1000T_{\text{BH}} = T_{\text{surf}} + g_{\text{geo}} \cdot \frac{\text{TVD}}{1000}

Where ggeog_{\text{geo}} is in °F per 1000 ft. Assumes steady-state thermal equilibrium — circulating temperature during the job will be lower; use a circulating-temperature correction for live runs.

3. Composite formulation properties

Mass-fraction weighted averages over normalized component fractions xix_i.

Eform=ixiΔHi(kJ/kg)E_{\text{form}} = \sum_i x_i \cdot \Delta H_i \quad \text{(kJ/kg)}
Gform=ixiGi(mol/kg)G_{\text{form}} = \sum_i x_i \cdot G_i \quad \text{(mol/kg)}
Sform=ixiSi,Tonset=ixiTonset,iS_{\text{form}} = \sum_i x_i \cdot S_i, \qquad T_{\text{onset}} = \sum_i x_i \cdot T_{\text{onset},i}
Tign,min=mini(Tauto,i)T_{\text{ign,min}} = \min_i \left( T_{\text{auto},i} \right)

4. Ignition safety margin

ΔTign=Tign,minTBH ⁣C\Delta T_{\text{ign}} = T_{\text{ign,min}} - T_{\text{BH}}^{\circ\!C}

ΔTign<0\Delta T_{\text{ign}} < 0 ⇒ status = unsafe (premature auto-ignition risk). ΔTign<25C\Delta T_{\text{ign}} < 25^\circ C raises a low-margin warning.

5. Thermal derating

Above the binder onset temperature, performance drops linearly until capped at 60% loss.

Dth=min ⁣(60, max(0, TBH ⁣CTonset)0.6)D_{\text{th}} = \min\!\left( 60,\ \max(0,\ T_{\text{BH}}^{\circ\!C} - T_{\text{onset}}) \cdot 0.6 \right)

6. Confinement boost

Logarithmic gain with bottomhole pressure scaled by the formulation's weighted pressure sensitivity, capped at 35%.

Bconf=min ⁣(35, 8Sformlog10 ⁣(1+PBH1000))B_{\text{conf}} = \min\!\left( 35,\ 8 \cdot S_{\text{form}} \cdot \log_{10}\!\left( 1 + \frac{P_{\text{BH}}}{1000} \right) \right)

The log saturation reflects diminishing returns as fractures pack-off and gas-phase compression dominates beyond ~20 kpsi.

7. Effective performance score

η=clamp ⁣(100Dth+Bconf, 0, 120)\eta = \mathrm{clamp}\!\left( 100 - D_{\text{th}} + B_{\text{conf}},\ 0,\ 120 \right)

Status thresholds: optimal if η80\eta \geq 80 and ≤ 2 warnings; acceptable if 50η<8050 \leq \eta < 80; marginal if η<50\eta < 50 or ≥ 3 warnings.

8. Component constants & provenance

Each constant below is a literature-anchored approximation. Use the calibration upload to fit your own lab data and override these defaults.

ComponentRoleΔH (kJ/kg)Gas (mol/kg)Tauto (°C)Tonset (°C)
Sodium Nitrate (NaNO₃)oxidizer1,90014380308
Flour (organic fuel)fuel16,50038410180
Epoxy Binderbinder31,00022450220
Black Powderenergetic3,00011300250
Aluminum Powderfuel31,0000660500
Sulfurfuel9,3006232160

Reference sources include NIST WebBook (heats of formation), Akhavan "Chemistry of Explosives" 3rd ed. (gas yields, sensitivities), and standard SPE perforating handbooks. Constants should be re-fit per supplier lot — manufacturing variability of ±10% is typical.

9. Validation workflow

  1. Upload lab burn CSV (depth, BHT, BHP, measured performance %).
  2. Calibration routine fits per-component multipliers via least-squares against the model output.
  3. Residuals plotted as model − measured; report R² and RMSE per formulation family.
  4. Calibrated constants are versioned per team, with provenance (uploaded-by, dataset hash, fit date).
Last reviewed 2026-04. Equations implemented in src/lib/ballistics.ts.