implement NVOE calculation to avoid sand production#329
implement NVOE calculation to avoid sand production#329octavianor wants to merge 20 commits intomainfrom
Conversation
There was a problem hiding this comment.
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.
samvanderzwan
left a comment
There was a problem hiding this comment.
See the comments.
In general avoid magic numbers and ensure the documentation of methods is up to date explaining what a method does.
samvanderzwan
left a comment
There was a problem hiding this comment.
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( |
| 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 |
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 |
|
@samvanderzwan you can do final review |
samvanderzwan
left a comment
There was a problem hiding this comment.
I see there still some comments are not resolved could you please check
|
@samvanderzwan hope this final changes will pass |
samvanderzwan
left a comment
There was a problem hiding this comment.
There are still 3 comments open can you please check them
No description provided.