Testing the computation precision

Introduction

It is necessary to control the calculus precision in order to guarantee the correctness of the data exchanges.

Precision: about

The data exchanges between applications of different nature with interdependent physical phenomena require an iterative process.

For each of the iterations Flux evaluates a precision on the exchanged values that represents the difference between the precedent value and the current value.

It is:

  • 1 in the absence of precedent values
  • 0 if the precedent and the current values are identical.

How to control precision?

The user can control the precision of the data exchanges via the python files of performing the calculus of two interdependent problems.

Test the precision

Here is a simplified iteration process to be implemented in a python file in order to test the precision of a magnetic application (for example):

Phase Description
1 Creation of the variable Precision_M set at 1
2

Test of precision:

As long as the precision (Precision_M) is over 0.01 (choice of the user) :

  • proceed to the following actions if Precision_M > 0.01
  • go to phase 9 if Precision_M < 0.01
3 Resolution of the current step
4 Export the results of the magnetic application to the thermal application
5 Wait for the resolution of the thermal application and export the thermal results to the magnetic application (the same process is done for the thermal application)
6 Update the temperature chart via import of thermal results
7 Update the variable Precision_M starting from the imported thermal results
8 Return to phase 2
9 The desired precision has been attained: end of calculus of this step