import math


def ideal_turbine_parametrisation(h, turbine_specs):
    """
    Calculates power and flow through a bulb turbine excluding efficiency loses
    """
    q = math.pi * ((turbine_specs["t_d"] / 2)**2) * math.sqrt(2 * turbine_specs["g"] * h)
    p1 = turbine_specs["dens"] * turbine_specs["g"] * q * h / (10 ** 6)

    if p1 < turbine_specs["t_cap"]:
        p2 = p1
    else:
        p2 = turbine_specs["t_cap"]

    q = p2 * (10 ** 6) / (turbine_specs["dens"] * turbine_specs["g"] * h)

    return p2, q