Browse documentation
Docs/Functionality

Petroleum engineering starter workflows

Use these synthetic examples to build an analytical model with declared inputs, readable outputs, a chart, and a repeatable scenario. The models use the normal Grid language with strict and…

Petroleum engineering starter workflows

Use these synthetic examples to build an analytical model with declared inputs, readable outputs, a chart, and a repeatable scenario. The models use the normal Grid language with strict and input contracts. Their bounds are teaching and screening limits, not universal physical limits.

Open a starter

The canonical examples are petroleum-reservoir-volumetrics.grid, petroleum-decline-forecast.grid, and petroleum-nodal-analysis.grid. Open a source file in Grid, or choose its petroleum starter entry where the example catalog is available. The repository's examples/petroleum/ directory also contains ready-to-open .gridoc documents with Baseline and one alternative scenario already saved. A source file contains equations and defaults; the .gridoc document also contains saved scenario assets.

Starter Baseline result Saved alternative
Reservoir volumetrics 31.032 million STB Porosity 0.25 gives 38.790 million STB
Decline forecasting At year 10: 62.5 STB/day; cumulative 912,500 STB Exponential decline: 2.478752 STB/day; cumulative 606,825.425759 STB
Nodal analysis 971.162744 STB/day at 1,443.157076 psia Lower tubing loss: 1,103.686072 STB/day at 1,109.061472 psia

Read the Assumptions output before changing inputs. Use the I/O surface to edit declared inputs, then inspect the result and chart. The scenario controls save the current state or restore a saved state. Reset returns to authored defaults. Restoring a scenario does not rewrite those defaults. For a handoff that retains scenarios, export the document as .gridoc and open it in Grid.

Understand the calculations

Volumetrics. The example evaluates 7758 * area_acres * net_pay_ft * porosity * (1 - water_saturation) / formation_volume_factor. The factor 7,758 is the conventional rounded barrel-per-acre-foot conversion; the resulting stock-tank volume uses the explicitly supplied reservoir-to-stock-tank formation-volume factor. This is original oil in place. Recovery factor, recoverable reserves, and probabilistic percentiles are not calculated. The porosity chart is a deterministic sensitivity curve. Entering porosity 1.2 is rejected and leaves the last valid state intact.

Decline forecasting. The model uses the Arps rate equation, with explicit exponential (b=0) and harmonic (b=1) limits. Time is in 365-day years and initial decline is nominal per year. Small-difference helper formulas retain accuracy close to both limits. The parameter meanings and limiting equations follow the Whitson DCA reference.

Zero decline means a constant rate. If that rate exceeds the selected cutoff, there is no finite crossing time: LimitTime_years is #N/A and LimitStatus explains why. A cutoff at or above the initial rate is reached at year zero. The horizon total is uncurtailed by the cutoff. The example assumes constant conditions and boundary-dominated behavior; it does not fit production history or add a terminal decline transition. The cutoff is a rate threshold, not a price or discounted cash-flow assessment.

Nodal analysis. The inflow curve uses Vogel's solution-gas-drive form, q/qmax = 1 - 0.2*(pwf/pr) - 0.8*(pwf/pr)^2. Its original scope is described in Vogel's paper. Outflow is an explicitly synthetic quadratic pressure-loss model. It is not a validated multiphase tubing correlation. Both pressures are absolute (psia). The starter exposes the search bracket, bracket residuals, operating point, and equation residual. Keep inflow evaluations within 0 <= pwf <= pr. An invalid bracket or pressure domain produces a calculation error; changing a numerical tolerance does not repair a physically inappropriate model.

Edit, expose, and plot

In the sheet's read-only source view, Edit model opens the complete source in Author. The I/O surface also offers Choose an output. Choose or enter a currently loaded calculation and select Expose as output. Grid adds a normal declaration such as output published_result = OperatingRate_stbd and opens the source. Rename the output there if desired. Existing formulas and contracts remain in place, and the source change uses the normal undo history. Only loaded calculations appear in the suggestions; use Edit model for others.

To plot named vectors, open the chart editor and choose Named X and Y vectors under Data source. For the nodal starter, use Rates_stbd as X and OutflowPressures_psia as Y. Add a second series with the same X and InflowPressures_psia as Y. Set the rate and pressure axis titles with their units. Each pair must have equal lengths and contain finite numbers. Numeric X values keep their spacing. Row and column vectors work; general matrices, blanks, numeric text, and more than 65,536 points per vector are rejected with an explanation. Reduce larger vectors explicitly in the model.

The chart names both bindings and offers View plotted data for inspection. The presentation pairs existing values; it does not create hidden model formulas. Table/range chart bindings remain available. See Surfaces for configuration and example-data behavior.

Name calculations clearly

Letter-and-number names such as MdToM2 can be interpreted as spreadsheet addresses, regardless of letter case. When such an address exceeds Grid's bounds, the symbol error explains the ambiguity and suggests an underscore, for example Permeability_m2. Valid cell references keep their meaning. Grid does not silently rename your source.

For physical conversions, use the shared unit system described in Assignments and units. A psi conversion alone does not choose an absolute or gauge reference, and bbl alone does not convert reservoir volume to stock-tank volume.