TNO Intern

Commit 7bce6728 authored by Florian Knappers's avatar Florian Knappers
Browse files

doubletcalc works

parent aab77882
Loading
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ def doubletcalc(
        pump_pressure=0,
        pump_depth=0,
        pump_efficiency=0,
        pressure_balance_tolerance=10,
        pressure_balance_tolerance=0.1,
        viscosity_mode=props.viscosity_mode,
        heat_exchanger_exit_temperature=injection_temp,
    )
@@ -90,19 +90,19 @@ def doubletcalc(
        well_distance=well_distance,
        cooling_fraction=0.1,
        yearly_operating_hours=props.load_hours,
        pressure_balance_tolerance=10,
        pressure_balance_tolerance=0.1,
        viscosity_mode=props.viscosity_mode,
        heat_exchanger_exit_temperature=injection_temp,
    )
    doublet.simulate()

    return Doublet1DResults( # TODO: check these values. Not sure what conversions should or shouldnt be done
        geothermal_powers=doublet.geothermal_power * 1e-6,
    return Doublet1DResults(
        geothermal_powers=doublet.geothermal_power,
        cop=doublet.cop,
        flowrate=-0.5 * (doublet.producer.qvol[7] + doublet.producer.qvol[8]) * 3600,
        pump_power_required=doublet.pump_power * 1.0e-3,
        production_temp=doublet.nodes['prod_top'].temperature,
        heat_power_produced=[doublet.geothermal_power * 1e-6,] * props.econ_lifetime_years,
        flowrate=doublet.flowrate,
        pump_power_required=doublet.pump_power,
        production_temp=doublet.production_temp,
        heat_power_produced=[doublet.geothermal_power,] * props.econ_lifetime_years,
    )

def get_total_skin_injection(props, input):
+5 −5
Original line number Diff line number Diff line
@@ -20,9 +20,9 @@ def test_doubletcalc():

    results = doubletcalc(props, input_data, 600000, 1550, 40)

    assert np.isclose(results.geothermal_powers, 0.027926914290870505, rtol=0.03)
    assert np.isclose(results.geothermal_powers, 0.027926914290870505, rtol=0.01)
    assert np.isclose(results.cop, 5.396068601571214, rtol=0.01)
    assert np.isclose(results.flowrate, 18.631507399806665, rtol=0.15)
    assert np.isclose(results.pump_power_required, 5.175418689587975, rtol=0.1)
    assert np.isclose(results.production_temp, 41.36211427733413, rtol=0.1)
    assert np.isclose(results.heat_power_produced[0], 0.027926914290870505, rtol=0.1)
 No newline at end of file
    assert np.isclose(results.flowrate, 18.631507399806665, rtol=0.01)
    assert np.isclose(results.pump_power_required, 5.175418689587975, rtol=0.01)
    assert np.isclose(results.production_temp, 41.36211427733413, rtol=0.01)
    assert np.isclose(results.heat_power_produced[0], 0.027926914290870505, rtol=0.01)
 No newline at end of file