## 5 Conclusions  
1. Cracks and solution cavities are prevalent in the Dengying Formation carbonate reservoir in the Gaoshiti-Moxi area of the Sichuan Basin. Horizontal cracks are the most predominant, followed by inclined cracks, with an average crack density ranging from 0.86 to 8.26 per meter. Additionally, there is a multitude of solution cavities, with an average development density of 26.45 per meter. The extensive development of cracks and solution cavities contributes to the discrete nature of the rock's mechanical parameters. 2. Taking into account the influence of cracks and solution cavities, the equivalent drilling fluid density for collapse pressure (\(\rho_{\mathrm{c}}\)) in the 5182-5187 m section of Well GS10 is determined to be 1.16 g/cm\({}^{3}\). This represents a 6.42% increase compared to the value obtained without considering the effect of cracks and solution cavities, which aligns well with engineering practice. In addition, cracks play a more significant role than solution cavities in affecting the wellbore stability. 3. As the angle of the crack strike deviates further from the direction of maximum horizontal principal stress, stress and displacement at all points around the wellbore progressively increase, resulting in a linear increase in \(\rho_{\mathrm{c}}\). Similarly, as the dip angle and width of cracks increase, both stress and displacement at the intersection of cracks and the wellbore gradually intensify, leading to a linear increase in \(\rho_{\mathrm{c}}\). 4. As the solution cavities diameter (\(D\)) increases, the stress and displacement at various points around the wellbore gradually intensify, and initially, \(\rho_{\mathrm{c}}\) increases linearly. Figure 28: Percentage of the maximum change in the equivalent drilling fluid densities of collapse pressure for different influence factors. However, when \(D\) exceeds 609 mm, there is no significant change in \(\rho_{\rm c}\). Additionally, as the number of solution cavities increases, both stress and displacement around the wellbore progressively rise, and \(\rho_{\rm c}\) increases approximately in a linear trend. 5. The disturbed stress area around the wellbore increases by 45.23% when cracks and solution cavities are connected compared to when disconnected. Furthermore, the stress around the wellbore is higher when cracks and solution cavities are connected than when disconnected; \(\rho_{\rm c}\) for the situation when cracks and solution cavities are connected increases by 13.33% compared to when disconnected. Conceptualization, Q.Z. ; Methodology, J.Z. and R.Z. ; Project administration, R.Z. ; Validation, H.A. ; Formal analysis, W.L. and Q.Z. ; Investigation, J.Z. and Y.G. ; Resources, R.Z. and X.F. ; Data curation, R.Z. and W.L. ; Writing-original draft, J.Z. and Y.G. ; Writing--review and editing, H.A. and Q.Z. ; Funding acquisition, X.F. and Q.Z. ; Supervision, X.F. All authors have read and agreed to the published version of the manuscript. This research was funded by the National Natural Science Foundation of China (Grant Nos. 42172313 and 51774246) and the Natural Science Foundation of Sichuan Province (Grant Nos. 2024 NSFSC0203, 2022 NSFSC0185 and 2023 NSFSC0938). Not applicable. The data presented in this study are openly available in [Mendeley Data] at [[[https://doi.org/10.17632/46](https://doi.org/10.17632/46) bmr8 hlbc.1]([https://doi.org/10.17632/46](https://doi.org/10.17632/46) bmr8 hlbc.1)]. The authors would like to express their gratitude to the editors and anonymous reviewers for their constructive comments on the draft paper. The authors are also grateful to [PERSON], [PERSON], [PERSON], [PERSON], and [PERSON] for their contributions to data curation, investigation, and reviewing. [PERSON], [PERSON], [PERSON] and [PERSON] are currently employed by CNPC Southwest Oil and Gas Field Company. [PERSON] is currently employed by CNPC Huabei Oil Field Company.