Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

Repository files navigation

πŸš€ Nexus-Twin: Integrated Asset Management (IAM) Platform

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.

Nexus-Twin Field Overview


πŸ“– Table of Contents


🌟 Project Overview

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.

The Objective

To create an Integrated Asset Management (IAM) platform that automates the loop between data collection, physical modeling, and operational decision-making.


πŸ“‰ The Problem & Solution

The Challenge

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.

The Nexus-Twin Solution

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.

✨ Core Features

1. Data Engine (Synthetic Generator)

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.

2. Subsurface Module (Reservoir Physics)

  • 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).

3. Production Module (ML & Analytics)

  • 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.

4. Executive Dashboard

  • 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.

Dashboard Gallery

Field Overview Reservoir Health
Field Reservoir
Production Analytics NPT Event Log
Production NPT Log

πŸ›  Technology Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS v4 (Glassmorphism & Dark Mode)
  • Visuals: Recharts (Customized for Engineering), Lucide Icons
  • Language: TypeScript

Backend (AI/ML & API)

  • Core: Python 3.10+
  • Framework: FastAPI
  • Data Science: Pandas, NumPy, Scikit-learn, SciPy
  • Server: Uvicorn

πŸ— System Architecture

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
Loading

πŸš€ Installation & Setup

Prerequisites

  • Node.js 18.x or later
  • Python 3.10 or later
  • npm or yarn

1. Clone the Repository

git clone https://github.com/your-username/nexus-twin.git
cd nexus-twin

2. Frontend Setup

npm install
npm run dev

The frontend will be available at http://localhost:3000.

3. Backend Setup

# 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 8000

The API will be available at http://localhost:8000.


🧠 Engineering Logic Deep Dive

CRM (Capacitance Resistance Model)

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.

Virtual Meter (RF Regressor)

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.


πŸ›‘ OIMS & WDP Alignment

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.

πŸ“‘ API Reference

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.

☁️ Deployment

Nexus-Twin is pre-configured for Vercel Deployment.

  1. Push your code to a GitHub repository.
  2. Link the repository to your Vercel account.
  3. Vercel will automatically detect the vercel.json config.
  4. Set the NEXT_PUBLIC_API_URL environment variable if your backend is hosted separately, or leave blank to use the Vercel Python Function.

🀝 Contribution

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

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages