Nexus-Twin is a state-of-the-art Digital Twin ecosystem designed to bridge the gap between Reservoir and Production Engineering. Built for high-stakes oil & gas field optimization, it provides real-time monitoring, physics-based subsurface modeling, and ML-powered production forecasting.
- Project Overview
- The Problem & Solution
- Core Features
- Technology Stack
- System Architecture
- Installation & Setup
- Engineering Logic Deep Dive
- OIMS & WDP Alignment
- API Reference
- Deployment
Nexus-Twin is a "Software-Defined Engineering" tool that reduces human intervention in field optimization. It targets complex subsea assets (like those managed by ExxonMobil or Shell) where the cost of intervention is high and the value of real-time optimization is measured in millions of dollars per day.
To create an Integrated Asset Management (IAM) platform that automates the loop between data collection, physical modeling, and operational decision-making.
Oil & Gas assets lose billions annually due to:
- Unplanned Downtime (NPT): 15% of total operating hours.
- Suboptimal Injection: 8-12% imbalance leading to reservoir pressure loss.
- Inaccurate Flow Measurement: High dependency on infrequent physical well tests.
| Feature | Engineering Logic | Business Impact |
|---|---|---|
| Virtual Flow Meter | Random Forest regression on WHP & Choke | Real-time rate tracking without hardware meters. |
| CRM Engine | Capacitance Resistance Model for inter-well flow | Optimizes waterflood allocation & recovery. |
| Anomaly Detection | Isolation Forest on multi-variate sensor data | Predicts failures (e.g. Gas Lift) before they happen. |
| VRR Monitor | Real-time Voidage Replacement Ratio tracking | Maintains reservoir pressure for long-term health. |
A physically consistent Python engine that simulates:
- 5 Subsea Producers and 2 Water Injectors over a 2-year history.
- Events like Gas Lift Failures and Water Breakthrough.
- Realistic sensor noise and natural production decline.
-
CRM Modeling: Calculates inter-well connectivity factors (
$f_{ij}$ ) and time constants ($\tau$ ). - VRR Tracking: Daily and cumulative Voidage Replacement Ratio monitoring with target band (0.9β1.1).
-
Virtual Meter: RF model with
$R^2 \approx 0.85$ predicting oil rates from surface pressures. - NPT Analytics: Automated event logging with high/medium/low severity flagging.
- Value-at-Risk: Real-time revenue tracking and risk assessment at a field level.
- Field Overview: High-level KPI cards and a well status grid with pulse-animated health indicators.
- Reservoir Health: Inter-well connectivity heatmaps and VRR trend charts.
- Production Analytics: Multi-well flow trends and ML model performance metrics.
| Field Overview | Reservoir Health |
|---|---|
![]() |
![]() |
| Production Analytics | NPT Event Log |
|---|---|
![]() |
![]() |
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS v4 (Glassmorphism & Dark Mode)
- Visuals: Recharts (Customized for Engineering), Lucide Icons
- Language: TypeScript
- Core: Python 3.10+
- Framework: FastAPI
- Data Science: Pandas, NumPy, Scikit-learn, SciPy
- Server: Uvicorn
Nexus-Twin employs a decoupled architecture optimized for low-latency frontend interaction and heavy compute backend analytics.
flowchart TB
subgraph UI ["Executive Dashboard (Next.js 14)"]
direction LR
FO[Field Overview]
RH[Reservoir Health]
PA[Production Analytics]
end
subgraph API ["Compute Backend (FastAPI)"]
direction TB
RH_Handler[Route Handler]
subgraph Engine ["Analytics Engine"]
CE[CRM Physics Engine]
ML[Virtual Flow Meter]
AD[Anomaly Detector]
DG[Synthetic Data Gen]
end
end
subgraph Storage ["Data Layer"]
DB[(well_history.csv)]
end
%% Interactions
UI <--> |REST / JSON| RH_Handler
RH_Handler --> Engine
Engine <--> DB
DG --> |Initialize| DB
%% Styling
style UI fill:#0a0f1c,stroke:#06b6d4,color:#fff
style API fill:#111827,stroke:#8b5cf6,color:#fff
style Storage fill:#0d1117,stroke:#10b981,color:#fff
- Node.js 18.x or later
- Python 3.10 or later
- npm or yarn
git clone https://github.com/your-username/nexus-twin.git
cd nexus-twinnpm install
npm run devThe frontend will be available at http://localhost:3000.
# It is recommended to use a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python api/data_generator.py # Generate initial synthetic data
uvicorn api.main:app --reload --port 8000The API will be available at http://localhost:8000.
Nexus-Twin uses the CRMIP (Injectors to Producers) variant. The model minimizes the residual between historical production and the CRM prediction by optimizing:
-
$f_{ij}$ : The fraction of water injected in injector$j$ that reaches producer$i$ . -
$\tau_i$ : The time constant for producer$i$ , representing reservoir lag/compressibility.
Unlike simple linear models, our Random Forest regressor captures the non-linear relationship between Wellhead Pressure (WHP), Choke Size, and Flow Rate, achieving 85%+ accuracy without requiring costly physical meters.
Nexus-Twin is built to comply with ExxonMobilβs OIMS (Operations Integrity Management System):
- Element 2 (Risk Assessment): Real-time anomaly scores provide high-resolution hazard detection.
- Element 5 (Operations & Maintenance): Automated flow tracking ensures accurate maintenance prioritization.
- Element 8 (Reliability & Efficiency): CRM-based injection optimization maximizes field recovery efficiency.
| Endpoint | Method | Action | Description |
|---|---|---|---|
/api/main |
GET | health |
Check service health. |
/api/main |
GET | wells |
Fetch well summary and KPI grid. |
/api/main |
GET | reservoir |
CRM matrix and VRR timeseries. |
/api/main |
GET | production |
Flow trends, virtual meter & anomalies. |
/api/main |
GET | generate |
Regenerate synthetic dataset. |
Nexus-Twin is pre-configured for Vercel Deployment.
- Push your code to a GitHub repository.
- Link the repository to your Vercel account.
- Vercel will automatically detect the
vercel.jsonconfig. - Set the
NEXT_PUBLIC_API_URLenvironment variable if your backend is hosted separately, or leave blank to use the Vercel Python Function.
Contributions are welcome! Please open an issue or submit a pull request for any feature additions or bug fixes.
Developed for Advanced Integrated Asset Management Demo 2025



