Skip to main content

Discover how machine learning and Stochos are revolutionizing CFD predictions in the manufacturing industry.

Challenges

Predicting flow fields in complex fluid dynamics scenarios has always been a significant challenge for engineers and scientists. Traditional Computational Fluid Dynamics (CFD) methods require massive computational resources and time, making it difficult to handle real-time predictions and large-scale simulations.

Moreover, the high cost associated with these simulations and the need for fine-tuning numerous parameters often result in inefficiencies. Addressing these challenges requires innovative approaches that blend accuracy, speed, and cost-effectiveness.

Engineering Solution

Integrating Stochos into the engineering workflow involves a seamless process where the machine learning model is trained on historical CFD data. Once trained, Stochos can predict flow fields for new scenarios without the need for extensive simulations.

This integration allows engineers to focus more on innovation and less on repetitive tasks, thereby enhancing overall productivity and efficiency in the engineering process.

Previously, the Stochos application to predict the scalar quantities was demonstrated on a benchmark case1. In this blog, the application will be extended to predict the field properties.  

Benchmark Application:

A compressed tube with a valve was utilized. The typical CFD workflow is demonstrated in Figure 1. This benchmark study was for a medical device application, therefore the operating fluid is set to blood properties. The variables considered are pressure, velocity, and hemolysis index (HI) 

Figure 1. The CFD workflow of the benchmark application 

 

To feed the Stochos model, the 12 training conditions from the previous application were considered. A new data point (Test 4) is added to the test conditions (Figure 2).  

Figure 2. Training and test conditions

For all these conditions, the CFD workflow was followed, and field properties were predicted. The data were extracted for the entire flow field and used to feed the Stochos model. Therefore, the initial steps of the Stochos model were to read the data and create train and test groups. The model uses regression analysis and makes a model fit with the train data. Then, the model predicts using the test data. The r2's were calculated considering all the nodes of the provided models (Figure 3). 

Figure 3. The main body of the Stochos code

The code further calculates the absolute and relative errors for the field variables for comparison.

The r2's demonstrate that, Stochos model is on good agreement with the CFD predictions (Table 1). 

Table 1. r2's for the test conditions

Figure 4 demonstrates the contours of the field variables from CFD prediction, Stochos prediction, and absolute error for Test 2.  The Stochos predictions are both qualitatively and quantitatively in good agreement with the CFD predictions. Considering the processing time that it takes to get the Stochos predictions, this is extremely promising. 

Figure 4. Predicted field variables and absolute error for Test 2

 

For Test 4 the error in the predictions is high compared to the others, even though the r2's are still greater than 0.83. In order to enhance the model, these test conditions can be added to the train list, and new test conditions can be considered. The more the data, the better the Stochos predictions within the design space.

 

Ozen Engineering Expertise

Ozen Engineering Inc. leverages its extensive consulting expertise in CFD, FEA, optics, photonics, and electromagnetic simulations to achieve exceptional results across various engineering projects, addressing complex challenges like multiphase flows, erosion modeling, and channel flows using Ansys software.

We offer support, mentoring, and consulting services to enhance the performance and reliability of your mining equipment and systems. Trust our proven track record to accelerate projects, optimize performance, and deliver high-quality, cost-effective results for both new and existing systems. For more information, please visit https://ozeninc.com.

 

1. Ozen Engineering Blog: Machine Learning on CFD Predictions: Use of Stochos on a Benchmark Application

Post by Ertan Taskin
February 13, 2025