The platform ships one library per calculator. Each library is exposed through a controller in the API service and, for most of them, through a page in the web application. This page lists, for each calculator, the endpoints, the inputs the request types define and the methods the library implements. Method names are taken from the code; the code does not state the unit system of every method, so units are given only where the request type documents them.

How results come back. The packaged calculators under /api/Calculations (choke, compressor, nodal, well test, economic) return HTTP 200 even when a calculation fails. In that case the result has Status set to failed and the reason in ErrorMessage. Missing request bodies and missing required ids are answered 400. The decline curve call returns { OperationId, Result }, and the operation id can be followed on the /progressHub channel. Results are stored with a CalculationId and can be read again by id or listed by well, pool or field.

1. Nodal analysis

Nodal analysis finds the operating point of a well where the inflow curve (IPR) meets the outflow curve (VLP).

Input. PerformNodalAnalysisRequest has WellUWI (required) and AnalysisParameters (required). The parameters hold ReservoirProperties (reservoir pressure, bubble point pressure, productivity index, water cut, gas oil ratio, oil gravity, formation volume factor, oil viscosity), WellboreProperties (tubing diameter and length, wellhead pressure, water cut, gas oil ratio, oil gravity, gas specific gravity, wellhead and bottomhole temperature, tubing roughness), MinFlowRate, MaxFlowRate and NumberOfPoints.

Output. NodalAnalysisRunResult: AnalysisId, the operating point (flow rate, bottomhole pressure, wellhead pressure), the IPR and VLP curves, the optimal flow rate and bottomhole pressure, and a status.

Library methods. IPR curves: Vogel, Fetkovich, Wiggins, Standing, Jones Blount Glaze (with a fit of its coefficients from two flow tests), gas well backpressure and gas condensate. VLP curves: Hagedorn Brown and Beggs Brill. Bottomhole pressure correlations: Poettmann Carpenter, Hagedorn Brown, Cullender Smith, Guo Ghalambor and Gray. Operating point by curve intersection, which also reports whether the curves cross. Sensitivity: a one parameter sweep, a tornado chart ranking and a Monte Carlo estimate of P10, P50 and P90 flow rates. Optimum gas liquid ratio for oil wells and for gas lift.

MethodRouteBody
POST/api/NodalAnalysis/analyzePerformNodalAnalysisRequest?
POST/api/NodalAnalysis/optimizeOptimizeSystemRequest?
POST/api/NodalAnalysis/resultNodalAnalysisRunResult?
GET/api/NodalAnalysis/history/{wellUWI}
POST/api/NodalAnalysis/performance-matchingPerformNodalAnalysisRequest?
POST/api/NodalAnalysis/sensitivityNodalSensitivityAnalysisRequest?
POST/api/NodalAnalysis/artificial-liftNodalArtificialLiftRequest?
POST/api/NodalAnalysis/diagnosticsNodalWellDiagnosticsRequest?
POST/api/NodalAnalysis/production-forecastNodalProductionForecastRequest?
POST/api/NodalAnalysis/pressure-maintenanceNodalPressureMaintenanceRequest?

The same analysis is also available as POST /api/Calculations/nodal with results at GET /api/Calculations/nodal.

2. Choke analysis

Input. ChokeAnalysisRequest: WellId, EquipmentId, AnalysisType (DOWNHOLE, UPHOLE, SIZING or PRESSURE; default DOWNHOLE), ChokeDiameter (inches), ChokeType (BEAN, ADJUSTABLE or POSITIVE), DischargeCoefficient, UpstreamPressure and DownstreamPressure (psia), Temperature (Rankine), GasSpecificGravity, ZFactor and FlowRate (Mscf/day). Choke and gas values are optional because they can be read from the well equipment and well records.

Output. ChokeAnalysisResult: choke diameter and type, discharge coefficient, flow rate, upstream and downstream pressure, pressure ratio, flow regime, critical pressure ratio and additional results.

Library methods. Gas choke flow downhole and uphole, downstream pressure and required choke size. Multiphase choke by Gilbert and Pilehvari. Discharge coefficients by ISO 5167, Sachdeva two phase, API choke type and Perkins gas. Performance curves for gas and multiphase flow, bean size sweep and the intersection of choke and inflow curves. Erosion assessment and bean selection for a target rate or a minimum pressure.

Endpoint: POST /api/Calculations/choke.

3. Compressor analysis

Input. CompressorAnalysisRequest: FacilityId, EquipmentId, CompressorType (CENTRIFUGAL or RECIPROCATING), AnalysisType (POWER, PRESSURE or EFFICIENCY), SuctionPressure and DischargePressure (psia), SuctionTemperature (Rankine), FlowRate, GasSpecificGravity, CompressionRatio, PolytropicEfficiency and AdiabaticEfficiency (fractions from 0 to 1), NumberOfStages, and for reciprocating machines CylinderDisplacement, VolumetricEfficiency and NumberOfCylinders.

Output. CompressorAnalysisResult: polytropic and adiabatic head, power required, discharge temperature, polytropic, adiabatic and overall efficiency, pressures, compression ratio, flow rate, and for reciprocating machines the cylinder displacement and volumetric efficiency.

Library methods. Centrifugal power, surge margin, performance map and operating region check. Reciprocating power. Multistage analysis, stage count optimisation and the benefit of intercooling. Required pressure and maximum flow rate. Ratio distribution between stages, life cycle cost and compressor type selection. Rigorous centrifugal and reciprocating calculations.

Endpoints: POST /api/Calculations/compressor and the direct routes below.

MethodRouteBody
POST/api/Compressor/analyzeCOMPRESSOR_OPERATING_CONDITIONS
POST/api/Compressor/powerCOMPRESSOR_OPERATING_CONDITIONS
POST/api/Compressor/design/centrifugalCENTRIFUGAL_COMPRESSOR_PROPERTIES
POST/api/Compressor/design/reciprocatingRECIPROCATING_COMPRESSOR_PROPERTIES

4. Decline curve analysis and production forecasting

Input. DCARequest: WellId, PoolId, FieldId (filled from the current field when empty), CalculationType (DCA, DCA_EXPONENTIAL, DCA_HYPERBOLIC or DCA_HARMONIC), StartDate, EndDate and ProductionFluidType (OIL, GAS or WATER).

Output. DCAResult: initial rate, decline rate and constant, nominal and effective decline rate, hyperbolic exponent, forecast points, fit statistics (RMSE, R squared, correlation coefficient), estimated EUR and remaining reserves.

Library methods. Arps exponential, harmonic and hyperbolic decline with cumulative production and reserves; power law exponential and stretched exponential decline; multi segment decline; multi well analysis; nonlinear regression for fitting; data import and export. The forecasting library also holds a forecast calculator, decline forecast, gas well forecast, pseudo steady state forecast, transient forecast and an economics integration.

Endpoints: POST /api/Calculations/dca with GET dca/{calculationId} and GET dca (filters wellId, poolId, fieldId), and the forecasting controller below.

MethodRouteBody
POST/api/ProductionForecasting/generateGenerateForecastRequest?
POST/api/ProductionForecasting/decline-curveDeclineCurveAnalysisRequest?
POST/api/ProductionForecasting/forecastProductionForecastResult?

GenerateForecastRequest has WellUWI, FieldId, ForecastMethod, ForecastPeriod, OperatingCostPerBarrel, FixedOpexPerPeriod and a CapitalSchedule. DeclineCurveAnalysisRequest has WellUWI, StartDate and EndDate.

5. Economic analysis

Input. EconomicAnalysisRequest: WellId, PoolId, FieldId, ProjectId, AnalysisType (NPV, IRR, PAYBACK, ROI or BREAKEVEN), OilPrice, GasPrice, DiscountRate, InflationRate, OperatingCostPerUnit, CapitalInvestment, a production forecast list, analysis dates or AnalysisPeriodYears, RoyaltyRate, TaxRate, WorkingInterest, OperatingCostPerBarrel, FixedOpexPerPeriod and a CapitalSchedule.

Library methods. NPV, IRR, modified IRR, payback period, discounted payback period, profitability index and ROI from an array of cash flows, a combined analysis, break even analysis, Monte Carlo simulation and sensitivity analysis. The data folder also holds a fiscal regime type.

Endpoints: POST /api/Calculations/economic (results at GET economic) and the economic analysis controller.

MethodRouteBody
POST/api/EconomicAnalysis/npvCalculateNPVRequest
POST/api/EconomicAnalysis/irrCalculateIRRRequest
POST/api/EconomicAnalysis/analyzeAnalyzeRequest
POST/api/EconomicAnalysis/npv-profileGenerateNPVProfileRequest
POST/api/EconomicAnalysis/resultSaveAnalysisResultRequest
GET/api/EconomicAnalysis/result/{analysisId}

6. Well test analysis

Input. WellTestAnalysisCalculationRequest: WellId, TestId, AnalysisType, AnalysisMethod, PressureTimeData, FlowRate (BPD or Mscf/day), WellboreRadius and FormationThickness (feet), Porosity, TotalCompressibility (1/psi), OilViscosity (cp), OilFormationVolumeFactor (RB/STB), ProductionTime (hours), IsGasWell, GasSpecificGravity, ReservoirTemperature (Fahrenheit) and InitialReservoirPressure (psi). Values that are missing are read from the well records where possible.

What the API accepts. The analysis type must be build-up or drawdown, and for an oil build-up the method must be HORNER or MDH. Any other analysis type is refused with a 400 answer. The request type also mentions MULTI_RATE and AGARWAL in comments, but the calculation service does not accept them.

Library methods. Horner and MDH build-up analysis, drawdown analysis (early, middle and late time), gas well build-up, Bourdet derivative and flow regime identification, reservoir model identification, and a type curve library (infinite acting homogeneous, closed boundary, constant pressure boundary, dual porosity, infinite conductivity hydraulic fracture) with automatic matching.

Partly implemented. In the library's default WellTestAnalysisService these members are not implemented and throw a not implemented error that asks the host to register its own implementation: type curve matching, multi rate analysis, deconvolution, boundary detection, saving, reading, updating and listing analysis results, report generation, export, comparing methods, and plot generation. Horner, MDH, drawdown, derivative, model identification and data validation are implemented.

7. Flash calculations

Input. FlashCalculationRequest: Conditions, Stages, WellId, FacilityId, FeedComposition, Pressure, Temperature, CalculationType.

Library methods. Wilson K values, the Rachford Rice equation and its solver, phase compositions, isothermal flash, vapour and liquid properties. The project also contains advanced equation of state code, a multi component flash, a phase envelope and a flash feed catalog.

MethodRouteBodyQuery
POST/api/FlashCalculation/rigorousFlashCalculationRequest
POST/api/FlashCalculation/isothermalFLASH_CONDITIONS
POST/api/FlashCalculation/multi-stageMultiStageFlashRequest
POST/api/FlashCalculation/resultFlashResult
GET/api/FlashCalculation/historycomponentId

8. Gas and oil properties

Gas. Z factor request: Pressure, Temperature, SpecificGravity and the Correlation name. Density request: pressure, temperature, Z factor and molecular weight. Formation volume factor request: pressure, temperature and Z factor. The library has the Brill Beggs, Hall Yarborough and Standing Katz Z factor methods, pseudo critical properties, the Carr Kobayashi Burrows and Lee Gonzalez Eakin viscosity methods, mixing rules and pseudo pressure.

MethodRouteBody
POST/api/GasProperties/calculate-zfactorCalculateZFactorRequest
POST/api/GasProperties/calculate-densityCalculateGasDensityRequest
POST/api/GasProperties/calculate-fvfCalculateGasFVFRequest
POST/api/GasProperties/compositionGasComposition
GET/api/GasProperties/composition/{compositionId}

Oil. Formation volume factor request: pressure, temperature, gas oil ratio, oil gravity, gas specific gravity and Correlation. Density and viscosity requests: pressure, temperature, oil gravity and gas oil ratio. The library has the Standing correlations for bubble point pressure, solution gas oil ratio and formation volume factor, and the Beggs Robinson correlations for dead oil and saturated oil viscosity, plus black oil screening.

MethodRouteBody
POST/api/OilProperties/calculate-fvfCalculateFVFRequest
POST/api/OilProperties/calculate-densityCalculateDensityRequest
POST/api/OilProperties/calculate-viscosityCalculateViscosityRequest
POST/api/OilProperties/calculate-propertiesCalculateOilPropertiesRequest
POST/api/OilProperties/compositionOilComposition
GET/api/OilProperties/composition/{compositionId}
GET/api/OilProperties/composition/{compositionId}/history
POST/api/OilProperties/resultOilPropertyResult

9. Pipeline analysis

Input. AnalyzePipelineFlowRequest: PipelineId, FlowRate, InletPressure. CalculatePressureDropRequest: PipelineId, FlowRate.

Library methods. Gas and liquid flow, gas and liquid pressure drop, gas and liquid pipeline capacity, two phase flow by Beggs Brill and Dukler with multi segment analysis, pigging analysis, erosion prediction, compressor stations, and looping and compression economics.

MethodRouteBody
POST/api/PipelineAnalysis/analyze-flowAnalyzePipelineFlowRequest
POST/api/PipelineAnalysis/pressure-dropCalculatePressureDropRequest
POST/api/PipelineAnalysis/resultPipelineAnalysisResult

10. Gas lift

Input. AnalyzeGasLiftPotentialRequest: WellProperties, MinGasInjectionRate, MaxGasInjectionRate, NumberOfPoints. DesignValvesRequest: WellProperties, GasInjectionPressure, NumberOfValves, UseSIUnits.

Library methods. Thornhill Craver throughput, temperature at depth and required surface pressure; valve spacing by equal pressure drop and by equal depth; valve design; gas allocation optimisation; dynamic valve behaviour; operational constraints.

MethodRouteBody
POST/api/GasLift/analyze-potentialAnalyzeGasLiftPotentialRequest
POST/api/GasLift/design-valvesDesignValvesRequest
POST/api/GasLift/designGAS_LIFT_DESIGN
GET/api/GasLift/performance/{wellUWI}

11. Artificial lift and pumps

CalculatorBase routeEndpointsLibrary methods
Electric submersible pump (ESP)/api/pumpPOST analyze, system-curve, select, optimize (body ESP_DESIGN_PROPERTIES)DesignESP; pump performance library with affinity laws, efficiency, head and capacity, NPSH, power, system curve and viscosity correction; centrifugal, jet and positive displacement pump types
Sucker rod pumping/api/SuckerRodPumpingPOST design, analyze-performance, design/saveRod loads and pump card (CalculateLoads, GeneratePumpCard), API 11L, fatigue analysis, rod string optimisation, flow rate and power
Plunger lift/api/PlungerLiftPOST design, analyze-performance, design/saveTurner critical velocity, fall and rise velocity, gas required
Hydraulic pumps/api/HydraulicPumpPOST design, analyze-performance, design/save, GET performance-history/{pumpId}Jet pump and piston pump calculators with shared calculations

12. Enhanced oil recovery and heat maps

MethodRouteBodyQuery
POST/api/EnhancedRecovery/analyze-eorAnalyzeEORRequest
POST/api/EnhancedRecovery/recovery-factorCalculateRecoveryFactorRequest
GET/api/EnhancedRecovery/injectionwellUWI
POST/api/EnhancedRecovery/economicsAnalyzeEOREconomicsRequest
POST/api/EnhancedRecovery/injectionManageInjectionRequest
POST/api/HeatMap/generateGenerateHeatMapRequest
POST/api/HeatMap/configurationHeatMapConfigurationRecord
GET/api/HeatMap/configuration/{heatMapId}
POST/api/HeatMap/productionGenerateProductionHeatMapRequest

The heat map library builds colour mapped maps with interpolation, kernel density estimation, contours, clustering, filtering, annotations, animation and export. The production heat map route generates a map from production data.

13. Web pages for the calculators

PageRoutes
Perform Nodal Analysis/ppdm39/calculations/nodalanalysis
Run Choke Analysis/ppdm39/calculations/choke-analysis, /analysis/choke
Run Compressor Analysis/ppdm39/calculations/compressor-analysis, /analysis/compressor
Run Decline Curve Analysis/ppdm39/calculations/dca, /analysis/decline-curve
Run Economic Analysis/ppdm39/calculations/economicanalysis
Run Well Test Analysis/ppdm39/calculations/well-test-analysis, /analysis/well-test
Run Flash Calculations/ppdm39/calculations/flash-calculations, /analysis/flash-calculations
Analyze Gas Properties/ppdm39/calculations/gas-properties, /analysis/gas-properties
Analyze Oil Properties/ppdm39/calculations/oil-properties, /analysis/oil-properties
Analyse Pipeline Flow/ppdm39/calculations/pipelineanalysis
Analyse Gas Lift Performance/ppdm39/calculations/gaslift
Run Pump Performance Analysis/ppdm39/calculations/pump-performance, /analysis/pump-performance
Design Sucker Rod, Plunger Lift and Hydraulic Pump systems/ppdm39/pumps/suckerrodpumping, /ppdm39/pumps/plungerlift, /ppdm39/pumps/hydraulicpump
Evaluate Enhanced Oil Recovery/ppdm39/operations/enhancedrecovery
Generate Field Heat Map/ppdm39/properties/heatmap