Bridging Principles and Operations: Building a Fuel Depot Digital Twin

During my time at BOST (Bulk Oil Storage and Transportation) Energies, I operated pumps, valves, and loading arms to safely transfer petroleum products via truck and pipeline systems, while monitoring storage tank levels and temperatures to ensure product integrity, inventory accuracy, and regulatory compliance.

The gap between physical tank farm operations and digital management tools required a solution that follows chemical engineering principles. I built a Digital Twin that models the actual physics of fuel storage and transfer operations.

Transitioning from the field to software engineering, I built a comprehensive Fuel Depot Digital Twin.

Note: While the operational logic and layout principles mirror real-world depots, the specific asset names, capacities, and sensor data shown in this demonstration are randomized and fictionalized for confidentiality.

Live Demo: Access the Fuel Depot Digital Twin here

This system isn't merely a dashboard; it is a simulation-grade platform designed with the rigor of chemical engineering first principles.

Chemical Engineering Implementation

The core philosophy of this digital twin is fidelity. It doesn't just display numbers; it models behavior.

1. Tank Farm Operations Interface

The system interface provides real-time monitoring of fuel storage and transfer operations:

  • Level Monitoring: Dynamic tank level visualization with status indicators (Normal, Low, Warning, Critical) based on actual tank geometry.
  • Flow Rate Calculations: Real-time pump performance monitoring using pump curves and system head calculations.
  • Strapping Table Integration: Volume-to-level conversion using standard tank strapping data for accurate inventory management.

2. Tank Farm Layout Visualization

Three-dimensional rendering of the tank farm for safety and maintenance planning:

  • Configuration-Based Generation: Tank farm layout generated from engineering specifications (tank dimensions, bund wall requirements, safety clearances).
  • Safety Compliance Inspection: Visual verification of tank spacing, bund wall integrity, and emergency access routes.

3. Process Simulation & Safety Analysis

Engineering simulation capabilities for operational planning and hazard assessment:

  • Transfer Operations Simulation: Predictive modeling of tank-to-tank transfers including fill time calculations, pump energy requirements, and overflow prevention based on fluid dynamics.
  • Thermal Radiation Modeling: Fire consequence analysis using industry-standard models to calculate thermal impact zones for emergency response planning.

4. Thermo-Fluid Simulation Engine

The deterministic computational core solves first-principles engineering equations by coupling Thermodynamics (Energy Balance) with Fluid Mechanics (Mass Balance) to calculate critical process variables.

Mass Balance Calculator

Implements mass conservation principles for accurate product tracking following API MPMS Chapter 11.1 and ASTM D1250 standards:

  • Volume-to-Mass Conversion: Temperature-corrected density calculations using Volume Correction Factor (VCF)
  • Mass Reconciliation: Transfer balancing with leak detection within 0.5% tolerance
  • Loss/Gain Detection: Automated discrepancy identification for inventory management

Energy Balance Calculator

Thermal energy calculations for tank operations based on API MPMS Chapter 11 and engineering thermodynamics:

  • Heat Content Calculation: Enthalpy determination $Q = m \cdot C_p \cdot \Delta T$ for thermal energy stored in product
  • Ambient Heat Transfer: Newton's Law of Cooling for environmental heating/cooling effects
  • Temperature Prediction: Time-dependent temperature evolution using thermal inertia
  • Pump Energy Consumption: Hydraulic power requirements with efficiency corrections

Evaporation Loss Calculator

Evaporation loss estimation following API MPMS Chapter 19 and EPA AP-42 guidelines:

  • Standing Losses: Breathing losses during storage operations
  • Working Losses: Evaporation during filling/emptying operations
  • Environmental Compliance: Loss tracking for regulatory reporting
  • Loss Prevention: Operational planning to minimize evaporative losses

Volume Calculator

Volume Correction Factor (VCF) calculations based on API tables and ASTM D1250 standards for accurate volume standardization:

  • VCF Calculation: Temperature correction factors using simplified API table models for real-time computation
  • Gross Standard Volume (GSV): Volume normalization to standard reference temperature (20°C) from observed conditions
  • GOV to GSV Conversion: Gross Observed Volume correction using VCF for accurate inventory accounting

Core Physics Equations

Mass Balance: $\rho_{observed} = \rho_{ref} \times [1 - \beta(T_{obs} - T_{ref})]$ where $\beta$ is thermal expansion coefficient

Energy Balance: $T(t) = T_{ambient} + (T_{initial} - T_{ambient}) \times e^{-t/\tau}$ with $\tau = \frac{m \cdot C_p}{U \cdot A}$

Thermal Radiation: $I = \frac{f \cdot Q_{combustion}}{4\pi r^2}$ for fire consequence modeling

Hydraulic Power: $Power_{electrical} = \frac{\rho g Q H}{\eta}$ for pump energy requirements

Chemical Engineering Results

The digital twin delivers engineering-focused outcomes for fuel depot operations:

  • Inventory Management: Automated mass balance calculations reducing manual reconciliation time.
  • Safety Engineering: Real-time hazard zone visualization for emergency response planning.
  • Process Validation: Continuous sensor data verification against physical models.

This project represents the convergence of field operations experience and rigorous software engineering; building tools that are as reliable as the infrastructure they monitor.