    # Also in the Article

The Monte Carlo test
This protocol is extracted from research article:
Vertical tank capacity measurement based on Monte Carlo method
PLoS One, Apr 16, 2021;

Procedure

Fig 7 is the vertical tank model of the Monte Carlo test. The radius of vertical tank is R = 1.300[m], and the upper part height of the vertical tank is Hupper = 8.476[m]. The maximum capacity of upper part is π · R2 · Hupper ≈ 45.000[m3]. Sensor points are distributed in ten layers (Nlayer = 10). Each layer has ten sensor points uniformly distributed equiangularly (Nmono = 10). Thus, Nsensor = Nmono · Nlayer = 100, i.e., there are 100 sensor points in total. Considering the size of the vertical tank, we initially set up 100 sensor points. The influence of the number of sensor points on the measurement results will be further studied in the follow-up work. Currently, 100 sensor points are used to explore the feasibility of the proposed method. The difference of heights between each layer is hlayer = 0.8476[m]. Sample points are generated in Cuboid LWHupper, whose L = 2.600[m], W = 2.600[m] and Hupper = 8.476[m]. Thus, xmin = -1.300[m], ymin = -1.300[m], zmin = 0, xmax = 1.300[m], ymax = 1.300[m], zmax = 8.4776[m], and the coordinates of sample points satisfy -1.300[m]≤x≤1.300[m], -1.300[m]≤y≤1.300[m], 0≤z≤8.476[m].

The Monte Carlo tests are performed on Matlab, and the sample points are generated with Matlab’s built-in random function ─ unifrnd (). Totally Nsample = 106 sample points are generated in each test. A total of 10 tests were conducted.

In order to discuss the measurement results of vertical tanks of different volumes, the absolute error of capacity per unit volume is calculated as

where Qk is the vertical tank capacity at hk. $Q′k$is the actual capacity of vertical tank at hk, $Q′k=π⋅R2⋅hk+Qbottom$. Vcuboid is the volume of cuboid, Vcuboid = L · W · Hupper.

Fig 8 is the absolute error of capacity per unit volume of Test 1~10. It shows that there is a significant linear relationship between εk and hk in each test. The slopes of the fitting results of Test 1~10 are all around 0.0252.

To further investigate the relationship between the absolute error of capacity per unit volume and the size of the vertical tank, another sixty tests are carried out for different heights and radii of tank.

Fig 9 is the absolute error of capacity per unit volume with different heights of vertical tank. The heights of vertical tank are 8.476 [m], 6.781 [m], 4.238 [m], and 2.543 [m]. Each height is tested 10 times and the inner radius of vertical tank is 1.300 [m] in each test. Fig 8 shows the average value of εk. From the fitting results, even though Hupper has changed, there is still a significant linear relationship between εk and hk. The slopes of the fitting results are different. Interestingly, we find that 0.02524 × 8.476 ≈ 0.214, 0.03154 × 6.781 ≈ 0.214, 0.05047 × 4.238 ≈ 0.214, and 0.08415 × 2.543 ≈ 0.214. This shows that the product of the slope and Hupper is a constant value, which 0.214.

Fig 10 is the absolute error of capacity per unit volume with different radii of vertical tank. The radii of vertical tank are 1.300 [m], 1.040 [m], 0.910 [m], and 0.780 [m]. Each radius is tested 10 times and the height of vertical tank is 8.476 [m] in each test. Fig 10 shows the average value of εk. It can be seen from Fig 10 that there is a significant linear relationship between εk and hk, and the slope hardly changes due to changes in radius.

Based on the above analysis of the influence of Hupper and R on εk, in the linear relationship between εk and hk, R has little effect on the slope, and the product of Hupper and the slope is a constant, which is 0.214. Therefore, the relationship between εk and hk can be written as

The vertical tank capacity in upper part at hk, which is measured with the Monte Carlo method, can be compensated according to Eq 16. The compensated vertical tank capacity in upper part at hk is

Substituting Eq 16 into Eq 17, we have

Thus,

Note: The content above has been extracted from a research article, so it may not display correctly.

Q&A