-
Notifications
You must be signed in to change notification settings - Fork 1
Home
PorousLab is a MATLAB finite element framework for research in geomechanics, porous media flow, and fractured media. It brings mechanics, single-phase flow, two-phase flow, and hydro-mechanical coupling into a compact object-oriented codebase.
The project is designed to be readable and extensible rather than a black-box simulator. Most workflows are documented through MATLAB scripts in the examples folder, where the mesh, materials, boundary conditions, analysis setup, and post-processing are defined in one place.
- What PorousLab can model
- Discontinuities and fractured media
- Analysis capabilities
- Pre-processing and utilities
- Examples and validation
- Repository structure
- Associated publications
PorousLab currently includes finite element formulations for:
- Mechanical analysis (M): linear elasticity, nonlinear mechanical response, elasto-plasticity, damage, and cohesive interfaces.
- Single-phase flow (H): hydraulic flow in porous media, including problems with embedded discontinuities.
- Two-phase flow (H2): liquid-gas flow in porous media using liquid pressure and gas pressure as primary variables.
- Hydro-mechanical coupling (HM): coupled deformation and single-phase pore-pressure diffusion.
- Two-phase hydro-mechanical coupling (H2M): deformation coupled with two-phase flow variables.
The framework is organized around reusable model, material, element, analysis, and post-processing classes. This makes it useful for testing formulations, reproducing benchmark problems, and developing new research features.
A central feature of PorousLab is the treatment of strong discontinuities such as fractures, faults, cracks, and barriers using embedded finite element strategies.
Supported discontinuity-related capabilities include:
- embedded discontinuities that cut through the background mesh;
- conductive and low-permeability hydraulic discontinuities;
- mechanical cohesive behavior along discontinuities;
- hydro-mechanical discontinuities with aperture-dependent flow behavior;
- automatic identification of elements intersected by discontinuity polylines;
- plotting utilities for discontinuity geometry and fields.
PorousLab supports three main analysis types:
-
Linear analysis
- assembles and solves a linear finite element system;
- used for linear mechanical problems and steady hydraulic flow problems.
-
Nonlinear quasi-static analysis
- solves nonlinear mechanical problems;
- includes load, displacement, work, minimum-norm, generalized displacement, orthogonal residual, and arc-length control strategies;
- stores load-displacement response data for post-processing.
-
Transient analysis
- uses a fully implicit time integration scheme;
- supports Newton-Raphson and Picard nonlinear solution schemes;
- includes adaptive time stepping.
The repository includes MATLAB utilities for common finite element setup tasks:
- structured mesh generation;
- conversion from linear to quadratic interpolation meshes;
- boundary-condition assignment over geometric borders;
- generation and handling of discontinuity geometry;
- intersection detection between discontinuities and finite elements;
- node renumbering to reduce matrix sparsity;
- plotting of scalar, vector, and discontinuity-related fields.
The examples folder is the best starting point for learning how PorousLab models are assembled. Several benchmark examples are documented in the wiki. The repository also includes regression tests in tests/regression for selected examples.
-
src: source code organized by analysis, finite element, material, mesh, physics, and post-processing modules. -
examples: executable MATLAB scripts that define complete problems. -
tests: regression and validation tests. -
docs: generated documentation and project figures.
- Cavalcanti, D., Mejia, C., Roehl, D., de-Pouplana, I., Casas, G., & Martha, L. F. (2024). Embedded Finite Element formulation for fluid flow in fractured porous medium. Computers and Geotechnics, 171, 106384.
- Cavalcanti, D., Mejia, C., Roehl, D., de-Pouplana, I., & Oñate, E. (2024). Hydromechanical embedded finite element for conductive and impermeable strong discontinuities in porous media. Computers and Geotechnics, 172, 106427.