## 3 Results
### Results of the Electrical Model  
The EL model is sufficiently fast to allow for the analysis of its uncertainty propagation on the results via a Monte Carlo approach. For this reason, an MC analysis has been developed, exploiting the interoperability of Python and Modelica assured by OMPython [7] and DyMat packages. The MC method simply consists of sampling a large number N of random points from the input distribution and performing a simulation for each of these points, giving a result \(\xi_{i}\). In the MC algorithm, the average results \(\overline{\xi_{N}}\) are computed as follows:  
\[\overline{\xi_{N}}=\sum_{i=1}^{N}\frac{\xi_{i}}{N}. \tag{8}\]Together with the average value, both the standard deviation \((STD)\) and the relative standard deviation \((RSD)\) are computed, according to the following equations:  
\[STD(\xi_{N})=\sqrt{\frac{1}{N}\sum_{i=1}^{N}(\xi_{i}-\overline{\xi_{N}})^{2}}, \tag{9}\]  
\[RSD(\xi_{N})=\frac{STD(\xi_{N})}{\overline{\xi_{N}}\cdot\sqrt{N}}. \tag{10}\]  
The \(RSD\) is used as an indicator to stop the sampling of random points once the required tolerance is reached. In this case, the required tollerance for the \(RSD\) was 0.1% and was reached after \(\approx\)28,500 simulations. The Equation (10) underlines one of the main drawbacks of MC, namely, its slow convergence (as \(1/\sqrt{N}\)), requiring a large number of simulations. The statistical distributions of the following four relevant results have been obtained from the MC run and are reported in Figure 3:  
* \(\tau\)\(\rightarrow\) time required for the current to decrease from nominal value to 0.1 \(A\);
* \(l^{2}\cdot t=\int_{0}^{t}l^{2}(t^{\prime})dt^{\prime}\), considering its asymptotic value, which is proportional to the energy extracted from the TF coils during the FD;
* \(\Delta V_{FDU}\)\(\rightarrow\) peak voltage on the FDU during the discharge;
* \(\Delta V_{TF}\)\(\rightarrow\) peak voltage on the TF coil during the discharge. The resulting mean values of the monitored variables and their standard deviations are reported in Table 1.  
The same model has been analyzed using the PCE to reduce the required number of simulations to obtain the same statistical information. Quadrature and polynomial orders from 1 to 3 have been tested, and the results have been compared to those of the MC method, obtaining extremely good agreement for all the monitored variables using order 3,  
Figure 3: Statistical distribution of (**a**) \(\tau\), (**b**) \(I^{2}\cdot t\), (**c**) \(\Delta V_{FDU}\), and (**d**) \(\Delta V_{TF}\) obtained with the MC method. as is shown in Figure 4. Indeed, the 2-norm of the relative difference between the MC and PCE order 3 distribution results in a maximum discrepancy of 0.05% between the two. This allows for the performance of only sixteen simulations of the detailed model as a training set compared to the \(\approx\)30,000 simulations of the detailed EL model (\(\approx\)1 s of CPU time each) required to reach the desired statistical tolerance using the MC approach. In fact, in the case of the pseudo-spectral projection method, the number of simulations required is given by \((p+1)^{d}\), where \(p\) is the polynomial degree at which the truncation occurs (3 in this case), and \(d\) is the dimension of the input space (2 in the case at hand). This choice results in a polynomial with 10 \(\mathbf{a_{c}}\) coefficients, according to Equation (6). Here, the quadrature nodes and the weights have been obtained using the Gaussian quadrature rule. To better highlight the accuracy of the PCE results, the comparison between the mean values and their standard deviation obtained with MC and PCE is reported in Table 1. Using the PCE, it has also been possible to evaluate the current and \(l^{2}\cdot t\) evolution.