Overview
WIP – This study specifically explores Physics-Informed Neural Networks (PINNs) and Computational Fluid Dynamics (CFD) to analyze pedestrian wind comfort. It aims to integrate these neural network models into a web application using Three.js and other tools. By utilizing data from OpenWeatherMap, and OpenStreetMap, the project aims to support real-time simulations and visualizations of wind flow in urban environments.
Objectives
- Research and develop Physics-Informed Neural Networks (PINNs) for Computational Fluid Dynamics (CFD) to analyze pedestrian wind comfort in urban environments.
- Collect and preprocess real-time wind data from OpenWeatherMap and 3D building models from OpenStreetMap using the Overpass API to create accurate simulations.
- Generate 3D geometries for Modulus Sym analysis, utilizing polygons to represent building footprints within the simulation environment.
- Train and optimize the PINN model using NVIDIA Modulus and PyTorch to simulate urban wind flow dynamics.
- Integrate the trained neural network model into a web application using Vue.js and Three.js to provide real-time interaction and visualizations.
- Facilitate the open-source nature of the project to support urban planners, architects, and researchers, offering insights that enhance urban design and pedestrian comfort.
Significance
This project aims to create an open-source platform that provides access to tools and information for analyzing urban wind flow using advanced NN models. By developing this platform, the project:
- Facilitates open access to simulation tools for urban wind flow analysis, allowing users, researchers, and developers to explore the potential of neural networks in urban environments.
- Promotes the use of Physics-Informed Neural Networks (PINNs) and Computational Fluid Dynamics (CFD) as accessible methods for assessing pedestrian comfort and sustainable urban design.
- Encourages community-driven growth by offering potential tutorial series, educational content, and guides for using the software tools integrated into the platform, including NVIDIA Modulus, PyTorch, and Three.js.
Methodology
Phases:
- Planning: Define the project scope, set up the repository, and outline the research goals. Collect and preprocess real-time wind data from OpenWeatherMap and building geometry from OpenStreetMap using the Overpass API.
- Data Integration: Integrate real-time wind data and 3D building models to represent urban environments accurately for simulations.
- 3D Geometry Generation: Develop 3D geometries using polygons to represent building footprints.
- PINN Model Development: Conduct research and testing using PyTorch. Develop and optimize the PINN model with NVIDIA’s Modulus framework to simulate wind flow dynamics in urban environments.
- Frontend Development: Create a web-based user interface using Vue.js to allow real-time simulations. Employ Three.js for 3D visualization and Geolib.
- System Integration and Testing: Integrate the frontend, backend, and neural network model.
- Deployment and Documentation: Deploy the application as an open-source web platform. Document the research, development process, and usage guidelines to assist future users. Plan for tutorial series and educational content to further facilitate access to the software and methodologies used in this project.
Data Sources
- Real-Time Wind Data: OpenWeatherMap wind conditions.
- 3D Building Models: OpenStreetMap (OSM) data using Overpass API.
Equations and Models
The simulation of urban wind flow in this project is based on the Navier-Stokes equations, which govern the motion of fluid substances. To incorporate the urban geometries and building footprints into the simulations, the model defines boundary conditions derived from the 3D building data sourced from OpenStreetMap.
Physics-Informed Neural Networks (PINNs) are used to solve the Navier-Stokes equations, embedding the physical laws of fluid dynamics into the neural network’s architecture. During training, the model minimizes the residuals of these equations alongside data-driven loss components, which should include wind data from OpenWeatherMap. The Advection-Diffusion equation is also considered for modeling the transport of environmental variables like temperature.
Inverse PINNs (I-PINNs) and Deep Neural Operators (DeepONets) are explored to optimize the model’s parameters and enhance its ability to simulate real-world scenarios accurately. These approaches allow the neural network to generalize to different urban contexts while maintaining adherence to the governing physical equations. NVIDIA Modulus and PyTorch are employed to facilitate the implementation and optimization of these models for efficient simulation testing on GPUs.
Frontend Development
The frontend is developed using Vue.js, with Three.js handling the 3D rendering and Geolib managing geographic calculations. This interface allows users to input geographical data and run wind flow simulations, providing immediate visual feedback.
Learning and Development with NVIDIA Modulus Sym
As part of the development process for this project, I am actively learning how to leverage NVIDIA’s modulus.sym
for building PINNs. The training sessions required for developing accurate models often take up to 12 hours, and they are conducted on my GPU using a WSL. This setup allows me to fully utilize the computational power of my NVIDIA GPU while working in a Linux environment.
Testing Different Techniques
Throughout the research, various techniques were explored to optimize the simulation of urban wind flow:
- Physics-Informed Neural Networks (PINNs): Implemented PINNs to embed the Navier-Stokes and Advection-Diffusion equations into the neural network architecture. This involved training the model to minimize the residuals of these governing equations, allowing for accurate simulation of fluid dynamics within the urban context.
- Inverse PINNs (I-PINNs): Utilized I-PINNs to address inverse problems, enabling the optimization of model parameters using observed data. This method was particularly useful in fine-tuning the simulation to reflect real-world wind conditions and interactions with urban geometries.
- Deep Neural Operators (DeepONets): Investigated DeepONets to develop a framework for mapping functions to functions, providing an efficient means of solving complex simulations. This technique is being tested to handle varying boundary conditions.
- NVIDIA Modulus: Leveraged NVIDIA’s Modulus framework for the implementation and optimization of PINNs and DeepONets. Modulus provided support for GPU-accelerated training, significantly improving the computational efficiency of the simulations. Experiments were conducted in both 2D and 3D geometries to validate the model’s accuracy in capturing wind flow dynamics and its interaction with building structures.
Current Status
The platform’s front and back ends are fully integrated, allowing for user input, real-time data processing, and detailed 3D visualization. The final integration for pedestrian wind assessment is still in progress, with the focus shifting to an intensive period of research and testing using Physics-Informed Neural Networks (PINNs) and Deep Neural Operators (DeepONets).
The current research involves multiple stages of testing different methodologies:
- PINNs: Started with basic simulations using PyTorch, moving through numerical solutions for 1D heat equations, Burgers’ equations, and 2D Navier-Stokes simulations. Tested solutions using DeepXDE for both 1D and 2D models.
- I-PINNs (Inverse PINNs): Explored inverse problems and optimization strategies to fine-tune model parameters using techniques like the TVD method solution.
- DeepONets: Investigated advanced neural operator techniques using PyTorch and DeepXDE for integration and fluid neural operator solutions.
- NVIDIA PINNs: Leveraged NVIDIA Modulus for implementing models such as cavity flow, 2D wave equations, heat sink simulations, and stress analysis.
- NVIDIA DeepONets: Further developed models to include 3D bracket stress analysis, multi-domain calculations, and geometric optimization using PINNs.
Setting Up and Using WSL for CUDA-Enabled GPU Computing
To fully utilize the NVIDIA GPU on my system, I have set up a WSL environment with Ubuntu 20.04, which allows me to run Linux-based software while taking advantage of CUDA for GPU. Below are the steps to replicate this setup:
References
- NVIDIA Modulus. (n.d.). Physics-Informed Machine Learning with NVIDIA Modulus. Retrieved from docs.nvidia.com
- Scientific Machine Learning Through Physics-Informed Neural Networks. (2022). Journal of Computational Physics, 466, 110924. https://doi.org/10.1007/s10915-022-01939-z
- GPT-PINN: Generative Pre-Trained Physics-Informed Neural Networks. (n.d.). Retrieved from arxiv.org
- Using Hybrid Physics-Informed Neural Networks for Complex Engineering Simulations. (n.d.). Retrieved from arxiv.org
- Architectural Strategies for PINN Optimization. (n.d.). Retrieved from docs.nvidia.com
- Scientific Machine Learning through PINNs. (n.d.). Retrieved from physicsbaseddeeplearning.org
- Zappitelli, R., Najjar, S. K., Bovo, R., Maqbool, T., & Kaeuffer, A. (2023). Machine Learning for Pedestrian-Level Wind Comfort Analysis. Buildings, 14(6), 1845. https://doi.org/10.3390/buildings14061845
- Deep learning to replace, improve, or aid CFD analysis in built environment applications: A review. (2021). Building and Environment, 207, 108459. https://doi.org/10.1016/j.buildenv.2021.108459
- Evaluating the pedestrian level of service for varying trip purposes using machine learning algorithms. (2024). Scientific Reports, 14, 53403. https://doi.org/10.1038/s41598-024-53403-7
- NVIDIA Modulus. (n.d.). NVIDIA Modulus – Advanced Topics. Retrieved from courses.machinedecision.com
- Can Taichi play a role in CFD? | Taichi Docs. (n.d.). Retrieved from docs.taichi-lang.org
- Table of Contents | NVIDIA Docs. (n.d.). Retrieved from docs.nvidia.com
- Regression using LightGBM – GeeksforGeeks. (n.d.). Retrieved from geeksforgeeks.org
- Random Forest Regression in Python – GeeksforGeeks. (n.d.). Retrieved from geeksforgeeks.org
- Computer Fluid Dynamics Python at DuckDuckGo. (n.d.). Retrieved from duckduckgo.com
- Deep Learning. (n.d.). Retrieved from docs.nvidia.com
- Physics-Informed Machine Learning through Modulus | Physical Loss Code. (n.d.). Retrieved from physicsbaseddeeplearning.org
- CFD Analysis in Built Environment Applications Using Deep Learning: A Review. (2024). Journal of Building and Environment, 207, 108459. https://doi.org/10.1016/j.buildenv.2021.108459
- Evaluating the Pedestrian Level of Service for Varying Trip Purposes Using Machine Learning Algorithms. (2024). Nature Communications, 14, 53403. https://doi.org/10.1038/s41598-024-53403-7
- Computer Fluid Dynamics Python at DuckDuckGo. (n.d.). Retrieved from duckduckgo.com
- Deep Learning to Replace, Improve, or Aid CFD Analysis in Built Environment Applications: A Review. (2024). Building and Environment, 207, 108459. https://doi.org/10.1016/j.buildenv.2021.108459
So, what is a physics-informed neural network? https://benmoseley.blog/my-research/so-what-is-a-physics-informed-neural-network/