Пример #1
0
def calc_P_delta_h(T_in,T_out,m_dot,p_chamber):
    """Calculate power required to raise temperature of flow with mass flow m_dot
    
    Arguments:
        T_in {K} -- Inlet temperature
        T_out {K} -- Outlet temperature
        m_dot {kg/s} -- Mass flow
        p_chamber {Pa} -- Chamber pressure
    
    Returns:
        {W} - Required power
    """
    # Check if outlet state is gaseous

    fp = FluidProperties("water")

    outlet_phase = fp.get_phase(T=T_out,p=p_chamber)
    if not (outlet_phase == "gas" or outlet_phase == "supercritical_gas"):
        print(fp.get_phase(T=T_out,p=p_chamber))
        raise ValueError("Assumed outlet temperature is not not in gas phase")
    
    Delta_h = fp.get_enthalpy(T=T_out, p=p_chamber) - fp.get_enthalpy(T=T_in, p=p_chamber)

    return m_dot*Delta_h
Пример #2
0
def run2():
    #Calcuate heating efficiency of heaters in literature
    m_dot = 0.83e-6 # [kg/s] mass flow
    T_in = 24+273.15 # [K] Inlet temperature
    T_out = 426.65 # [K] Outlet temperature
    p = 5.15e5 # [Pa] Pressure
    P_total = 8.19 # [W] Total electrical power

    fp = FluidProperties("water")

    # Specific enthalpy at inlet and outlet
    h_in = fp.get_enthalpy(T=T_in, p=p) # [J/kg] Inlet
    h_out = fp.get_enthalpy(T=T_out, p=p) # [J/kg] Outlet
    
    P_delta_h = m_dot*(h_out-h_in) # [W] Power raising enthalpy
    efficiency = P_delta_h/P_total # [-]

    print("Exit phase: {}".format(fp.get_phase(T=T_out,p=p)))

    print("P_delta_h: {:1.2f} W".format(P_delta_h))
    print("Micro-heater efficiency: {:1.2f} ".format(efficiency))

    print("T_in = {:3.0f} K \t\t T_out =  {:3.0f} K".format(T_in,T_out))
    print("Mass flow = {:2.2f} mg/s".format(m_dot*1e6))
Пример #3
0
def ideal_enthalpy_change(T_inlet, p_inlet, T_outlet, p_outlet, fp: FluidProperties):
    """Returns specific enthalpy change based on simple chamber inlet and outlet conditions.
    This should give the power the micro-heater must transfer in ideal conditions with no heat losses.
    In addition returns a warning if the final state is not gaseous.
    
    Arguments:
        T_inlet {K} -- Inlet temperature
        p_inlet {Pa} -- Inlet pressure
        T_outlet {K} -- Outlet temperature
        p_outlet {Pa} -- Outlet pressure
        fp {object} -- FluidProperties object
    
    Returns:
        delta_h {J/(kg*K)} -- 
    """

    h_inlet = fp.get_enthalpy(T=T_inlet, p=p_inlet)
    h_outlet = fp.get_enthalpy(T=T_outlet, p=p_outlet)

    outlet_phase = fp.get_phase(T=T_outlet,p=p_outlet)
    if not (outlet_phase == 'gas' or outlet_phase == 'supercritical_gas'):
        print("Warning: Phase at chamber exit is not gaseous but {}".format(outlet_phase))
        
    return h_outlet-h_inlet