2 min readfrom Machine Learning

AeroJAX: JAX-native CFD, differentiable end-to-end. ~560 FPS at 128x128 on CPU [P]

Our take

Introducing AeroJAX, a JAX-native computational fluid dynamics (CFD) framework designed for differentiable Navier-Stokes simulations within machine learning workflows. With a focus on end-to-end differentiability, AeroJAX enables seamless integration into optimization and learning pipelines, allowing for innovative inverse design and learned closures. Its fully JAX-native architecture ensures no external dependencies, while CPU-optimized performance achieves approximately 560 frames per second at 128x128 resolution. By maintaining the integrity of physics while promoting differentiable flow fields, AeroJAX transforms the way CFD interacts with machine learning systems.

The emergence of AeroJAX represents a significant leap forward in the integration of computational fluid dynamics (CFD) with machine learning (ML) frameworks. By creating a fully JAX-native CFD framework that maintains differentiability throughout the simulation process, AeroJAX opens new avenues for innovation in areas such as inverse design and learned closures. This development aligns with a broader trend in the tech landscape, where companies like Wirestock are leveraging creative multimodal data to enhance AI capabilities, and Uber is expanding its engineering footprint to support product development. Each of these initiatives underscores a collective move toward more integrated and efficient workflows, which is vital in today’s fast-paced technological environment.

At its core, AeroJAX addresses a common limitation within current CFD and ML pipelines: the treatment of solvers as black boxes. This restriction often complicates gradient-based optimization, making it challenging for practitioners to leverage physical insights in their designs. By ensuring that the entire solver stack remains differentiable, AeroJAX allows for seamless integration of physics with ML, enabling practitioners to not only analyze but also optimize fluid flows based on geometry. The potential applications for such technology are profound, particularly in fields requiring precision and adaptability, such as aerospace engineering and environmental modeling.

Moreover, the design choices made in AeroJAX reflect a commitment to accessibility and performance. With a CPU-first vectorized implementation and no external dependencies, the framework is poised to cater to a wide range of users, from seasoned engineers to newcomers exploring CFD. The emphasis on end-to-end differentiability through velocity, pressure, and vorticity fields adds another layer of utility, enabling users to explore complex phenomena in a more intuitive manner. This design philosophy is reminiscent of the recent migration of a large project into an AI-native workflow, as detailed in the article, "I Let CodeSpeak Take Over My Repository," which highlights the transformative power of modern tools in simplifying complex processes.

As we reflect on the implications of AeroJAX, it’s essential to consider the future of hybrid physics and learned models. The framework not only enhances our understanding of turbulent flows but also serves as a differentiable data generator for machine learning systems. This fusion of physics-based simulations with ML could lead to breakthroughs in how we model complex systems, potentially revolutionizing industries from automotive design to climate science. The ability to learn turbulence or residual closures directly within the solver loop stands to empower users significantly, allowing them to harness the full potential of their data without sacrificing the integrity of the underlying physics.

Looking ahead, the challenge will be to see how widely AeroJAX is adopted across various sectors and what innovations it may spur within the realm of CFD and ML integration. As industries increasingly rely on data-driven insights, the question remains: will frameworks like AeroJAX set the standard for future simulations, or will new contenders emerge to redefine the landscape once again? The potential for innovation is immense, and the coming years will be pivotal in shaping how we approach fluid dynamics and machine learning.

I have been building a JAX based CFD framework for differentiable Navier Stokes simulation inside ML loops such as inverse design and learned closures.

The goal is to keep the full solver stack differentiable so it can sit inside optimisation and learning pipelines.

Design choices:

  • Fully JAX native with no external dependencies
  • CPU first vectorized implementation
  • End to end differentiability through velocity, pressure, and vorticity fields
  • Navier Stokes (projection method) and LBM (D2Q9) support
  • Brinkman style forcing with smooth masks for geometry handling

Currently:

  • 2D incompressible Navier Stokes solver using projection and pressure correction
  • LBM solver integrated into the same framework
  • Performance is CPU bound and grid dependent
    • ~560 FPS at 128x128
    • ~300 FPS at 512x96
  • Differentiable flow fields throughout the pipeline
  • Hooks for neural operators and learned corrections inside the solver loop

Here is the true value:

  • Inverse design where geometry maps to flow and gradients propagate back to geometry
  • Learning turbulence or residual closures directly in the solver
  • Using CFD as a differentiable data generator for ML systems
  • Hybrid physics and learned models without breaking gradient flow

Most CFD and ML pipelines still treat the solver as a black box, which makes gradient based design difficult or impossible.

AeroJAX is an attempt to keep the physics structure intact while making the entire pipeline differentiable.

submitted by /u/LackSome307
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article