👨‍💻💻🦾🔬

Manuel Solalinde's CV

View the Project on GitHub manolosolalinde/cv

Gas Injection Optimization App - BKV Corporation

Data Scientist/Developer: Manuel Solalinde (manolosolalinde@gmail.com)

On gas-lift wells, operators routinely over- or under-inject gas, leaving production on the table or wasting injection. This production data-analytics platform helps reservoir and production engineers right-size gas injection on gas-lift wells: for each well it turns noisy daily production and injection history into a single recommended injection rate, produced by a data-driven model trained against engineer-labeled data. On top of the per-well recommendation it generates the report emailed to operators, ranking every injecting well by how far it has drifted from its recommendation — contributing to a measurable improvement in net sales.

Note: In production use, the tool flagged over-injecting wells and guided operators to reduce injection, contributing to a measurable improvement in net sales. Specific production and financial figures are confidential client data and are omitted.

Applications

The platform bundles five sub-applications, selected from a dropdown:

The Recommendation Model

The core of the app is a model that converts a well’s daily history into one injection recommendation. Rather than a closed-form physics calculation, it groups the history into stable operating regimes and scores them. The pipeline:

  1. Clean — drop shut-in-extended days to remove transient recovery noise.
  2. Cluster — fit a DecisionTreeRegressor(criterion="absolute_error") to injection rate versus time, segmenting the history into stretches that each held a roughly constant injection target; adjacent similar segments are merged into a cluster.
  3. Aggregate — compute per-cluster statistics: mean injection/production, stability ratios, production trend, net production-minus-injection, and more.
  4. Filter — discard unreliable clusters (too little injection, too few days, or excessive variance).
  5. Score — each surviving cluster gets a penalty (lower is better) combining a production penalty, a production-minus-injection efficiency penalty, an injection-stability penalty, and (optionally) production-volatility and trend penalties.
  6. Recommend — invert the score and select the best-ranked cluster; its mean injection target becomes the recommendation.

The penalty weights are the only part of the recommendation learned from data — see below.

Model Training (data-driven weights)

The penalty weights are fitted offline against ground truth collected with the Labeler:

Note: Specific tuned weight values, well counts and model accuracy figures are derived from proprietary client data and are omitted.

Design decisions & trade-offs

Hard problems solved

Report

The Gas Injection Report ranks every injecting well by the difference between its recent injection and its recommendation (using the operator’s saved decision as the baseline if one exists, else the model recommendation). Regeneration fans out Lambda functions in parallel to recompute every well’s metrics and uploads the results to S3. Three views are available: an email-ready CSV view, a fully filterable Research view (GLR, production and injection thresholds, route, minimum delta), and an unfiltered Raw view. Engineers can override the model for any well from the sidebar; operator decisions are stored in DynamoDB and replace the recommendation as the baseline across all views.

Architecture

Python + Streamlit web app with Plotly visualization. Per-well daily production and injection data lives in AWS S3 as parquet, read on demand. The report regenerates through a parallel Lambda fan-out; operator overrides persist in DynamoDB. The recommendation logic lives in a shared engineering library imported by both the live app and the offline Jupyter training notebooks, guaranteeing the trained weights are evaluated against the exact pipeline that runs in production. User documentation is published with MkDocs.

Note: Screenshots are omitted, as they display proprietary client data. Available on request, subject to client approval.