Skip to content

implement NVOE calculation to avoid sand production#329

Open
octavianor wants to merge 20 commits intomainfrom
311-add-nvoe-formula-for-ates
Open

implement NVOE calculation to avoid sand production#329
octavianor wants to merge 20 commits intomainfrom
311-add-nvoe-formula-for-ates

Conversation

@octavianor
Copy link
Contributor

No description provided.

@octavianor octavianor linked an issue Nov 20, 2025 that may be closed by this pull request
@octavianor octavianor marked this pull request as draft November 20, 2025 14:42
@octavianor octavianor marked this pull request as ready for review November 20, 2025 14:58
Copy link
Contributor

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 implements NVOE (Net Volume Over Extraction) calculations to prevent sand production in ATES (Aquifer Thermal Energy Storage) systems by dynamically limiting charge and discharge flow rates based on physical constraints.

Key Changes:

  • Added methods to calculate maximum safe flow rates for injection and extraction based on aquifer properties, temperature, and pressure
  • Implemented dynamic calculation of saline density and viscosity to improve accuracy
  • Added state management to propagate calculated power limits to the controller

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
controller_storage.py Added set_state method to update maximum charge/discharge power limits from ATES calculations
ates_cluster.py Implemented NVOE calculations with helper methods for saline properties, maximum flow rates, and state propagation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@samvanderzwan samvanderzwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comments.
In general avoid magic numbers and ensure the documentation of methods is up to date explaining what a method does.

Copy link
Contributor

@samvanderzwan samvanderzwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some comments open from previous review.
Other changes are ok

water_density = fluid_props.get_density(average_temperature)
water_heat_capacity = fluid_props.get_heat_capacity(average_temperature)

max_extraction_flow_cold_well = self._get_max_flowrate_extraction_norm(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still open

grav_accel = 9.81 # m/s2
saline_density = self._get_saline_density(P, T)
saline_viscosity = self._get_saline_viscosity(P, T)
aquifer_permeability = self.aquifer_permeability * 9.8692326671601e-16 # mD to m2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still open

@octavianor
Copy link
Contributor Author

There are still some comments open from previous review. Other changes are ok

it is chicken-egg problem:

in order to get saline density downhole. I need to have downhole pressure

if I need to calculate downhole pressure using actual value: rho * g * h, I need rho

@octavianor
Copy link
Contributor Author

@samvanderzwan you can do final review

Copy link
Contributor

@samvanderzwan samvanderzwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there still some comments are not resolved could you please check

@octavianor
Copy link
Contributor Author

@samvanderzwan hope this final changes will pass

@octavianor octavianor requested a review from samvanderzwan March 9, 2026 11:00
Copy link
Contributor

@samvanderzwan samvanderzwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still 3 comments open can you please check them

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.

add NVOE formula for ATES

3 participants