the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
UpsFrac v1.0: An open-source software for integrating modelling and upscaling permeability for fractured porous rocks
Abstract. Efficient and accurate simulating fluid flow and heat transport underground plays an important role in groundwater migration and geothermal resource prediction, etc. Rock fractures are complex in geological settings, they exhibit multiple scale properties and the fracture pattern is varied for different geological conditions. Modeling and upscaling permeability for fractured porous rocks are both important and sophisticated approaches in the numerical simulation. Nevertheless, there is often a lack of efficient and flexible methods to connect these two processes. In this study, a novel methodology combining modeling and upscaling permeability for fractured porous rocks in proposed and an open-source software, UpsFrac, is developed to consider complex fracture geometries in discrete fracture models (DFM) that are created determinedly and stochastically. The software can characterize complexity of fractured porous rocks such as power law (fractal) length distribution, correlations between fracture length and aperture, and the effect of rock matrix properties. The state-of-the-art upscaling method, the multiple boundary method (MFU), is applied to calculate equivalent fracture permeability, which links the fine-scale discrete fracture model to the coarse-scale equivalent fracture model. The code is in Matlab and is based on fracture modelling code ADFNE and reservoir simulation code MRST, which can easily run DFM ensembles for uncertainty analysis. The code is available in open repositories to encourage modeling and upscaling of complex fractured porous rocks, allowing users to develop their own routines within the current framework and to benefit a broader community.
- Preprint
(2525 KB) - Metadata XML
- BibTeX
- EndNote
Status: final response (author comments only)
-
RC1: 'Comment on egusphere-2025-36', mohammad Sabah, 23 Jul 2025
The manuscript presents UpsFrac, a MATLAB‑based workflow that links (i) generation of deterministic and stochastic discrete‑fracture models (DFM) and (ii) flow‑based upscaling of their equivalent permeability using the Multiple‑Boundary Method (MBM) implemented with TPFA/MPFA discretization. The authors provide validation against analytical solutions, a field‑scale demonstration, and release the code under GPL‑3.0 on GitHub and Zenodo. The topic is timely; few open‑source tools bridge fracture modelling and rigorous flow upscaling in a single framework. The paper would be publishable after a major revision that addresses methodological clarifications, strengthens validation, and improves presentation.
General Comments
- While UpsFrac provides a useful integrated workflow, the individual components (ADFNE, MRST, MBM) are not novel. The paper would benefit from a clearer positioning of what is truly new: Is it the integration? Is it the application to fractal systems? Is it the ability to handle both deterministic and stochastic fractures? In the introduction section, clearly delineate the innovation over existing tools like PorePy, DFNWorks, or OpenGeoSys-DFM modules.
- The accuracy of upscaling strongly depends on mesh size, particularly for fractures aligned with or against the grid. Include a sensitivity analysis showing how grid refinement or fracture-matrix contrast influences permeability estimates. Report convergence trends and potential sources of numerical error.
- The code assumes constant aperture per fracture and a simplified grid-based representation. Discuss the implications of this assumption for faults with variable aperture or roughness. It would be better to quantify the error induced by this simplification. Consider adding a test where a fracture with log‑normal aperture variability is upscaled with (i) constant‑aperture assumption and (ii) a higher‑fidelity solver (e.g., locally refined mesh or transfer‑function approach)
- The current implementation is 2D, which is acceptable for early-stage validation and pedagogy but limits industrial applicability. Provide a roadmap or discussion of how 3D capabilities could be implemented.
- Computational performance and scalability are not analyzed. Provide runtime and memory statistics for the field‑scale case (number of grids and fractures, CPU/GPU specs). Compare with at least one alternative open‑source package (e.g., OGS) to highlight UpsFrac’s efficiency or identify bottlenecks.
- Two validation tests (power‑law DFN and single fracture with variable aperture) are useful but narrow. Add a heterogeneous matrix‑fracture system where analytical REV permeability is known. Then compare it with embedded‑discrete‑fracture simulation on the full domain to confirm that the upscaled EFM reproduces domain‑scale responses
- The abstract claims that UpsFrac can easily run DFM ensembles for uncertainty analysis, yet no ensemble results are shown. Include an example with 50–100 stochastic realisations, report statistics (mean, variance) of the upscaled tensor components, and discuss convergence
- Algorithm description lacks reproducibility details. Scripts such as “SubDivideToGrid.m” or “CalcuKeq.m” are mentioned but not summarized. Add a concise pseudo‑code or flowchart (in the paper) that maps each processing step to its script name; list key input parameters
- Frequent grammatical errors and misspellings distract from the content. Thorough language editing is required; see minor comments below for examples.
Technical corrections
- In the abstract, clarify that the current implementation is 2‑D and MATLAB‑based.
- Fig. 2 workflow: fonts are blurry; consider vector graphics.
- Fig. 7 permeability map: add color‑bar units
- Fig. 9 ellipses: scale key missing (are axes normalized?).
- Consistency in references: some entries list full journal names, others abbreviations; unify style.
-
AC1: 'Reply on RC1', Tao Chen, 12 Aug 2025
Author Comment on EGUSPHERE-2025-36
Dear Mohammad Sabah,
We sincerely appreciate your thorough and constructive review of our manuscript on UpsFrac. Your detailed comments will significantly improve the quality and impact of our work. We are committed to addressing all your concerns comprehensively. We have carefully considered all comments and already initiated several improvements. Below, we provide our initial response to each point and our planned revisions.
Response to General Comments
Comment 1: We appreciate the referee's recognition of UpsFrac as a "useful integrated workflow" and the constructive suggestion to better articulate our innovations. We agree that clearer positioning will strengthen the manuscript. UpsFrac represents the first open-source platform that bridges the gap between fractal theory and practical permeability upscaling of fractured porous rocks, addressing a critical need in fractured reservoir modeling. Specifically, our contributions include: (1) Unified handling of both deterministic and stochastic fractal fracture networks, enhancing modeling capabilities for complex geological systems. (2) Direct coupling between DFN generation and MBM upscaling without intermediate file conversions, eliminating data loss and reducing workflow execution time. (3) Accessibility through open-source implementation with extensible modular architecture, enabling researchers to easily incorporate new fracture modeling algorithms, upscaling methods, and flow solvers, fostering community-driven development.
Planned revision: 1. We will add the following positioning statement in the revised manuscript: "UpsFrac advances the state-of-the-art in fractured media modeling by providing the first integrated open-source solution that directly couples fractal DFN generation with flow-based permeability upscaling. This tool fills a critical gap between theoretical fractal geometry models and practical reservoir simulation needs. By automating the entire process from stochastic fracture realization to upscaled equivalent properties, UpsFrac enables Monte Carlo analyses, transforming our ability to quantify uncertainty in fractured porous rock modeling. The platform makes large-scale stochastic analysis accessible to the broader research community." 2. We will add a comprehensive comparison table in the Introduction to position UpsFrac against PorePy, DFN-Works, MRST, and OpenGeoSys, evaluating four key dimensions: (1) Programming Language and accessibility; (2) Fracture Modeling capabilities; (3) Flow Simulation methods; and (4) Permeability Upscaling techniques. This systematic comparison will demonstrate that UpsFrac uniquely provides an integrated workflow from fracture generation through permeability upscaling within a single framework, thereby eliminating data conversion overhead and enabling automated ensemble-based uncertainty quantification—a combination of capabilities currently unavailable in existing tools.
Comment 2: We fully agree with this excellent point. Grid refinement effects, fracture-matrix permeability contrast, and fracture orientation relative to grid alignment are indeed crucial factors affecting upscaling accuracy. We recognize that these parameters can significantly influence the computed equivalent permeability tensor and appreciate the reviewer highlighting this important aspect.
Planned revision: We will add a new subsection (Section 3.3: Numerical Accuracy and Sensitivity Analysis) to comprehensively evaluate UpsFrac's computational reliability. This section will present: (1) Grid convergence studies using systematic mesh refinement ; (2) Parametric analysis of fracture-matrix permeability contrast and its influence on upscaling accuracy; (3) Orientation-dependent error quantification for fractures at various angles relative to the computational grid. These systematic investigations will establish rigorous bounds on numerical accuracy and demonstrate UpsFrac's robustness across diverse fracture configurations.
Comment 3: We greatly appreciate this insightful comment. Indeed, most current DFM implementations, including ours, adopt the constant aperture assumption for individual fractures. This simplification stems from both the scarcity of high-resolution roughness measurements and computational constraints for geological field-scale simulation. We acknowledge that this assumption may limit accuracy when modeling realistic fracture-matrix systems. The UpsFrac framework's modular architecture is designed to accommodate future incorporation of variable aperture models.
Planned revision: We will expand Section 5 to include: (1) A thorough discussion of the constant aperture assumption's limitations based on literature review; (2) Quantitative error analysis comparing constant versus variable aperture models using synthetic test cases; (3) Clear implementation pathways for future variable aperture extensions, including data structure requirements and algorithmic modifications. This comprehensive analysis will establish error bounds for the current implementation and provide a roadmap for incorporating aperture variability in future releases.
Comment 4: We agree that while the current 2D implementation is well-suited for validation and pedagogy, 3D capability is essential for industrial applicability. We have previously demonstrated 3D upscaling (Chen et al., 2018, Hydrogeology Journal 26:1903-1916), but it has not yet been integrated into UpsFrac. Building on our existing DFN generation and simulation tooling (e.g., ADFNE and MRST), we expect the 3D integration to be technically straightforward, though it involves substantially higher computational demands and more complex fracture geometries.
Planned revision: We will outline concrete acceleration strategies and a development roadmap in Section 5 covering: (i) generalizing DFN generation from 2D line fractures to 3D triangulated fracture surfaces with realistic size, orientation, and aperture distributions; (ii) extending the multiple boundary method (MBM) to 3D with robust treatment of fracture intersections; and (iii) mitigating the substantially higher computational cost through algorithmic accelerations, including adaptive/octree meshing, domain decomposition with parallel CPU/GPU solvers, and graph-based pruning of disconnected subnetworks.
Comment 5: We thank the reviewer for this valuable suggestion and acknowledge that computational performance and scalability analysis was indeed missing from our original manuscript. We fully agree that these metrics are critical for assessing the practical utility of any numerical method intended for field-scale applications.
Planned revision: We will add a section reporting performance for a field-scale case, including the number of fractures and grid cells and hardware specifications. We will present wall-clock runtime and peak memory usage for key stages (DFN generation/meshing, MBM assembly, linear solves) and provide a comparison with the open-source DFM simulator such as OpenGeoSys (OGS) using identical inputs and hardware. Results will be summarized in tables and scaling plots to highlight UpsFrac's efficiency; where gaps exist, we will identify bottlenecks and outline remedies. This analysis will also underscore the computational advantages of the upscaling approach.
Comment 6: We thank the reviewer for this valuable suggestion regarding validation of heterogeneous matrix-fracture systems. We agree that, to better reflect practical upscaling use cases, the manuscript should include broader validation that explicitly incorporates heterogeneity and matrix-fracture coupling at field scale.
Planned revision: We will add a validation case (Section 4.2) based on a field-scale example that (i) benchmarks against known analytical solutions for equivalent permeability in heterogeneous fracture-matrix systems, (ii) compares upscaled permeability from our method with full-domain DFM and/or EDFM simulations, and (iii) demonstrates that the upscaled properties accurately reproduce domain-scale flow behavior. This new Section 4.2 will also include dedicated performance analysis (runtime and memory statistics) to jointly address Comments 5 and 6.
Comment 7: We thank the reviewer for this valuable suggestion regarding uncertainty quantification. We agree that demonstrating ensemble-based uncertainty quantification is essential, especially given the inherent uncertainty in subsurface observations due to data sparsity and noise. UpsFrac supports Monte Carlo workflows by generating stochastic DFNs and performing batch upscaling to quantify variability in effective properties.
Planned revision: We will add an ensemble uncertainty quantification subsection in Section 4.3 featuring 50–100 stochastic DFN realizations of the discrete-fracture case. We will report statistics of the upscaled permeability tensor components (Kxx, Kyy, Kxy), including means, variances, and empirical distributions; assess convergence of ensemble statistics; and document computational requirements for ensemble runs (wall-clock time and memory). This example will directly address the reviewer's request to substantiate the abstract's ensemble claim and discuss statistical convergence.
Comment 8: We thank the reviewer for this valuable suggestion regarding algorithm reproducibility. We agree that the current algorithm description lacks sufficient detail and intuitive presentation, and that the functions of key scripts are not adequately summarized. This indeed affects the understanding and usability of the software algorithm.
Planned revision: We will enhance algorithm reproducibility through three complementary additions: (1) Revise Figure 2 as a comprehensive flowchart that maps each workflow step to its corresponding script name, including key input/output parameters for each processing stage; (2) add a Code Implementation section in Section 2, featuring a detailed table on "Core Scripts and their Functions in the UpsFrac Framework" that summarizes the purpose and computational role of each major script (e.g., SubDivideToGrid.m, CalcuKeq.m); and (3) provide comprehensive pseudocode for the core upscaling algorithm in Appendix A, enabling readers to understand the computational logic and reproduce the methodology independently.
Comment 9: We thank the reviewer for pointing out the language issues and acknowledge that grammatical errors and misspellings indeed distract from the technical content. We apologize for these oversights and agree that thorough language editing is essential for clear scientific communication.
Planned revision: We will conduct comprehensive language editing throughout the revised manuscript and address all technical corrections: (1) explicitly state "2D MATLAB-based implementation" in the abstract; (2) recreate Figure 2 workflow using vector graphics to ensure clear, crisp fonts; (3) add appropriate colorbar units (log10(K) [m²]) to Figures 7 and 8 permeability maps; (4) include normalized scale indicators for Figure 9 ellipses with clarification of axis normalization; and (5) unify reference formatting to abbreviated journal names throughout. Additionally, we will ensure thorough proofreading to eliminate grammatical errors and enhance overall readability.
Timeline and Further Discussion
We are already working on the sensitivity analyses and validation (Comments 2, 5 and 6) and expect to share preliminary results. The ensemble analysis (Comment 7) is computationally intensive but should be complete within the discussion period.
Thank you again for your valuable feedback. We believe these revisions will substantially strengthen UpsFrac's contribution to the fracture modeling community. We welcome any additional suggestions from the referee and the community.
Best regards,
Tao
Citation: https://doi.org/10.5194/egusphere-2025-36-AC1
-
RC2: 'Comment on egusphere-2025-36', Anonymous Referee #2, 03 Sep 2025
The paper introduces UpsFrac v1.0, an open-source MATLAB-based tool for fracture modelling and permeability upscaling. While the integration of fracture network generation, flow simulation, and upscaling into one workflow has potential value, the manuscript in its current form requires major revision.
1- The paper focuses on scripts rather than science. Much of the text reads like a user manual (e.g., Section 2, lines 135–137 and 140–146), with repeated references to scripts, file names, and formats. These details should be moved to the GitHub documentation. The manuscript should instead emphasize scientific contribution and comparison with existing approaches. Throughout the paper, please remove file names and input/output formats and focus on the science. For example:
Lines 113–114: “The deterministic fracture can be stored in the file frac_deterministic.txt. Each line contains geometric data of a fracture.” → This sentence can be removed.
Lines 184–190: Instead of describing what scripts to use, this could be rewritten as:
“Using the upscaling results, the distribution of permeability tensor components (kxx, kxy, kyy) can be visualized to characterize spatial heterogeneity and anisotropy. In addition, the equivalent permeability tensor of each grid block can also be plotted as an ellipse to visualize the directional permeability.”2- The manuscript requires substantial editing for language, terminology, abbreviations, and typos.
- Many sentences are difficult to follow. For example, lines 163–165: “For each grid, two simulations are conducted that the pressure gradient along the x and y-axis. The results used for upscaling are saved, including the flux, the centre of the face, and the index of the grid face (fracture or matrix)” is grammatically incorrect and confusing. It should explain more clearly that two separate simulations are performed. A clearer version would be:
“For each grid, two separate simulations are performed: one with a pressure gradient applied along the x-axis and one with a gradient along the y-axis. From these simulations, fluxes, the centre of the face, and the index of the grid face are computed for the upscaling step.”
- Some sentences are confusing. For example: “long/short tail as alpha is high” (line 198), or “Different components of equivalent permeability are different, which is influenced by the fracture orientation” (lines 243–244). This should be corrected throughout the manuscript.
- There are several grammatical issues throughout the text. Careful editing is required.
- Abbreviations are not handled properly. Once terms such as DFM or EFM are introduced, the full forms are repeated unnecessarily (see lines 41–46). Please revise throughout the manuscript.
- Some terms are inconsistent or unclear. For example: “engineering structures” (line 27) is ambiguous and out of context, and “MFU” (line 17) is never defined (what does it stand for?). Please revise for clarity and consistency.
-Typographical errors: Examples include “aline” → “aligned” and “natual” → “natural”. Please proofread carefully throughout the text. Please also check that a correct DOI is provided (line 310).
3- In terms of scientific novelty, the main contribution appears to be the implementation of the multiple boundary method to calculate equivalent permeabilities. However, this method is not clearly explained, and MRST already provides equivalent permeability upscaling for fracture networks (see Lie & Møyner, Advanced Modeling with the MATLAB Reservoir Simulation Toolbox, 2021, Chapter 9.4). The authors should clarify why they did not use MRST’s existing routines for calculating the upscaled permeability of the grids, and what advantages their approach offers. Furthermore, the use of a power-law distribution for fracture lengths is presented as a novelty, but this is not new. Most DFN generators, including several cited in the introduction, already support this capability. It should therefore not be highlighted as a main innovation.
4- The validation section (lines 205–215) is very unclear. It is not obvious what simulation setup was used. Was it a single fracture inside a low-permeability matrix as shown in Fig. 5, or a single isolated fracture? This needs to be clarified. In addition, the manuscript refers to an “analytical solution” but does not provide the actual equation. Without this information, the validation is almost impossible to follow and not reproducible in its current form. This section should be rewritten to clearly describe the geometry and the simulation setup, the analytical solution used, and the assumptions behind the comparison.
5- Nowhere in the manuscript is performance discussed. There is no information on computation time, memory requirements, or applicability to larger networks, yet these are critical aspects for evaluating an upscaling tool. Please include an assessment of computational performance in the revised version.
Citation: https://doi.org/10.5194/egusphere-2025-36-RC2
Viewed
HTML | XML | Total | BibTeX | EndNote | |
---|---|---|---|---|---|
528 | 58 | 13 | 599 | 15 | 41 |
- HTML: 528
- PDF: 58
- XML: 13
- Total: 599
- BibTeX: 15
- EndNote: 41
Viewed (geographical distribution)
Country | # | Views | % |
---|
Total: | 0 |
HTML: | 0 |
PDF: | 0 |
XML: | 0 |
- 1