-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimal discretization of segments along boreholes #153
Comments
PR #136 introduces a `segment_lengths` parameter to the `gFunction` class, supported by the addition of the attribute to the `Borehole`, `_BasePipe`, and `Network` classes. This parameter enables a non- uniform discretization of segments along the lengths of the boreholes for calculations (including g-functions). - All g-function solvers are updated to support the feature. The identification of similarities had to be adjusted to verify that pairs of boreholes share the same discretization before applying thermal response factors to multiple pairs. - To conserve calculation speed in the evaluation of g-functions using equal segments or identical discretization along boreholes, `_equal_segment_ratios` and `_uniform_segment_ratios` boolean attributes are added to the `gFunction`class. - The ratio `1 / (2 * H_2)` is moved out of the integrand functions of the finite line source solution. `H_2` is now a vector and slows down the calculations if considered in `quad` and `quad_vec`. - A `segment_ratios()` function is added to the `utilities` module to facilitate the discretization of boreholes. Default parameters have been set to achieve acceptable accuracy. Issue #153 will determine optimal parameters for borehole discretization. - Tests are extended to cover the new features. Co-authored-by: Massimo Cimmino <[email protected]> Co-authored-by: Jack Cook <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
@MassimoCimmino, continuing with your analysis, the optimal discretization is dependent on the number of segments, as well as the borehole’s configuration, including the borehole’s length, spacing, and the number of boreholes within the field. An initial evaluation of the error on the g-function, with a discretization using the current 2% end-length ratio is shown in the following figure, where the maximum relative error is presented on the vertical axis and the field characteristics, which in this case is the non-dimensional coefficient B/H, are on the horizontal axis, whereas the number of boreholes in the field is color-mapped.
Other constant parameters are the buried depth = 4 m., the borehole radius = 0.075 m., and the ground’s thermal diffusivity = 1e-6 m2/s.
All the possible combinations of the previous characteristics result in a total of 54 borehole configurations depicting the overall behavior of the 11,440 initial configurations.
|
@jo-isiordia This looks great! The reduction of the error seems significant. A few things :
|
@MassimoCimmino Following up with your comments.
The figure shows a tendency of the proposed ELR to stay around 0.2% over 20 segments and the maximum relative error continues to decrease, reaching 0.01% at 32 segments. The whole set of results are shown in the table below. <style> </style>
The variations of the proposed ELR between the configurations with the smallest and the largest buried depths (red and purple dots in the figure) are 1.5, 0.2 and 0.02 percentage points for the 3, 8, and 12 segments scenarios (highlighted in red), respectively. However, the maximum relative error of the g-functions is considerably higher for smaller depths and lower for larger depths, as shown below, even using the previously “proposed ELR” values adapted for each scenario. The variations of the maximum relative error of the g-functions between the configurations with the smallest and the largest buried depths (red and purple dots in the figure) are 10.9, 0.96 and 0.3 percentage points for the 3, 8, and 12 segments scenarios (highlighted in red), respectively. This error variations continue to decrease for larger number of segments, but for lower number of segments this could lead to higher relative errors than expected in the initial analysis (without considering the impact of the buried depth).
|
@jo-isiordia Thank you for your contribution. I currently have a line of questioning regarding one of your plots. Is it true that the optimal end length ratio (ELR) is out performed by the non-optimized ELR of 2% in the B/H range of about 0.55 to 0.15? Does the curve fit create a misleading representation? If not, how then did the optimization (minimization) of the objective function result in lower accuracy? Is it possible that the algorithm found a local minima, rather than a global? Why wouldn't the "optimal" ELR be 2% in that region if it truly performs better? |
@j-c-cook I appreciate your comments, and I believe this confusion is, in part, due to the nomenclature I used for the (3) different end-length ratio scenarios as well as the trend lines on the figures. As you just mentioned, in the range of 0.055<B/H<0.15 the Non-optimized ELR seems to outperform the other two ELR resulting from two different minimization processes, but in reality it is only the trend line generated based on the actual values (the blurred points behind the curves) that originates this misunderstanding. I added a table down below with some B/H values corresponding to the previously mentioned range (0.055<B/H<0.15) for small and large bore fields considering an 8-segment discretization, comparing the three ELR scenarios and their corresponding relative error of the g-function for better clarity. As you can see in the table below, the "Optimized ELR" results in the best results (lowest relative error), i.e. the closest g-functions to the reference. On the other hand, referencing my previous comment, the "Proposed ELR" does not always perform better than the "Non-optimized ELR", since they are both a constant value for each discretization case and the only difference is that with the Proposed ELR the maximum relative error found on the whole set of configurations being analyzed is minimized, which means that it performs better than the original ELR of 2% for most bore field configurations, but not all of them. Just to clarify a bit more, the Proposed ELR is less accurate than the Optimized ELR but the disadvantage of using the latter is that it depends on the bore field's layout and characteristics such as the borehole's length, bore to bore spacing, etc. and it takes time (between 1 and 15 minutes) to calculate, compared to the Proposed ELR that only depends on the number of segments of the discretization and the outcome is most of the time better than the Non-optimized ELR results.
|
#136 showed that the optimal
segment_ratios
that minimizes the error on the g-function is dependent on the number of segments (and potentially on the bore field configuration).This issue is to find optimal parameters (
end_length_ratio
) for the borehole discretization. A solution would be to generate a table that gives the optimal parameter for each value ofnSegments
up to reasonable max value (e.g.nSegments=128
). This could be accessed by settingend_length_ratio='optimal'
as an input toutilities.segment_ratios()
.The text was updated successfully, but these errors were encountered: