English

# Post-processing with OnScale Solve™

By Cyprien Rusu 24 November 2020

This article will talk about all the various ways to post-process your data in OnScale Solve from the tools available in the GUI to data processing using Jupyter notebook.

## What is post-processing?

If this is the first time you hear about Post-processing, let me explain this term briefly before starting to talk more in details about it.

In CAE simulation, the workflow is usually composed of 3 main steps:

1. Building the numerical model
2. Solving this model using physical equations

Phase 1 is called Pre-Processing because the model has to be constructed, phase 2 is called “Solving” because all the work is done by the numerical solver which has to calculate and process the data, phase 3 is called “Post-processing” because it involves taking the raw data obtained from the Solver and using some numerical data analysis tools to transform those data into various more understandable format.

So you could say that data post-processing is some kind of data analysis.

For example, if the solver delivers the resultant forces obtained from the calculation into a json text file format, it won’t be easy to understand what it means until you transform that data into a table or a plot that can be easily read and integrated into a report.

## What kind of tools do you have in OnScale Solve to post-process the data?

The first type of tools are the ones which seem the most simple, but under the hood are the most complex to put in place. Let’s review the various post-processing tools available in OnScale Solve.

## Result Fields Color Maps

The result field plots in 3D which allow you to visualize instantly the displacement, stress or strain calculated results on nodes or elements.

For example, here you can see the displacement magnitude results of an alloy car wheel:

To understand what those colors mean, you have to look carefully at the legend at the bottom of the screen:

From this legend, you understand that the minimum displacement magnitude value is 0 mm and the maximum displacement magnitude value in this simulation is 0.21 mm. The values of displacements in between are displayed with a gradient of colors going from yellow to violet in this case.

In case you want to change the gradient of colors (generally called the “color map”), you can do it through the Legend menu on the right and selecting the Color Palette that you like:

It’s worth to note that some color schemes are more adapted that others to certain types of analysis. Experts will tell you, for example, that the Inferno and Black Body color maps are much better to represent the temperature distribution of a thermal simulation than the others!

Some last note, some color schemes with too many colors might give a false impression of the underlying data set and appear to squeeze some data ranges, obscuring the data behind… so remember that colors are cool, but ultimately, what’s important is the data behind those colors.

## Visualizing the Deformation Scale

Okay, now you know everything about the colors!

Colors are great to represent a wide range of results directly mapped onto your simulation mode, but they don’t give you the full picture. You still need to be able to understand in which direction the displacements are acting and how your mechanical system deforms under the applied boundary conditions.

That’s why the deformation scale is critical to all users:

The deformation of this bike frame looks huge… but keep in mind that the deformation shown on the screen is always increased compared to the real deformation. When performing a linear static simulation, the deformation HAS to be small anyway to fit the hypothesis of small displacements… otherwise it means that your calculations are wrong.

The real maximum displacement here is 0.16 mm, but it looks like 5 cm at least. Changing the deformation scale in OnScale Solve is easy. Drag the deformation slider from left to right to increase and choose the deformation value that makes you the most comfortable.

When you know something is going on inside your results, but you can’t get a grip on what it is when you look from the outside, that’s when you know it’s time to get into some slicing!

You can slice your model in any X,Y,Z direction in OnScale Solve and discover the mysteries hidden deep inside your results:

## Understand the results at any node

Now you might be thinking: “Okay, I can get all the results just by looking at the colors and the color map… but what if I wanted to know the exact value of, say, the Von Mises Stresses at a specific location? How can I do that?”

Great question, it’s always important to understand in depth the results at all the critical locations of the model. Fortunately, it’s so easy to do in OnScale Solve that we can easily miss it…

Just pass over the model results with the cursor of the mouse and have a look at the moving tooltip on the top of the legend… That’s it! Easy right?

## Advanced Data Analysis with Jupyter Notebook and Python

There are many more advanced post-processing possibilities that you might want to try… and it’s not surprising because “Data Analysis” is a field in itself.

Let me give you a simple example:

You applied a force on this surface and you would like to check the reaction force… either in a table or plotted into a graph.

You can use Jupyter Notebook for that… Just click on the second small icon of the floating bar near the right menu to open it:

That’s what you should see now:

On the left, you will find your simulation data files (raw data files this time!) and on the right, you have the different programs (called “Jupyter Kernels”) that you can use to process your raw data.

Now a quick question… okay, that’s great, but what is Jupyter? I still don’t get it…

The short explanation is that Jupyter is a graphical interface in the browser to run some python code in the cloud (or MATLAB code with Octave).

If you have never heard about Jupyter Notebook, I really recommend you to have a look at the website jupyter.org to get some knowledge about how it works. Everyone doing data analysis uses it, so it’s really helpful to understand it.

## How to plot the resultant forces in Jupyter Notebook

I’ll give you an example right away, so you’ll see immediately how it works.

Double click to open the examples folder and then double click on the notebook Extract_Force_Resultants.ipy

What you see here is an example of Notebook that we have built up for you.

Each cell has some python code in it and a description explaining what it does. Click on the first cell and then click on the Run button to execute the code (you can also press Shift+ Enter):

This code get’s executed cell by cell and does the following for you:

• It finds the resultant force data within the raw data simulation files

• It stores that data into and array and displays to you the different resultants that you can plot

• It plots the data into a graph and then in a table

Have a look at this graph for example, it tells you that a reaction force of 500 N has been applied on SupportFace and EndFace (there is a minus sign).

## How to export your data from Jupyter Notebook

Finally, you can save the data into an image and a csv file that can then be exported.

Now, you start to get an idea of the potential of post-processing under the hood. What you can do with Jupyter and Python on your simulation data is nearly limitless.

## Join us in writing useful Jupyter notebook scripts for FEA post-processing

Got some ideas of post-processing that you would like to perform, but you don’t know how to write the script?

Write and tell us what you want to see and we will make it happen!

Also if you have some useful scripts that you would like to share with us, please don’t hesitate. If you agree, we can even put it in the example folder to benefit all OnScale Solve Users.

## How to Get Started With OnScale Solve:

Engineers, designers, analysts, and current OnScale users can learn more about OnScale Solve and run their first cloud engineering simulation study by accessing these resources:

• Create your Free private account here.
• Watch a quick guided video tour of the software, from log in to simulation.
• Run your first simulation by following a 10-minute online tutorial.
• Ask for technical support by emailing support@onscale.com.

We hope to see all your great post-processing ideas coming to life soon with all the new tools we put at your disposal!

## You may also like…

### Simulating plastic materials in OnScale Solve

By 30 January 2023

### Simulate Contact Mechanics

By 19 January 2023

### Simulating Spinning Bodies

By 11 January 2023