-
Notifications
You must be signed in to change notification settings - Fork 36
Geothermal updates #17
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces minor updates to the geothermal module to improve handling of very low mass flow rates in the WellboreModel and adds support for CompositeModel instances in TestCase.
- Enhanced WellboreModel flux equations to handle very low friction loss scenarios by adding mass flux velocity term
- Extended TestCase class to properly support CompositeModel instances for plotting and driving force detection
- Improved wellbore trajectory processing and geothermal equilibrium initialization
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| modules/upr/pebi2D/lineSites2D.m | Reshapes wellSpace to column vector for consistency |
| modules/geothermal/utils/setUpGeothermalWellboreLinearSolver.m | Adds configurable tolerance/iterations and returns modified model |
| modules/geothermal/utils/processWellboreTrajectories.m | Adds support for pre-existing trajectory fields in wells |
| modules/geothermal/utils/initializeGeothermalEquilibrium.m | Enhances ODE solution to include boundary face coordinates |
| modules/geothermal/utils/convertToReservoirWellboreModel.m | Improves setup handling and TestCase support |
| modules/geothermal/utils/addHybridCellsToWell.m | Fixes documentation typos and extends trajectory field support |
| modules/geothermal/models/wellbore/WellboreModel.m | Modifies flux equations to prevent singular systems at low flow rates |
| modules/geothermal/examples/geothermalExampleWellbore.m | Simplifies solver setup using updated function signature |
| autodiff/test-suite/setup-functions/layered_nls_test_wog.m | Removes empty comment line |
| autodiff/test-suite/TestCase.m | Adds CompositeModel support for plotting and well visualization |
Comments suppressed due to low confidence (1)
modules/geothermal/utils/addHybridCellsToWell.m:1
- Removed incorrect SYNOPSIS line that referenced unrelated function 'spe10_wo' instead of the actual function 'addHybridCellsToWell'.
function W = addHybridCellsToWell(W, G, rock, varargin)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| v = v./(pi*rhoMix.*((Do/2).^2 - (Di/2).^2)); | ||
| eqs = (pot - dp) + 10*v; |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number '10' in the equation should be defined as a named constant to improve code maintainability and make the scaling factor's purpose clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to upr module should be made in the upr repo, then we can update subtrees and sync back to MRST.
This PR introduces minor updates to the geothermal module, including better handling of very low mass flow rates in the WellboreModel, and support for CompositeModel instances in TestCase.