This article describes a method, how to build dynamic, time-dependent reduced order models using a neural network approach in ROM Builder. As data source a DOE study of transient Simcenter STAR-CCM+ simulations is used.
With reduced order models (ROMs) you can achieve much faster response times for a given input compared to full 3D simulations. This is especially useful for system simulations, design space explorations or smart machines (e.g. LiveTwin).
The current implementation of surrogate modeling in Simcenter STAR-CCM+ Design Manager allows you to create only static response surface models that are not suitable for transient simulation data. In this small example it is shown, how to leverage ROM Builder in order to use a neural network modeling approach for the creation of such a dynamic, time-dependent model.
A variable thickness steak is grilled in a variable temperature grill until the core temperature reaches 55 C (131 Fahrenheit). The output of the simulation is the progression of the core temperature over time. Using a ROM, one can predict when the steak is well done without having to measure the core temperature directly. The Simcenter STAR-CCM+ simulation model accounts for the geometry and multiple heat transfer modes such as conduction, convection and radiation.
Prepare a simulation template that is ready for design studies (create parameters, clear results)
Create a Monitor Plot to display ALL inputs and outputs that will later be used for the ROM
Create a macro to export the Monitor Plot as CSV file into the same directory for all design variants (change file name for each variant), using comma (",") as separator for columns
Simcenter STAR-CCM+ Design Manager
Setup a DOE study (ideally using an adaptive sampling algorithm) that covers the whole design space. The number of design variants depends on the complexity (number of parameters) and dynamics (number of inflection points in the output graph per time) of the model
Apply the macro to be executed "before results". The CSV-files are the only output you need later
Multi-files import: select CSV Files filter rather than "All", so you can multi-select all files easily
All common parameters will be listed. Don't use the time column as time reference, but create your own time sample by entering the sample time (the time step size that was used for the monitor). The time parameter is later be used for the training as input variable
Select, which data will be used for training and for validation. Usually, a 80:20 ratio is a good split
In the model tab, create a new model and use "model sweep" as initial search for a good model approach. If this method does not return a model with sufficient fidelity (> 95% for training and validation), then create a new model for manual tuning of the parameters
For dynamic time series, Auto-Regressive models or Neural Networks are available. The Auto-Regressive model can be used only on a single time series, so it is not suitable for this parameter study, so you may select "Neural Network"
In the "Model Setup" section, use the wizard for the initial model parametrization of the hidden layers. Increase the sample time to reduce the number of data points for training (accelerates convergence)
In the "Training" section, set the number of epochs > 100, maybe to 200. Increase the number to reduce the "Training Loss". Decrease if "Validation Loss" is increasing. In this case, there is an "overfitting", which means that the model only predicts well the training data, but fails for other inputs that were not used for training.
The Levenberg-Marquardt optimizer gave better fitting results, but works only with a small amount of samples (12 time series rather than 200 for training, 2 s sample time rather than 1 s and sequence length of 12). The Stochastic Gradient Descent optimizer works better with larger amount of training data (for more complex models), but the fitting results are inferior
After training, store the model and evaluate the model predictions versus the original (validation) data. If not satisfied, change the model parameters and re-train the model
Export with "Model Exchange" option (to be used in Simcenter Amesim, LiveTwin) or Co-Simulation option (to be used in Simcenter HEEDS, Simcenter STAR-CCM+)
Results for steak temperature and time to compute the time series for 500 seconds real time:
Simcenter STAR-CCM+: 38.3 Celsius after 254 seconds CPU time (2D model, 6250 cells, single core)
Simcenter Amesim/FMU: 38.58 Celsius after < 1 second CPU time