Ansys Twin Builder CFD Example: Building, Validating, and Evaluating Static ROM
Introduction
In this video, we explore the process of starting a new project in Ansys Twin Builder, focusing on building, validating, and evaluating a Static Reduced Order Model (ROM).
Project Setup
- Open the Static ROM builder screen.
- Select the appropriate folder for the project via the browser.
- Review the different design points available for study.
Design Points Analysis
We can sort design points based on various criteria:
- Average value of velocity fields
- Mean and maximum values
- Range and maximum absolute values
Models can be viewed in isometric or two-dimensional views, with options to toggle shading effects.
Building the ROM
- Select design points: 3, 4, 5, 11, 12, 13, 14, 15, 19, 21, 22, 23.
- Use 80% of the 24 design points to create the ROM.
- Apply and click reduce for automatic computation of the minimum number of modes.
- Adjust the number of modes to improve accuracy, reducing errors significantly.
Validation Phase
In the validation phase, compare the reference model with the ROM result:
- Examine errors, particularly in model 2.
- Adjust lighting and views as needed.
- Focus on both color and magnitude of errors.
Evaluation Phase
During evaluation:
- Manipulate input parameters to observe changes in the flow field.
- Stay within the learning input parameter range to avoid warnings.
Exporting the ROM
- Export the ROM to the Twin Builder.
- Drag and drop the ROM into the schematic page for further steps.
Contact Information
For more information, please contact us at Ozen Engineering, Inc.
Let's start with the new Ansys Twin Builder project. We will go to Static ROM and open the Static ROM builder screen, and go to the browser to select the appropriate folder for this project. This brings us to all the different design points that are studied or set for this particular example.
We can sort all the design points, and this is based on the average value of the fields, which are velocity. We can change it to the mean and maximum values and take a look at the range, as well as the maximum absolute values.
We have the option of either taking a look at the screen in a wider manner or bringing the model in front of us here. Let's go back to the averages again and examine a few models. When you select the model, the corresponding velocity field is shown.
For different models where the speeds are different for the small inlet region and the large inlet region, you can definitely see the impact of that for different designs. By default, the model is shown in an isometric view, as you see here.
Clicking on the Z axis brings us to a two-dimensional view. We can also toggle off the shading effects from this button. So let's go to the build phase to build the ROM. All these design points are shown here, and we're going to select a few of them to create the ROM using the corresponding data.
Let us consider 3, 4, 5, and 11, 12, 13, 14, 15, 19, 21, 22, 23. Now, from here, we should go with the optimal distribution, and 80% means we have 24 design points, and we will only use half of them to create the ROM. We have already selected those 12 points.
Let's apply and click on reduce for the automatic computation of the minimum number of modes to accurately reconstruct the original learning data set.
With that, the reduction errors are shown for the particular selections, and also the number of modes is shown as 3, which is computed, and this already gives us good results in terms of accuracy on both learning and validation snapshots.
However, if you look at design 20, we see actually quite a large error. So if we select this design and recompute, now we see better results compared to the previous build.
In this case, the maximum error is reduced to 13.5, as opposed to 25. We always have the option of making the ROM better while increasing the number of modes. So let's explore increasing the number of modes and see how it changes.
Bringing the number of modes to 5, as you see, the percentage error reduces to almost always less than 2%, except for this snapshot. So at this stage, we can build this reduced order model.
Once we build the reduced order model, we still see larger errors with the snapshot or the design 10 and 16. So let's try to improve the ROM predictions for these snapshots. In order to do that, let's include these data points into the model learning part.
Let's also increase the number of modes again. When we build this ROM, now, as can be seen here, the maximum error reduces to 7.7 with this particular design. And for number 10 and number 16, the associated errors are significantly lower.
So this ROM can definitely be improved, but for this particular case, let's assume that we are satisfied, and we are going to move on to the validation phase. So let's take a look at model 2, or the snapshot 2, where we had the most error.
Again, we can change the lighting here, as well as change the views. So, this screen actually, in the validation phase, we have the reference, and we have the ROM result, and the corresponding difference.
And as you see, the maximum, or the majority of the differences, are actually on this far-up side of the model. If you take a look at the other scenarios, the errors are significantly low compared to this case, model 2. Don't always look at the color; also, look at the magnitude.
So if you see red, you don't have to be alert; the numbers, the values, or the magnitudes are low. So let's move to the evaluate phase. Current ROM. So let's assume that we are satisfied with this ROM and let's proceed accordingly.
For that purpose, we will save, and we are going to save it as, and it is already saved. So once we do that, the corresponding ROM is actually saved under the working directory. So let's perform the evaluation.
In order to do that, we will get into these two input parameters to the ROM, and we can drag and manipulate the corresponding speeds.
And as we do that, you see that there is actually a lot of change happening on the flow field, such as this, when we increase the large inlet speed compared to the smaller inlet speed. Let's do the opposite, pretty much now.
The large inlet section is actually with a very low speed, whereas the small inlet section here is with a high speed. And you can immediately predict what happens in the flow field. Please also note that if you actually stay outside of the learning input parameter range, you will get a warning.
And for the accuracy of the results, it's a better idea to try to stay in the range to not receive this warning. So the next step is to export this ROM to the Twin Builder. Select all of the selections, hit export, and then we have the message that the ROM has been successfully exported.
Let's close this, let's quit, and when we get to the Twin Builder screen, now we have my ROM from already here, that can always be dragged and dropped into the schematic page here for further twin building steps. Please contact us at https://ozeninc.com/contact for more information.

