Reducing Spatial Discretization Error on Coarse CFD Simulations Using an OpenFOAM-Embedded Deep Learning Framework

Read original: arXiv:2405.07441 - Published 9/6/2024 by Jesus Gonzalez-Sieiro, David Pardo, Vincenzo Nava, Victor M. Calo, Markus Towara
Total Score

0

🤿

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Propose a method to reduce spatial discretization error in coarse computational fluid dynamics (CFD) problems
  • Use a deep learning model to enhance low-resolution CFD simulations using high-quality data
  • Substitute the default differencing scheme for the convection term with a neural network that interpolates velocities from cell centers to face values
  • Develop an end-to-end differentiable model by integrating the open-source CFD code OpenFOAM
  • Automatically differentiate the CFD physics using a discrete adjoint code version
  • Implement a fast communication method between TensorFlow (Python) and OpenFOAM (C++) to accelerate training
  • Apply the model to the flow past a square cylinder problem, reducing error by 50% on an 8x coarser mesh compared to the traditional solver

Plain English Explanation

This research proposes a novel approach to improve the accuracy of coarse computational fluid dynamics (CFD) simulations. CFD is a widely used technique to model the behavior of fluids, such as air or water, as they flow around objects. However, coarse or low-resolution CFD simulations can suffer from significant errors due to the simplifications made in the numerical methods.

The researchers have developed a deep learning-based method to enhance the quality of these low-resolution CFD simulations. They train a neural network to interpolate the fluid velocities from the cell centers to the cell faces, which is a key step in the CFD calculations. By substituting this neural network for the default differencing scheme, the model can produce velocity values that better approximate the fine-mesh, high-quality data.

Importantly, the researchers have integrated their deep learning framework with the open-source CFD software OpenFOAM, creating an end-to-end differentiable model. This means the entire CFD simulation, including the deep learning component, can be automatically differentiated, allowing for efficient training and optimization.

To demonstrate the effectiveness of their approach, the researchers applied the model to the classic problem of flow past a square cylinder. They were able to reduce the error in the x- and y-velocity components by around 50% compared to the traditional CFD solver, using an 8 times coarser mesh. This is a significant improvement, as it allows for much faster simulations without sacrificing too much accuracy.

The key advantages of this approach are that it is relatively affordable in terms of time and data samples required for training, as the neural network architecture exploits the local features of the physics, and it can generate stable predictions for mid-term simulations.

Technical Explanation

The researchers propose a method to reduce the spatial discretization error in coarse computational fluid dynamics (CFD) problems by enhancing the quality of low-resolution simulations using a deep learning model. They substitute the default differencing scheme for the convection term with a feed-forward neural network that interpolates velocities from cell centers to face values to produce velocities that better approximate the fine-mesh data.

The deep learning framework is integrated with the open-source CFD code OpenFOAM, resulting in an end-to-end differentiable model. The researchers automatically differentiate the CFD physics using a discrete adjoint code version, allowing for efficient training and optimization. They also implement a fast communication method between TensorFlow (Python) and OpenFOAM (C++) to accelerate the training process.

The proposed model is applied to the flow past a square cylinder problem, reducing the error in the x- and y-velocity components by around 50% for simulations outside the training distribution, compared to the traditional solver, using an 8x coarser mesh. The researchers note that the training is affordable in terms of time and data samples, as the architecture exploits the local features of the physics while generating stable predictions for mid-term simulations.

Critical Analysis

The research presented in this paper offers a promising approach to enhance the accuracy of coarse CFD simulations using deep learning. By substituting a neural network for the default differencing scheme, the model can better capture the complex fluid dynamics and produce results that more closely match high-resolution simulations.

One potential limitation of the approach is that it may be specific to the particular CFD problem and boundary conditions used in the training data. The researchers mention that the model performs well for simulations outside the training distribution, but it's unclear how well it would generalize to a wider range of CFD problems or more complex geometries.

Additionally, while the researchers claim the training process is affordable, the computational resources required to train and deploy the model, especially for large-scale CFD problems, could still be a barrier for some users. Further research may be needed to optimize the model architecture and training process to make it more accessible and scalable.

The paper also does not address the potential for the neural network to introduce new sources of error or instability into the CFD simulation. While the researchers demonstrate improved accuracy, it would be valuable to have a more detailed analysis of the model's robustness and reliability under different conditions.

Despite these potential limitations, the dynamic-deep-learning-based-super-resolution-shallow, end-to-end-mesh-optimization-hybrid-deep, pird-physics-informed-residual-diffusion-flow-field, pointsage-mesh-independent-superresolution-approach-to-fluid, and enhancing-wind-field-resolution-complex-terrain-through techniques presented in this paper represent a valuable contribution to the field of CFD, demonstrating the potential of deep learning to improve the accuracy and efficiency of these simulations.

Conclusion

This research proposes a novel deep learning-based method to enhance the accuracy of coarse computational fluid dynamics (CFD) simulations. By substituting a neural network for the default differencing scheme, the model can better capture the complex fluid dynamics and produce results that more closely match high-resolution simulations.

The key advantages of this approach are its affordability in terms of training time and data samples, as well as its ability to generate stable predictions for mid-term simulations. The researchers have demonstrated the effectiveness of their method by applying it to the flow past a square cylinder problem, achieving a significant reduction in error compared to the traditional CFD solver.

While the paper highlights the promise of this technique, further research may be needed to explore its generalizability, robustness, and scalability to larger and more complex CFD problems. Nevertheless, this work represents an important step forward in the integration of deep learning and computational fluid dynamics, paving the way for more accurate and efficient simulations in a wide range of applications.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

🤿

Total Score

0

Reducing Spatial Discretization Error on Coarse CFD Simulations Using an OpenFOAM-Embedded Deep Learning Framework

Jesus Gonzalez-Sieiro, David Pardo, Vincenzo Nava, Victor M. Calo, Markus Towara

We propose a method for reducing the spatial discretization error of coarse computational fluid dynamics (CFD) problems by enhancing the quality of low-resolution simulations using deep learning. We feed the model with fine-grid data after projecting it to the coarse-grid discretization. We substitute the default differencing scheme for the convection term by a feed-forward neural network that interpolates velocities from cell centers to face values to produce velocities that approximate the down-sampled fine-grid data well. The deep learning framework incorporates the open-source CFD code OpenFOAM, resulting in an end-to-end differentiable model. We automatically differentiate the CFD physics using a discrete adjoint code version. We present a fast communication method between TensorFlow (Python) and OpenFOAM (c++) that accelerates the training process. We applied the model to the flow past a square cylinder problem, reducing the error from 120% to 25% in the velocity for simulations inside the training distribution compared to the traditional solver using an x8 coarser mesh. For simulations outside the training distribution, the error reduction in the velocities was about 50%. The training is affordable in terms of time and data samples since the architecture exploits the local features of the physics.

Read more

9/6/2024

Coupling Machine Learning Local Predictions with a Computational Fluid Dynamics Solver to Accelerate Transient Buoyant Plume Simulations
Total Score

0

Coupling Machine Learning Local Predictions with a Computational Fluid Dynamics Solver to Accelerate Transient Buoyant Plume Simulations

Cl'ement Caron, Philippe Lauret, Alain Bastide

Data-driven methods demonstrate considerable potential for accelerating the inherently expensive computational fluid dynamics (CFD) solvers. Nevertheless, pure machine-learning surrogate models face challenges in ensuring physical consistency and scaling up to address real-world problems. This study presents a versatile and scalable hybrid methodology, combining CFD and machine learning, to accelerate long-term incompressible fluid flow simulations without compromising accuracy. A neural network was trained offline using simulated data of various two-dimensional transient buoyant plume flows. The objective was to leverage local features to predict the temporal changes in the pressure field in comparable scenarios. Due to cell-level predictions, the methodology was successfully applied to diverse geometries without additional training. Pressure estimates were employed as initial values to accelerate the pressure-velocity coupling procedure. The results demonstrated an average improvement of 94% in the initial guess for solving the Poisson equation. The first pressure corrector acceleration reached a mean factor of 3, depending on the iterative solver employed. Our work reveals that machine learning estimates at the cell level can enhance the efficiency of CFD iterative linear solvers while maintaining accuracy. Although the scalability of the methodology to more complex cases has yet to be demonstrated, this study underscores the prospective value of domain-specific hybrid solvers for CFD.

Read more

9/12/2024

🤿

Total Score

0

C(NN)FD -- a deep learning framework for turbomachinery CFD analysis

Giuseppe Bruni, Sepehr Maleki, Senthil K. Krishnababu

Deep Learning methods have seen a wide range of successful applications across different industries. Up until now, applications to physical simulations such as CFD (Computational Fluid Dynamics), have been limited to simple test-cases of minor industrial relevance. This paper demonstrates the development of a novel deep learning framework for real-time predictions of the impact of manufacturing and build variations on the overall performance of axial compressors in gas turbines, with a focus on tip clearance variations. The associated scatter in efficiency can significantly increase the CO2 emissions, thus being of great industrial and environmental relevance. The proposed C(NN)FD architecture achieves in real-time accuracy comparable to the CFD benchmark. Predicting the flow field and using it to calculate the corresponding overall performance renders the methodology generalisable, while filtering only relevant parts of the CFD solution makes the methodology scalable to industrial applications.

Read more

5/20/2024

🤿

Total Score

0

Dynamic Deep Learning Based Super-Resolution For The Shallow Water Equations

Maximilian Witte, Fabricio Rodrigues Lapolli, Philip Freese, Sebastian Gotschel, Daniel Ruprecht, Peter Korn, Christopher Kadow

Using the nonlinear shallow water equations as benchmark, we demonstrate that a simulation with the ICON-O ocean model with a 20km resolution that is frequently corrected by a U-net-type neural network can achieve discretization errors of a simulation with 10km resolution. The network, originally developed for image-based super-resolution in post-processing, is trained to compute the difference between solutions on both meshes and is used to correct the coarse mesh every 12h. Our setup is the Galewsky test case, modeling transition of a barotropic instability into turbulent flow. We show that the ML-corrected coarse resolution run correctly maintains a balance flow and captures the transition to turbulence in line with the higher resolution simulation. After 8 day of simulation, the $L_2$-error of the corrected run is similar to a simulation run on the finer mesh. While mass is conserved in the corrected runs, we observe some spurious generation of kinetic energy.

Read more

4/10/2024