TNO Intern

Commit ca496ce8 authored by Jan Diederik van Wees's avatar Jan Diederik van Wees
Browse files

changes for examples (further improved) and added conversion scenarios

parent 3f16b993
Loading
Loading
Loading
Loading
Loading
+28 −14
Original line number Diff line number Diff line
%% Cell type:code id:initial_id tags:

``` python
#
# this example shows how to set up the UTC properties and use them in the doublet performance calculation.
#  The UTC properties are used to calculate the performance of a doublet system with a heat pump.
#  The UTC properties modified here activate the heatpump model, the goal and return temperature of the heat network
#  and the use of the Kestin viscosity model.
#
#  It also modifies the cost parameters of the heat pump, which are used to calculate the UTC cost of the system.
#
#
from pythermogis import calculate_doublet_performance
from pythermogis import instantiate_thermogis_parameters
import xarray as xr
```

%% Cell type:code id:d78e3e6f8909074d tags:

``` python
input_data = xr.Dataset({
    "thickness": 300,
    "ntg": 0.5,
    "porosity": 0.2,
    "depth": 2000,
    "permeability": 300,
})
```

%% Cell type:code id:59bb4943298aecec tags:

``` python
tg_properties = instantiate_thermogis_parameters()
tg_properties.setUseHeatpump(True)
tg_properties.setHeatPumpCapex(600)
tg_properties.setHeatPumpOpex(60)
tg_properties.setHeatPumpAlternativeHeatingPrice(2.8)
tg_properties.setGoalTemperature(100)
tg_properties.setDhReturnTemp(50)
tg_properties.setUseKestinViscosity(True)

utc_properties = tg_properties.setupUTCParameters()

tg_properties = instantiate_thermogis_parameters()
tg_properties.setCapexConstant(0.5)
tg_properties.setCapexVariable(1100)
tg_properties.setHeatExchangerEfficiency(0.4)
tg_properties.setHeatExchangerParasitic(0.1)
tg_properties.setMinProductionTemp(70)
tg_properties.setMaxCoolingTemperatureRange(40)
tg_properties.setDhReturnTemp(60)
tg_properties.setLoadHours(8760)
tg_properties.setUseKestinViscosity(True)
tg_properties.setUtcCutoff(10)   # UTC cts/kWh of chill

utc_properties = tg_properties.setupUTCParameters()
```

%% Cell type:code id:8a75abccf9d7e13e tags:

``` python
results = calculate_doublet_performance(input_data, utc_properties=utc_properties)
```

%% Cell type:code id:a01bab0bd12b4a7b tags:

``` python
print(results.data_vars.keys())
```

%% Output

    KeysView(Data variables:
        thickness                int64 8B 300
        ntg                      float64 8B 0.5
        porosity                 float64 8B 0.2
        depth                    int64 8B 2000
        permeability             int64 8B 300
        mask                     float64 8B nan
        temperature              float64 8B 76.65
        transmissivity           int64 8B 90000
        transmissivity_with_ntg  float64 8B 45.0
        power                    float64 8B 22.12
        heat_pump_power          float64 8B 10.56
        capex                    float64 8B 28.09
        opex                     float64 8B -6.133
        utc                      float64 8B 7.634
        npv                      float64 8B -19.15
        hprod                    float64 8B 2.799e+06
        cop                      float64 8B 4.053
        cophp                    float64 8B 2.844
        pres                     float64 8B 60.0
        flow_rate                float64 8B 411.9
        welld                    float64 8B 1.216e+03
        inj_temp                 float64 8B 26.65
        prd_temp                 float64 8B 75.87)
        power                    float64 8B 3.153
        heat_pump_power          float64 8B 0.0
        capex                    float64 8B 14.06
        opex                     float64 8B -1.499
        utc                      float64 8B 11.94
        npv                      float64 8B -3.045
        hprod                    float64 8B 5.824e+05
        cop                      float64 8B 2.129
        cophp                    float64 8B 0.0
        pres                     float64 8B 55.55
        flow_rate                float64 8B 453.3
        welld                    float64 8B 1.318e+03
        inj_temp                 float64 8B 60.0
        prd_temp                 float64 8B 75.94)
+14 −14

File changed.

Preview size limit exceeded, changes collapsed.

+25 −23

File changed.

Preview size limit exceeded, changes collapsed.

+13 −13

File changed.

Preview size limit exceeded, changes collapsed.

+23 −23

File changed.

Preview size limit exceeded, changes collapsed.

Loading