def SimpleCycle(Ref, Te, Tc, DTsh, DTsc, eta_a, Ts_Ph='Ph', **kwargs):
    """
    This function plots a simple four-component cycle, on the current axis, or that given by the optional parameter *axis*

    Required parameters:

    * Ref : A string for the refrigerant
    * Te : Evap Temperature in K
    * Tc : Condensing Temperature in K
    * DTsh : Evaporator outlet superheat in K
    * DTsc : Condenser outlet subcooling in K
    * eta_a : Adiabatic efficiency of compressor (no units) in range [0,1]

    Optional parameters:

    * Ts_Ph : 'Ts' for a Temperature-Entropy plot, 'Ph' for a Pressure-Enthalpy
    * axis : An axis to use instead of the active axis
    * skipPlot : If True, won't actually plot anything, just print COP

    """
    warnings.warn(
        "This function has been deprecated. Please consider converting it to an object inheriting from \"BaseCycle\".",
        DeprecationWarning)

    for i in kwargs:
        warnings.warn(
            "This function has been deprecated, your input \"{0}: {1}\" will be ignored"
            .format(i, kwargs[i]), DeprecationWarning)

    from CoolProp.Plots import SimpleCompressionCycle
    cycle = SimpleCompressionCycle(fluid_ref=Ref, graph_type=Ts_Ph)
    cycle.simple_solve_dt(Te, Tc, DTsh, DTsc, eta_a, SI=True)
    print(cycle.COP_cooling(), cycle.COP_heating())
def SimpleCycle(Ref,Te,Tc,DTsh,DTsc,eta_a,Ts_Ph='Ph',**kwargs):
    """
    This function plots a simple four-component cycle, on the current axis, or that given by the optional parameter *axis*

    Required parameters:

    * Ref : A string for the refrigerant
    * Te : Evap Temperature in K
    * Tc : Condensing Temperature in K
    * DTsh : Evaporator outlet superheat in K
    * DTsc : Condenser outlet subcooling in K
    * eta_a : Adiabatic efficiency of compressor (no units) in range [0,1]

    Optional parameters:

    * Ts_Ph : 'Ts' for a Temperature-Entropy plot, 'Ph' for a Pressure-Enthalpy
    * axis : An axis to use instead of the active axis
    * skipPlot : If True, won't actually plot anything, just print COP

    """    
    warnings.warn("This function has been deprecated. Please consider converting it to an object inheriting from \"BaseCycle\".",DeprecationWarning)
    
    for i in kwargs:
        warnings.warn("This function has been deprecated, your input \"{0}: {1}\" will be ignored".format(i,kwargs[i]),DeprecationWarning)

    from CoolProp.Plots import SimpleCompressionCycle
    cycle = SimpleCompressionCycle(fluid_ref=Ref, graph_type=Ts_Ph)
    cycle.simple_solve_dt(Te, Tc, DTsh, DTsc, eta_a, SI=True)
    print(cycle.COP_cooling(),cycle.COP_heating())
Exemple #3
0
 def plot_Ts():
     pp = PropertyPlot('HEOS::R134a', 'TS', unit_system='EUR', tp_limits='ACHP')
     pp.calc_isolines()
     cycle = SimpleCompressionCycle('HEOS::R134a', 'TS', unit_system='EUR', tp_limits='ACHP')
     cycle.simple_solve_dt(Te=T_K_sat_evaporating ,Tc=T_K_sat_condensing, dT_sh=superheat, dT_sc=subcooling, eta_com= Isentropic_Efficiency/100, SI=True)
     cycle.steps = 50
     sc = cycle.get_state_changes()
     plt.close(cycle.figure)
     pp.draw_process(sc)
     pp.savefig('T-s.svg')
     pp.show()