GDSL Digital Twin

3D Urban Microclimate CFD Simulation with Real-Time Sensor Assimilation, LiDAR Geometry Extraction, and Cesium-Based Mapping

Project Overview

The GDSL Digital Twin is a high-fidelity urban microclimate simulation framework built around a custom 3D CFD solver (microclimate_solver.py). It solves the incompressible Navier–Stokes equations under the Boussinesq approximation on a regular (optionally stretched) Cartesian grid, coupled with scalar temperature advection–diffusion, a porous-media canopy model, a simplified solar-radiation source, and real-time sensor data assimilation.

3D incompressible Navier–Stokes + Boussinesq buoyancy
Coupled temperature advection–diffusion with solar heating
Porous-media canopy drag & evaporative cooling
Live sensor data assimilation (nudging scheme)
STL voxelization of buildings, trees & terrain
Cesium-based geospatial domain mapping

Cesium Geospatial Domain Map

The simulation domain is georeferenced using CesiumJS, enabling real-world coordinate alignment of the CFD grid with building footprints, terrain elevation, and sensor locations. The map interface allows interactive selection and inspection of the computational domain before running the solver.

CesiumJS-based geospatial map used to define and visualize the CFD simulation domain

Urban Geometry Extraction

Building geometries, street networks, and terrain surfaces are extracted from geospatial data sources and converted to STL meshes. These meshes are then voxelized onto the Cartesian CFD grid using a parity ray-casting (Möller–Trumbore) algorithm — each candidate cell centre is tested against the closed surface to determine whether it lies inside a building, tree canopy, or open-air region.

Extraction of urban geometry from geospatial sources for CFD grid population

CFD Simulation Results

The solver uses first-order upwind advection, second-order central-difference diffusion, and an artificial compressibility pressure-correction method (Chorin 1967). Time-stepping is dynamically controlled via both advection and diffusion CFL conditions. The visualizations below show wind flow patterns (arrow field) and temperature distribution across the urban domain.

Wind velocity vector field — Arrow plot of the 3D flow solution

Temperature distribution — Boussinesq buoyancy-driven thermal field

LiDAR Geometry Extraction Using Voxels

High-density LiDAR point clouds are processed and voxelized to reconstruct 3D urban geometry at high fidelity. Each point cloud is binned into the CFD voxel grid, enabling accurate representation of building façades, vegetation canopies, and terrain undulations. The voxelized geometry directly drives the flag arrays (FLAG_SOLID, FLAG_TREE, FLAG_GROUND) used by the solver's boundary condition and drag routines.

LiDAR point cloud voxelization — 3D urban geometry reconstruction for CFD grid

3D Digital Elevation Model (DEM)

A Digital Elevation Model (DEM) is derived from the LiDAR data and terrain datasets to represent the ground surface topology of the simulation domain. The DEM is used to set the lower boundary condition of the CFD grid, ensuring that the computational domain accurately conforms to the real terrain — critical for correct wind channeling, drainage modeling, and thermal stratification near the ground.

3D Digital Elevation Model — terrain surface used as the lower CFD boundary

Solver Technical Summary

Governing Equations

  • 3D incompressible Navier–Stokes (Boussinesq)
  • Scalar temperature advection–diffusion
  • Porous-media canopy drag: Fd = −Cd|U|U
  • Evaporative cooling in tree cells

Numerical Schemes

  • Time: Explicit (Forward) Euler
  • Advection: 1st-order upwind
  • Diffusion: 2nd-order central differences (non-uniform grid)
  • Pressure: Artificial compressibility (Chorin 1967)

Grid & Geometry

  • Regular or stretched Cartesian grid
  • z-major array storage (Nz, Ny, Nx)
  • STL voxelization via Möller–Trumbore ray casting
  • LiDAR-derived geometry and DEM terrain

Physics Models

  • Log-law atmospheric wind profile inlet BC
  • Column-based solar shading (1D top-down)
  • Sensor nudging assimilation (αs = 0.5)
  • CFL-adaptive time-stepping