def frozen_flow(TP_0,Y_0str,gas,p_c,NDeltap_c):
    """
    frozen_flow = frozen_flow(TP_0,Y_0str,gas,p_c,NDeltap_c)
    """
    ps = np.linspace(p_c,0,NDeltap_c)[1:-1]
    p_h_rho_a_X = [] # store pressure p, enthalpy h, density rho, speed of sound(s) a, mole fraction X
    for p in ps:
        # combustion (after inlets, in start of combustion chamber)
        gas.Y = Y_0str
        gas.TP = TP_0
        gas.equilibrate('HP')
        gas.SP = None,p
        p_h_rho_a_X.append((p,gas.enthalpy_mass,gas.density,equilSoundSpeeds(gas),gas.X,gas.T))
    return p_h_rho_a_X
def equil_flow(TP_0,Y_0str,gas,p_c,NDeltap_c):
    """
    equil_flow = equil_flow(TP_0,Y_0str,gas,p_c,NDeltap_c)
    """
    ps = np.linspace(p_c,0,NDeltap_c)[1:-1]
    p_h_rho_a_X = []
    for p in ps:
        gas.Y  = Y_0str
        gas.TP = TP_0
        gas.equilibrate('HP')
#        h_0 = gas.enthalpy_mass
        gas = isen_flow(gas,p)
        p_h_rho_a_X.append( (p,gas.enthalpy_mass, gas.density, equilSoundSpeeds(gas), gas.X,gas.T) )
    return p_h_rho_a_X