TNO Intern

Commit 55adfded authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Adding extra information to the README.md

parent 7021dedf
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
@@ -113,6 +113,41 @@ results = calculate_doublet_performance(input_grids)
print(results)
```

### Running Doublet simulations with custom simulation parameters
To adjust properties of the simulation, you can pass a `utc_properties` instance to the calculate_doublet_performance function.
A `utc_properties` instance is a JClass implementation of the Java UTCProperties class. It is generated by using the `utc_properties_builder`, upon which custom properties can be set, and used to build an instance of the `utc_properties`.

Be aware, that you will need access to the ThermoGIS java source code to fully understand what these properties do and not all properties are actually utilised in this python api (especially those which refer to paths to files).

Common properties to change include:
- `setUseHeatPump(Boolean)`: if true, include a heat-pump when modelling
- `setUseStimulation(Boolean)`: if true, apply reservoir stimulation when simulating a doublet
- `setSurfaceTemperature(float)`: The temperature of the surface
- `setTempGradient(float)`: The gradient at which temperature increases with depth, in C/km
- `setDhReturnTemp(float)`: The goal of the direct heat return temperature
- `setStimKhMax(float)`: The maximum transmissivity above which no stimulation will occur (if UseStimulation = True)

Here is an example, where the default utc_properties is used, but the UseHeatPump option is set to True. this is achievied by instantiating a `utc_properties_builder` class, running `.useHeatPump(True)` on that class, and then building the 
`utc_properties` themselves, with the `.build()` method of the `utc_properties_builder`.
```python
from pythermogis import calculate_doublet_performance, instantiate_utc_properties_builder
import xarray as xr

input_data = xr.Dataset({
    "thickness_mean": ((), 300),
    "thickness_sd": ((), 50),
    "ntg": ((), 0.5),
    "porosity": ((), 0.5),
    "depth": ((), 5000),
    "ln_permeability_mean": ((), 5),
    "ln_permeability_sd": ((), 0.5),
})

utc_properties = instantiate_utc_properties_builder().setUseHeatPump(True).build()
results = calculate_doublet_performance(input_data, utc_properties=utc_properties)
print(results)
```

---

## Contributing
+2 −1
Original line number Diff line number Diff line
from .thermogis_classes.doublet import calculate_doublet_performance
from .thermogis_classes.utc_properties import *
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ class JVM(TestCase):

    @skip
    def test_JVM_start_JAVA_HOME_environment_variable_not_set(self):
        # If this fails then either the JVM or the ThermoGIS Jar environment variables have not been properly set
        os.environ["JAVA_HOME"] = "dummy"

        # Act & Assert
@@ -15,7 +14,6 @@ class JVM(TestCase):

    @skip
    def test_JVM_start_THERMOGIS_JAR_environment_variable_not_set(self):
        # If this fails then either the JVM or the ThermoGIS Jar environment variables have not been properly set
        os.environ["THERMOGIS_JAR"] = "dummy"

        # Act & Assert