February 2026 ยท 8 min read

Machine Learning as a Numerical Viscosity Optimizer

Machine LearningOptimizationCFD
โ† Back to All Blogs

Numerical viscosity is the artificial dissipation we add to stabilize shock-capturing schemes. Too little, and oscillations destroy the solution. Too much, and shocks are smeared beyond recognition. Finding the right balance has traditionally been more art than science โ€” until now.

The Problem with Fixed Viscosity

Classical schemes use fixed viscosity coefficients:

The fundamental issue is that optimal viscosity varies in space and time. Near shocks, we need more dissipation. In smooth regions, we need less. But how do we know where we are?

Enter Reinforcement Learning

We frame viscosity tuning as a reinforcement learning problem:

The RL agent learns a policy that maps local flow conditions to optimal viscosity coefficients. After training on a diverse set of problems, the agent generalizes to unseen configurations.

Results

Our preliminary results are promising:

"The RL agent discovers strategies that human experts might not consider โ€” for example, using negative viscosity in carefully controlled regions to sharpen contacts, something traditional limiters avoid."

Challenges

This approach is not without challenges:

Future Directions

We are exploring several extensions:

Conclusion

Machine learning offers a powerful new paradigm for optimizing numerical methods. By framing viscosity tuning as an RL problem, we can leverage decades of progress in AI to enhance classical numerical schemes. The marriage of both fields is just beginning.

Prashant Kumar Pandey

Prashant Kumar Pandey

Assistant Professor of Mathematics at Amity University, Ranchi. Researcher in numerical methods for PDEs, AI integration, and quantum-inspired computing.