Skip to content

Conversation

@strene
Copy link
Contributor

@strene strene commented Oct 10, 2025

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.

@moyner moyner requested a review from Copilot October 10, 2025 16:26
Copy link

Copilot AI left a 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.

Comment on lines +525 to +526
v = v./(pi*rhoMix.*((Do/2).^2 - (Di/2).^2));
eqs = (pot - dp) + 10*v;
Copy link

Copilot AI Oct 10, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants