Skip to main content

Preliminary Sensitivity Analysis

This is a basic tutorial of Uptimai software prepared to give a first introduction to the suite, and how to run its different features. To complete this tutorial there will be needed the Uptimai software and a *.zip file with some complementary files required for the example problem to be solved. The Wing.zip file can be found inside Uptimai Member Area -> Downloads -> Tutorial cases.

The Wing.zip file contains the whole project folder with the Wing weight function, so the user can start at any step of the given tutorial. Nevertheless, if the user wants to fulfil the tutorial from the beginning, only the Python script Wing.py will be necessary, as all the other files will be generated during the process.

This tutorial will show you:

  • How to start the project
  • How to run each program of the package
  • What are the main features of each program and how to use them
  • What are the results you can expect
  • How to export and store output data

Part 1: Launcher

1.1: Start the program

Open the Uptimai software. You can use the Start menu or desktop shortcut if this option was selected during the installation process, or find the executable inside the installation folder

Figure 1: Launcher of the Uptimai software package - Initial state

1.2: Begin the project

Create a New Project. You will have to choose an empty folder where all the project files will be located. The name of the folder will become the name of the project, in this example, we will use the name WingWeight. You can create the folder directly from the interface.

Uptimai project

Once you have created the project, an *.uptim file will appear inside your project folder. That file is used as a flag so the folder is recognized as an Uptimai project, and contains the information about already available sets of input files, setups, etc.

The basic rule for the *.uptim file is the file name that has to be the same as the name of the project folder.

Figure 2: Launcher of the Uptimai software package - Project created

1.3: Proceed to Tools

Now, you have access to all the different features that conform to the Uptimai suite. In this tutorial, we will use them one by one.

To switch between projects if needed, close the current one with the Close project button at the bottom left of the window and use the Open button of the Launcher (see Figure 1) to run another one.

Part 2: Input Preprocess

2.1: Open the Input Preprocessor tool

The first step of all projects is always the Input Preprocessor, which can be opened directly from the Launcher. The initial state can be seen in Figure 3. In this tutorial, we will use the Preliminary Sensitivity Analysis method. It is possible to modify the Input name, but for simplicity, we will maintain the default name suggested by the software. Then, we can click the Create input button to start generating the set of input files.

Figure 3: Input Preprocess - Initial state

2.2: Inputs for the Preliminary Sensitivity Analysis method

In this tutorial, we will select the Preliminary Sensitivity Analysis method. It is possible to modify the Input name, but for simplicity, we will maintain the default name suggested by the software. Then, we can click the Create input button to start generating all the input files. You can see their names below the Input name entry.

Figure 4: Input Preprocess - Method selected

2.3: Add input variables

In this case, we have 10 input variables, so we will use the Add input variable button at the upper right to generate 10 variable slots.

2.4: Define input variables

Insert the following distribution to each variable. Remember to press the Confirm button to save the changes after editing each variable. In the end, you should have the same settings as in Figure 5.

Figure 5: Input Preprocess - Define input variables
Open to view Input Distributions
NameTypeParameter 1Parameter 2
wing_areaUniform150.0200.0
fuel_weightUniform220.0300.0
aspect_ratioUniform6.010.0
quarter-chord_sweepUniform-10.010.0
cruise_dynamic_pressureUniform16.045.0
taper_ratioUniform0.51.0
aerofoil_thicknessUniform0.080.14
ultimate_load_factorUniform2.56.0
design_gross_weightUniform1700.02500.0
paint_weightUniform0.0250.08

2.5: Prepare distributions

With all input variables defined completely, pre-generate random distributions of samples that will be later used for statistical analysis and visualizations. You can set the number of generated samples in the # of Monte-Carlo Samples entry at the top of the screen.

The Prepare distributions button will generate all distributions according to the setting and then morph into the Tweak distribution options button.

2.6: Tweak Distribution Options

The Tweak distribution options button in the bottom right of the screen or the item of the fishbone navigation bar on the left switches to the Tweak Distribution Options screen. Boundaries of input distributions are adjusted here as well as the position of the nominal sample.

By default, the nominal sample position is set to be the mean value of each input distribution. It is recommended to keep in not further from this point than 10% of the input distribution range. For our current case, there is no need for adjustments of the boundaries or nominal values. All input files are created and saved upon the Generate data button clicking. Then, this button's label turns to View data histogram and the following section becomes accessible.

Figure 6: Input Preprocess - Tweak input distributions

2.7: View Data Histogram

Clicking the View Data Histogram button in the bottom right of the screen or the item of the fishbone navigation bar on the left shows the View Data Histogram screen. Check that the histograms presented for each Variable are the probability distributions wanted. You can style the plot using the Plot options section. Clicking points of interest in the plot shows the pop-up with details. Close Preprocessor button ends the current program.

Figure 7: Input Preprocess - View histogram

Part 3: Set up the Core Solver

3.1: Start the setup GUI

Once the inputs have been generated, it is time to prepare all the settings for the solver. We can do that using the Core Solver Setup, which once opened from the Uptimai main interface has the appearance as shown in Figure 8.

Figure 8: Set-up Core Solver - Initial State

3.2: Create new setup

Once the program is opened, the first thing we need to do is to create a new setup file. We can change the name of the file to UptimRes_PA to directly address the used method, and then just click on the Create button.

3.3: Select the set of inputs

Now, we will see that the Core Solver Setup has three main tabs. The first one is to select the input files that will be used in this run. In our case, we want to use the set of inputs prepared for the Preliminary Sensitivity Analysis method. Confirm the choice with the Select this input button.

Figure 9: Set-up Core Solver - Input Files tab

3.4: Set up the case

The second tab, which is Cases / Outputs, details all the settings that are used for tuning the core solver to the needs of each specific problem. Thus, there is a setup specific to the Preliminary Sensitivity Analysis method we are working with. Also, there is information about which outputs we would like to study. Only the Output 1 is present at the start. Let's set the Maximum increment order to 1-1 to perform just the very fast analysis that examines only the variance sensitivities of input variables and does not consider increment functions. You can also try to set the Preferred batch size to ten as an attempt to change the overall number of called batches of samples.

Figure 10: Set-up Core Solver - Cases/Outputs tab

3.5: General setup

Finally, in the third tab, there is information regarding the naming of files and other solver aspects. In this case, we can shorten the name of output the file prefix to WingWeight_PA and save the setup. When we do that, a UptimRes_PA.json file will be generated in the project folder containing all the information that we saved. That file will be used by the solver itself.

Figure 11: Set-up Core Solver - General Setup tab

Part 4: Run Solver (Automation)

4.1: Create new automation configuration

Now, it is time to open the Run Solver (Automation) from the Uptimai main interface. We will create a new automation file using the New automation section of the screen. Here, choosing any name and clicking the Create button stores the newly created file in the project folder. In case you want to load a previously created session, select one item from the list of the Existing automation section and confirm with the Open selected button. Eventually, you can search for any automation session under the Select another file button.

Figure 12: Run Solver (Automation) - Initial state

4.2: Add a connection

For Preliminary Sensitivity Analysis cases, there must be third-party software that converts a set of inputs to a set of outputs, so we can adaptively create the model. In this tutorial, this role is played by a Python script called Wing.py that you can download from the Member Area as a part of the tutorial project, so the first step of this process would be to download and paste the script into your project folder.

Figure 13: Run Solver (Automation) - New automation session created

The next step is to select the setup you've created in Part 3 of the tutorial. Our setup file UptimRes_PA should be in the list of Available Core Solver setups shown on the left panel of the screen. The method 'PA' (Preliminary Analysis) was identified automatically to make the navigation through list items easier. Once the setup item is clicked, you can see the Setup file details. Then, confirm the selection with the Select this setup button.

4.3: Core Solver settings

The Core Solver settings is a simple task in this case. We recommend turning on the saving of the console output that stores the log of the Core Solver. There is no need to enter and set the Advanced Core Solver settings.

Since the Python script we are about to include in the pipeline has only one output, the Number of Outputs in the Pipeline outputs section can remain at its default state (11). Also, let's keep the Enable parallel jobs switch in the Coupling parallelization turned off. This will simplify the organization of files and folders related to computed data samples. Without the parallelization, we can also keep off the Isolate coupling files in the Intermediate result storage. Thus, no separate folders will be created for each sample.

The Coupling pipeline button is active as well as the Coupling pipeline item of the fishbone navigation bar at the top of the screen. Both of them lead to the next step.

Figure 14: Run Solver (Automation) - Core solver settings

4.4: Add Executable step to the pipeline

Figure 15 shows the initial state of the Coupling pipeline setup. On the first sight you can see the collapsible Pipeline variables panel holding the auto-generated list of Available variables, some of these will be used later in the process.

To the left, there is the Coupling pipeline itself. Click the + icon next to the Add step label and select the Executable item from the drop-down menu. This will add the Executable step to the pipeline.

Figure 15: Run Solver (Automation) - Automation ready

4.5: Set the Python script connection

Under the Command options section, you need to change the Type to Python. Right after, define the Executable path of our Wing.py file which is expected to be in the Project folder. The Project folder option should be also selected as the Working directory.

The crucial setting here is about passing values of input variables to the Python script, which expects these arguments. The task here is to copy the names of all input variables enclosed in double curly brackets to the Arguments/options entry in the correct order. Right-clicking on an item from the list of Available variables shows the menu allowing the user to copy either the name of the variable or the formatted name (with brackets). Use the advantage of the automatically created special variable __all_inputs_space__ that will load all inputs as space-separated values.

Figure 16: Run Solver (Automation) - Automation ready

The last thing to set is selecting the Python interpreter in the Special options (Python) section. Be aware the script is using the numpy library, thus, this one should be available for the Python you are selecting.

Now, the Run Solver button is active as well as the Run Solver item of the fishbone navigation bar at the top of the screen. Both of them lead to the next step.

4.6: Run the Solver

Here comes the moment to click the Run button at the top of the screen and wait until the solver finishes all tasks. The solver will automatically run the coupling pipeline for all needed samples and will build the model. An Everything Finalized message will appear at the end of the log when the solver is finished.

Figure 17: Run Solver (Automation) - Everything Finalized

You can also check the obtained results directly. The Coupling section on the right holds the status of all pipelines, that are called in batches. Click an item from the list of Finished batches and hit the Inspect button of a sample you are interested in. Then, you can review every step of the corresponding coupling pipeline.

Figure 18: Run Solver (Automation) - Inspection of a finished coupling pipeline

Part 5: Result Postprocess

5.1: Open the Postprocessor

Now is the time to see the results. To do that, we will open the Postprocessor from the Uptimai Launcher.

Figure 19: Result Postprocess - Initial state

5.2: Iterative file check

First of all, we will start opening the Iterative file. To do that we will click on the WingWeight.itr file in the project files section. The iterative files store all the samples that have been computed, so they can be reused in future projects.

Figure 20: Result Postprocess - Iterative file table view

It has two ways of visualizing the data, or within a table which can be exported or as a scatter plot that allows to start visualizing the trends of how the outputs are distributed for each input. From these graphics, we can see that only 36 samples were required to analyze the problem consisting of 10 variables! Store the table in your HDD with the Export to CSV button at the top of the screen.

Figure 21: Result Postprocess - Iterative file scatter plot

5.3: Open the result file

Now we will open the result file itself, the WingWeight_PA_O1_C1.upst file. It will appear on the new tab.

5.4: Sensitivity analysis

In the top section, we have only one feature available for our file with results: the Sensitivity analysis, which shows which variables are more important. In this case, we can easily see that variables fuel_weight, quarter-chord_sweep, cruise_dynamic_pressure, and paint_weight are evaluated as irrelevant in comparison to the others and can be neglected from the study. This information can save us a significant number of computations in future studies where the full digital twin of the problem has to be built.

You can play with the set of input variables included in the plot by ticking the checkboxes of the Variables list on the left.

Figure 22: Result Postprocess - Sensitivity Analysis plot

5.5: Export the plot and the table

Saving the plot is easy with the dialogue raised with the 💾 icon on the upper left of the plot area. The button Text mode above the list of input variables replaces the plot with the table of sensitivity values. Let's save the table as a *.csv file using the Export data button.

Figure 23: Result Postprocess - Export the Sensitivity Analysis table