TNO Intern

Commit 3ab160d8 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Testing some optimization methods from scipy for well distance

parent 6d471743
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -29,13 +29,7 @@ def calculate_volumetric_flow(
    well_distance: float,
    injection_temp: float,
):
    pressure_steps = [0, 1e5, -1e5, 2e5, -2e5, 3e5, -3e5]
    hp_cop = 0.0
    hp_added_power = 0.0
    hp_elec_consumption = 0.0

    d1d_results = None
    for step in pressure_steps:
    for step in [0, 1e5, -1e5, 2e5, -2e5, 3e5, -3e5]:
        d1d_results = doubletcalc(
            props, input_data, original_pressure + step, well_distance, injection_temp
        )
@@ -92,6 +86,10 @@ def calculate_volumetric_flow(
        hp_cop = hp_results.hp_cop
        hp_added_power = hp_results.hp_added_power
        hp_elec_consumption = hp_results.hp_elec_consumption
    else:
        hp_cop = 0.0
        hp_added_power = 0.0
        hp_elec_consumption = 0.0

    return VolumetricFlowResults(
        hp_cop,
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ def optimize_well_distance(
    well_distance = np.mean([dist_min, dist_max])

    for iter_count in range(1000):
        print(iter_count)
        if abs(dist_max - dist_min) <= 10.0:
            return well_distance