예제 #1
0
    def __init__(self,
                 T_stag_in,
                 p_stag_in,
                 G_in,
                 G_fuel_in,
                 g_cool,
                 G_c1_in,
                 T_cool,
                 cool_fluid: IdealGas = Air(),
                 work_fluid: IdealGas = NaturalGasCombustionProducts(),
                 precision=0.0001):
        ModelSingleWorkFluid.__init__(self)
        self.T_stag_in = T_stag_in
        self.p_stag_in = p_stag_in
        self.G_in = G_in
        self.G_fuel_in = G_fuel_in
        self.g_cool = g_cool
        self.G_c1_in = G_c1_in
        self.T_cool = T_cool
        self.cool_fluid = cool_fluid
        self.work_fluid = work_fluid
        self.precision = precision

        self.G_cool = None
        self.fuel_content_in = None
        self.fuel_content_out = None
        self.alpha_in = None
        self.alpha_out = None
예제 #2
0
def compute_cycle(eta_stag_p_c=0.88, eta_stag_p_ct=9.9, eta_stag_p_pt=0.9):
    precision = 0.0001
    atm = Atmosphere()
    inlet = Inlet()
    comp = Compressor(pi_c=17, eta_stag_p=eta_stag_p_c, precision=precision)
    sink = Sink(g_cooling=0, g_outflow=0.03)
    comb_chamber = CombustionChamber(T_gas=1523,
                                     precision=precision,
                                     alpha_out_init=2,
                                     fuel=NaturalGas(),
                                     T_fuel=320,
                                     delta_p_fuel=5e5)
    comp_turbine = Turbine(eta_stag_p=eta_stag_p_ct,
                           eta_m=0.99,
                           precision=precision)
    source = Source(g_return=0)
    power_turbine = Turbine(eta_stag_p=eta_stag_p_pt,
                            eta_m=0.99,
                            eta_r=0.99,
                            precision=precision,
                            p_stag_out_init=1e5)
    outlet = Outlet()
    load = Load(power=16e6)
    comp_turb_zero_load = Load(power=0)
    power_turb_zero_load = Load(power=0)

    solver = NetworkSolver(unit_arr=[
        atm, inlet, comp, sink, comb_chamber, comp_turbine, source,
        power_turbine, outlet, load, comp_turb_zero_load, power_turb_zero_load
    ],
                           relax_coef=1,
                           precision=precision,
                           max_iter_number=100,
                           cold_work_fluid=Air(),
                           hot_work_fluid=NaturalGasCombustionProducts())
    solver.create_gas_dynamic_connection(atm, inlet)
    solver.create_gas_dynamic_connection(inlet, comp)
    solver.create_gas_dynamic_connection(comp, sink)
    solver.create_gas_dynamic_connection(sink, comb_chamber)
    solver.create_gas_dynamic_connection(comb_chamber, comp_turbine)
    solver.create_gas_dynamic_connection(comp_turbine, source)
    solver.create_gas_dynamic_connection(source, power_turbine)
    solver.create_gas_dynamic_connection(power_turbine, outlet)
    solver.create_static_gas_dynamic_connection(outlet, atm)
    solver.create_mechanical_connection(comp_turbine, comp,
                                        comp_turb_zero_load)
    solver.create_mechanical_connection(power_turbine, load,
                                        power_turb_zero_load)
    solver.solve()
    G_air = load.power / power_turbine.gen_labour1
    G_comp_turb = G_air * comp_turbine.g_in
    G_power_turb = G_air * power_turbine.g_in
    G_fuel = G_air * comb_chamber.g_fuel_prime * comb_chamber.g_in
    eta_e = power_turbine.gen_labour1 / (comb_chamber.work_fluid_out.Q_n *
                                         comb_chamber.g_fuel_prime *
                                         comb_chamber.g_in)
    return solver, G_air, G_comp_turb, G_power_turb, G_fuel, eta_e
예제 #3
0
    def __init__(
            self,
            characteristics: Characteristics,
            T_stag_in,
            p_stag_in,
            pi_c_stag_rel,
            n_norm_rel,
            T_stag_in_nom,
            p_stag_in_nom,
            G_in_nom,
            eta_c_stag_nom,
            n_nom,
            pi_c_stag_nom,
            G_fuel_in=0,
            p_a=1e5,
            T_a=288,
            sigma_in=0.99,
            work_fluid: IdealGas = Air(),
            precision=0.0001,
    ):
        ModelSingleWorkFluid.__init__(self)
        self.characteristics = characteristics
        self.T_stag_in = T_stag_in
        self.p_stag_in = p_stag_in
        self.pi_c_stag_rel = pi_c_stag_rel
        self.n_norm_rel = n_norm_rel
        self.T_stag_in_nom = T_stag_in_nom
        self.p_stag_in_nom = p_stag_in_nom
        self.G_in_nom = G_in_nom
        self.eta_c_stag_nom = eta_c_stag_nom
        self.n_nom = n_nom
        self.pi_c_stag_nom = pi_c_stag_nom
        self.G_fuel_in = G_fuel_in
        self.p_a = p_a
        self.T_a = T_a
        self.sigma_in = sigma_in
        self.work_fluid = work_fluid
        self.precision = precision

        self.n_norm_nom = None
        self.G_in_norm_nom = None
        self.G_in_norm_rel = None
        self.G_in_norm = None
        self.n_norm = None
        self.n = None
        self.eta_c_stag_rel = None
        self.pi_c_stag = None
        self.eta_c_stag = None
        self.ad_proc_res = None
        self.H_stag = None
        self.c_p_av_old = None
        self.k_av_old = None
        self.k_av = None
        self.k_res = None
        self.L = None
        self.T_stag_out_ad = None
        self.N = None
예제 #4
0
    def setUp(self):
        stage_num = 12
        self.H_t_rel_arr = QuadraticBezier(0.32,
                                           0.33,
                                           stage_num,
                                           angle1=np.radians(10),
                                           angle2=np.radians(10)).get_array()
        self.eta_ad_stag_arr = QuadraticBezier(
            0.85,
            0.86,
            stage_num,
            angle1=np.radians(10),
            angle2=np.radians(10)).get_array()
        self.c1_a_rel_arr = QuadraticBezier(0.45,
                                            0.51,
                                            stage_num,
                                            angle1=np.radians(10),
                                            angle2=np.radians(-1)).get_array()
        self.h_rk_rel_dist = lambda z: interp1d([0, stage_num - 1], [2.5, 1.6]
                                                )(z).__float__()
        self.h_na_rel_dist = lambda z: interp1d([0, stage_num - 1], [3.2, 1.8]
                                                )(z).__float__()
        self.delta_a_rk_rel = lambda z: interp1d([0, stage_num - 1],
                                                 [0.3, 0.5])(z).__float__()
        self.delta_a_na_rel = lambda z: interp1d([0, stage_num - 1],
                                                 [0.3, 0.5])(z).__float__()

        self.compressor = Compressor(
            work_fluid=Air(),
            stage_num=stage_num,
            const_diam_par_arr=[0.5 for _ in range(stage_num)],
            p0_stag=1e5,
            T0_stag=288,
            G=40,
            n=11000,
            H_t_rel_arr=self.H_t_rel_arr,
            eta_ad_stag_arr=self.eta_ad_stag_arr,
            R_av_arr=QuadraticBezier.get_array_from_dist(
                lambda z: 0.5, stage_num),
            k_h_arr=QuadraticBezier.get_array_from_dist(
                lambda z: 0.98, stage_num),
            c1_a_rel_arr=self.c1_a_rel_arr,
            h_rk_rel_arr=QuadraticBezier.get_array_from_dist(
                self.h_rk_rel_dist, stage_num),
            h_na_rel_arr=QuadraticBezier.get_array_from_dist(
                self.h_na_rel_dist, stage_num),
            delta_a_rk_rel_arr=QuadraticBezier.get_array_from_dist(
                self.delta_a_rk_rel, stage_num),
            delta_a_na_rel_arr=QuadraticBezier.get_array_from_dist(
                self.delta_a_na_rel, stage_num),
            d1_in_rel1=0.5,
            zeta_inlet=0.04,
            zeta_outlet=0.35,
            c11_init=250,
        )
        self.compressor.compute()
예제 #5
0
 def __init__(self, unit_arr: typing.List[Unit], relax_coef=1, precision=0.01, max_iter_number=50,
              cold_work_fluid: IdealGas=Air(), hot_work_fluid: IdealGas=KeroseneCombustionProducts()):
     self._connection_arr: typing.List[ConnectionSet] = []
     self._unit_arr = unit_arr
     self.cold_work_fluid = cold_work_fluid
     self.hot_work_fluid = hot_work_fluid
     self.relax_coef = relax_coef
     self.precision = precision
     self.max_iter_number = max_iter_number
     self._iter_number = 0
     self._residual_arr = []
예제 #6
0
 def setUp(self):
     self.comb_geom = CombustionChamberGeom(work_fluid_in=Air(),
                                            Q_n=48e6,
                                            sigma_d=0.998,
                                            sigma_front=0.998,
                                            n_pipe=12,
                                            G_in=45,
                                            p_stag_in=15e5,
                                            T_stag_in=550,
                                            F_in=np.pi * 0.5**2 / 4,
                                            D_d_av=0.5,
                                            G_fuel_in=0,
                                            G_fuel=0.9,
                                            alpha_sum=3.5,
                                            alpha1=1.1,
                                            c_d=60,
                                            c1=12,
                                            H=4.5e6,
                                            l1_rel=0.6,
                                            eta_burn=0.99)
     self.comb_geom.compute()
예제 #7
0
    def __init__(self,
                 g_fuel,
                 G_c1_in,
                 T_stag_in,
                 p_stag_in,
                 G_in,
                 G_fuel_in,
                 eta_comb,
                 sigma_comb,
                 T_fuel=300,
                 fuel: Fuel = NaturalGas(),
                 delta_p_fuel=5e5,
                 work_fluid_in: IdealGas = Air(),
                 work_fluid_out: IdealGas = NaturalGasCombustionProducts(),
                 precision=0.0001):
        ModelMultipleWorkFluid.__init__(self)
        self.g_fuel = g_fuel
        self.G_c1_in = G_c1_in
        self.G_fuel_in = G_fuel_in
        self.G_in = G_in
        self.T_stag_in = T_stag_in
        self.p_stag_in = p_stag_in
        self.eta_comb = eta_comb
        self.sigma_comb = sigma_comb
        self.T_fuel = T_fuel
        self.fuel = fuel
        self.delta_p_fuel = delta_p_fuel
        self.work_fluid_in = work_fluid_in
        self.work_fluid_out = work_fluid_out
        self.precision = precision

        self.G_fuel = None
        self.fuel_content_out = None
        self.fuel_content_in = None
        self.alpha_in = None
        self.alpha_out = None
        self.i_stag_in = None
        self.i_stag_out = None
        self.p_fuel = None
        self.i_fuel = None
예제 #8
0
def get_compressor(p0_stag, T0_stag, G, n, stage_num, H_t_rel1, H_t_rel_delta,
                   c1_a_rel1, c1_a_rel_delta) -> CompAvLine:
    H_t_rel_dist = QuadraticBezier(H_t_rel1,
                                   H_t_rel1 - H_t_rel_delta,
                                   stage_num=stage_num,
                                   angle1=np.radians(10),
                                   angle2=np.radians(10))
    eta_rel_dist = QuadraticBezier(0.86,
                                   0.86,
                                   stage_num=stage_num,
                                   angle1=np.radians(3),
                                   angle2=np.radians(3))
    c1_a_rel_dist = QuadraticBezier(c1_a_rel1,
                                    c1_a_rel1 - c1_a_rel_delta,
                                    stage_num=stage_num,
                                    angle1=np.radians(10),
                                    angle2=np.radians(10))
    comp = CompAvLine(work_fluid=Air(),
                      stage_num=stage_num,
                      const_diam_par_arr=[0.5 for _ in range(stage_num)],
                      p0_stag=p0_stag,
                      T0_stag=T0_stag,
                      G=G,
                      n=n,
                      H_t_rel_arr=H_t_rel_dist.get_array(),
                      eta_ad_stag_arr=eta_rel_dist.get_array(),
                      R_av_arr=[0.5 for _ in range(stage_num)],
                      k_h_arr=[1.0 for _ in range(stage_num)],
                      c1_a_rel_arr=c1_a_rel_dist.get_array(),
                      h_rk_rel_arr=[3.5 for _ in range(stage_num)],
                      h_na_rel_arr=[3.5 for _ in range(stage_num)],
                      delta_a_rk_rel_arr=[0.4 for _ in range(stage_num)],
                      delta_a_na_rel_arr=[0.4 for _ in range(stage_num)],
                      d1_in_rel1=0.5,
                      zeta_inlet=0.04,
                      zeta_outlet=0.03,
                      c11_init=200,
                      precision=0.0001)
    comp.compute()
    return comp
예제 #9
0
    def setUp(self):
        self.atmosphere = Atmosphere()
        self.inlet = Inlet()
        self.compressor = Compressor(17, precision=0.001)
        self.sink = Sink(g_cooling=0.05, g_outflow=0.01)
        self.comb_chamber = CombustionChamber(1450,
                                              alpha_out_init=2.7,
                                              precision=0.001)
        self.comb_chamber_inter_up = CombustionChamber(1300,
                                                       alpha_out_init=2.7,
                                                       precision=0.001)
        self.comb_chamber_inter_down = CombustionChamber(1300,
                                                         alpha_out_init=2.7,
                                                         precision=0.001,
                                                         p_stag_out_init=4e5)
        self.source = Source(g_return=0.05)
        self.turbine_low_pres_power = Turbine(p_stag_out_init=1e5)
        self.turbine_comp_up = Turbine()
        self.outlet = Outlet()
        self.N_gen = 10e6
        self.eta_gen = 0.97
        self.load = Load(self.N_gen / self.eta_gen)
        self.zero_load1 = Load(0)
        self.zero_load2 = Load(0)
        self.solver = NetworkSolver(
            [
                self.atmosphere, self.outlet, self.turbine_comp_up, self.sink,
                self.turbine_low_pres_power, self.source, self.inlet,
                self.comb_chamber, self.compressor, self.load, self.zero_load1,
                self.zero_load2
            ],
            cold_work_fluid=Air(),
            hot_work_fluid=NaturalGasCombustionProducts())
        self.solver.create_gas_dynamic_connection(self.atmosphere, self.inlet)
        self.solver.create_gas_dynamic_connection(self.inlet, self.compressor)
        self.solver.create_gas_dynamic_connection(self.compressor, self.sink)
        self.solver.create_gas_dynamic_connection(self.sink, self.comb_chamber)
        self.solver.create_gas_dynamic_connection(self.comb_chamber,
                                                  self.turbine_comp_up)
        self.solver.create_gas_dynamic_connection(self.turbine_comp_up,
                                                  self.source)
        self.solver.create_gas_dynamic_connection(self.source,
                                                  self.turbine_low_pres_power)
        self.solver.create_gas_dynamic_connection(self.turbine_low_pres_power,
                                                  self.outlet)
        self.solver.create_static_gas_dynamic_connection(
            self.outlet, self.atmosphere)
        self.solver.create_mechanical_connection(self.turbine_low_pres_power,
                                                 self.load, self.zero_load1)
        self.solver.create_mechanical_connection(self.turbine_comp_up,
                                                 self.compressor,
                                                 self.zero_load2)
        self.solver.solve()

        self.N_e_specific = self.load.consumable_labour
        self.G_air = self.load.power / self.N_e_specific
        self.G_fuel = self.comb_chamber.g_fuel_prime * self.comb_chamber.g_in * self.G_air
        self.c_p_nat_gas_av = 2.3e3
        self.k_nat_gas_av = 1.31
        self.press_in_gas_comp = 1.3e6
        self.T_in_gas_comp = 288
        self.eta_ad_gas_comp = 0.82
        self.eta_el_eng = 0.95
        self.mass_rate_gas_comp = self.G_fuel
        self.press_out_gas_comp = self.compressor.p_stag_out + 0.5e6
        self.pi_gas_comp = self.press_out_gas_comp / self.press_in_gas_comp
        self.rho_gas_comp = 6.9867 + (10.587 - 6.9867) / (1.5e6 - 1e6) * (
            self.press_in_gas_comp - 1e6)
        self.vol_rate_gas_comp = self.mass_rate_gas_comp / self.rho_gas_comp * 60
        self.T_out_gas_comp = self.T_in_gas_comp * (1 + (self.pi_gas_comp**(
            (self.k_nat_gas_av - 1) / self.k_nat_gas_av) - 1) /
                                                    self.eta_ad_gas_comp)
        self.L_e_gas_comp = self.c_p_nat_gas_av * (self.T_out_gas_comp -
                                                   self.T_in_gas_comp)
        self.N_gas_comp = self.L_e_gas_comp / (self.mass_rate_gas_comp *
                                               self.eta_el_eng)
예제 #10
0
    def setUp(self):
        self.turbine = Turbine(TurbineType.WORK,
                               T_g_stag=1450,
                               p_g_stag=400e3,
                               G_turbine=25,
                               work_fluid=KeroseneCombustionProducts(),
                               G_fuel=2.5,
                               l1_D1_ratio=0.25,
                               n=15e3,
                               T_t_stag_cycle=1050,
                               stage_number=2,
                               eta_t_stag_cycle=0.91,
                               k_n=6.8,
                               eta_m=0.99,
                               auto_compute_heat_drop=False,
                               precise_heat_drop=False,
                               auto_set_rho=False,
                               rho_list=[0.4, 0.20],
                               H0_list=[235e3, 200e3],
                               alpha11=np.radians([17])[0],
                               gamma_av=np.radians([4])[0],
                               gamma_sum=np.radians([10])[0])
        self.turbine.compute_geometry()
        self.turbine.compute_stages_gas_dynamics()
        self.turbine.compute_integrate_turbine_parameters()

        self.turbine_profiler = TurbineProfiler(turbine=self.turbine,
                                                p_in_stag=lambda r: self.turbine[0].p0_stag,
                                                T_in_stag=lambda r: self.turbine[0].T0_stag,
                                                c_in=lambda r: 90,
                                                alpha_in=lambda r: np.radians([90])[0],
                                                center=True)
        self.turbine_profiler[0].profiling_type = ProfilingType.ConstantAngle
        self.turbine_profiler[0].gamma1_k_rel_rk = lambda r_rel: 0.5
        self.turbine_profiler[1].profiling_type = ProfilingType.ConstantAngle
        self.turbine_profiler[1].auto_sections_par = False
        self.turbine_profiler[1].rk_sections[0].gamma1_s = np.radians([15])[0]
        self.turbine_profiler[1].rk_sections[0].gamma1_k = np.radians([7])[0]
        self.turbine_profiler.compute_stage_profiles()

        stage_prof = self.turbine_profiler[0]
        lam_blade_arr = np.array([17, 19, 22, 24, 27, 29])
        T_wall_arr = np.array([200, 600, 700, 800, 900, 1200]) + 273
        lam_blade_int = interp1d(T_wall_arr, lam_blade_arr, bounds_error=False, fill_value='extrapolate')
        x_hole_rel = [-0.8, -0.5, -0.15, 0.1, 0.35, 0.6]

        self.theta = get_theta(0.5 * stage_prof.D1_in, 0.5 * stage_prof.D1_out, 0.5, 1.12)
        self.T_gas_stag = get_T_gas(self.theta, 650, self.turbine[0].T0_stag)
        self.G_cool0 = 0.018
        self.g_cool0 = get_g_cool(self.theta, 2 * self.G_cool0 / (stage_prof.D1_out - stage_prof.D1_in))

        self.film_blade = FilmBladeCooler(sections=stage_prof.sa_sections,
                                          channel_width=0.001,
                                          wall_thickness=0.001,
                                          D_in=stage_prof.D1_in,
                                          D_out=stage_prof.D1_out,
                                          T_wall_out_av_init=1123,
                                          lam_blade=lambda T: lam_blade_int(T).__float__(),
                                          x_hole_rel=x_hole_rel,
                                          hole_num=[20 for _ in x_hole_rel],
                                          d_hole=[0.5e-3 for _ in x_hole_rel],
                                          phi_hole=[0.9 for _ in x_hole_rel],
                                          mu_hole=[0.86 for _ in x_hole_rel],
                                          T_gas_stag=self.T_gas_stag,
                                          p_gas_stag=stage_prof.p0_stag,
                                          c_p_gas_av=stage_prof.c_p,
                                          lam_gas_in=stage_prof.lam_c0,
                                          lam_gas_out=stage_prof.lam_c1,
                                          work_fluid=type(self.turbine.work_fluid)(),
                                          T_cool0=650,
                                          p_cool_stag0=self.turbine.p_g_stag + 20e3,
                                          g_cool0=self.g_cool0,
                                          cool_fluid=Air())
예제 #11
0
    def setUp(self):
        self.bs = BladeSection(angle1=np.radians([90])[0],
                               angle2=np.radians([21])[0],
                               delta1=np.radians([2])[0],
                               delta2=np.radians([2])[0],
                               b_a=0.07,
                               r1=0.01 / 2,
                               convex='left',
                               pnt_count=30,
                               s2=0.0003)
        self.bs.compute_profile()
        lam_blade_arr = np.array([19, 22, 24, 27])
        T_wall_arr = np.array([600, 700, 800, 900]) + 273
        lam_blade_int = interp1d(T_wall_arr, lam_blade_arr, bounds_error=False, fill_value='extrapolate')
        self.conv_cooler = SectorCooler(section=self.bs,
                                        height=67.6e-3,
                                        T_gas_stag=1223,
                                        G_gas=439,
                                        D_av=0.6476,
                                        wall_thickness=1.8e-3,
                                        T_wall_av=980,
                                        T_cool_fluid0=600,
                                        G_cool=0.144,
                                        lam_blade=lambda T: lam_blade_int(T).__float__(),
                                        cool_fluid=Air(),
                                        work_fluid=KeroseneCombustionProducts(),
                                        node_num=250,
                                        channel_width=0.001
                                        )
        mu_gas, lam_gas, Re_gas, Nu_gas, alpha_gas_av = GasBladeHeatExchange.get_alpha_gas_av(self.conv_cooler.section,
                                                                                              self.conv_cooler.height,
                                                                                              self.conv_cooler.T_gas_stag,
                                                                                              self.conv_cooler.G_gas,
                                                                                              self.conv_cooler.D_av,
                                                                                              self.conv_cooler.work_fluid)
        self.ave_param = DeflectorAverageParamCalculator(self.conv_cooler.section,
                                                         self.conv_cooler.height,
                                                         self.conv_cooler.D_av,
                                                         self.conv_cooler.wall_thickness,
                                                         1023,
                                                         self.conv_cooler.T_cool_fluid0,
                                                         self.conv_cooler.T_gas_stag,
                                                         alpha_gas_av,
                                                         self.conv_cooler.G_cool,
                                                         self.conv_cooler.lam_blade,
                                                         self.conv_cooler.cool_fluid
                                                         )

        self.x_hole1 = [-0.06, -0.04, -0.015, 0, 0.008, 0.015, 0.04]
        self.film1 = FilmCalculator(x_hole=self.x_hole1,
                                    hole_num=[15 for _ in self.x_hole1],
                                    d_hole=[0.001 for _ in self.x_hole1],
                                    phi_hole=[0.9 for _ in self.x_hole1],
                                    mu_hole=[0.85 for _ in self.x_hole1],
                                    T_gas_stag=self.conv_cooler.T_gas_stag,
                                    p_gas_stag=9.5e5,
                                    v_gas=lambda x: 100,
                                    c_p_gas_av=1150,
                                    work_fluid=KeroseneCombustionProducts(),
                                    alpha_gas=lambda x: 4500,
                                    T_cool=lambda x: 650,
                                    G_cool0=0.25,
                                    p_cool_stag0=10e5,
                                    c_p_cool_av=1100,
                                    cool_fluid=Air(),
                                    height=0.03)

        self.x_hole2 = [-0.015, 0.025]
        self.film2 = FilmCalculator(x_hole=self.x_hole2,
                                    hole_num=[15 for _ in self.x_hole2],
                                    d_hole=[0.001 for _ in self.x_hole2],
                                    phi_hole=[0.9 for _ in self.x_hole2],
                                    mu_hole=[0.85 for _ in self.x_hole2],
                                    T_gas_stag=self.conv_cooler.T_gas_stag,
                                    p_gas_stag=9.5e5,
                                    v_gas=lambda x: 100,
                                    c_p_gas_av=1150,
                                    work_fluid=KeroseneCombustionProducts(),
                                    alpha_gas=lambda x: 4500,
                                    T_cool=lambda x: 650,
                                    G_cool0=0.25,
                                    p_cool_stag0=10e5,
                                    c_p_cool_av=1100,
                                    cool_fluid=Air(),
                                    height=0.03)

        self.x_hole_rel = [-0.8, -0.6, -0.2, 0.2, 0.4, 0.7]
        self.film_cooler = FilmSectorCooler(section=self.bs,
                                            height=self.conv_cooler.height,
                                            channel_width=1e-3,
                                            wall_thickness=self.conv_cooler.wall_thickness,
                                            D_av=self.conv_cooler.D_av,
                                            lam_blade=lambda T: lam_blade_int(T).__float__(),
                                            T_wall_av=1000,
                                            x_hole_rel=self.x_hole_rel,
                                            hole_num=[15 for _ in self.x_hole_rel],
                                            d_hole=[1.5e-3 for _ in self.x_hole_rel],
                                            phi_hole=[0.9 for _ in self.x_hole_rel],
                                            mu_hole=[0.85 for _ in self.x_hole_rel],
                                            T_gas_stag=self.conv_cooler.T_gas_stag,
                                            p_gas_stag=9.5e5,
                                            G_gas=self.conv_cooler.G_gas,
                                            c_p_gas_av=1150,
                                            lam_gas_in=0.1,
                                            lam_gas_out=0.2,
                                            work_fluid=KeroseneCombustionProducts(),
                                            T_cool0=self.conv_cooler.T_cool_fluid0,
                                            p_cool_stag0=10e5,
                                            G_cool0=self.conv_cooler.G_cool,
                                            c_p_cool_av=1100,
                                            cool_fluid=Air(),
                                            node_num=250,
                                            g_cool0_s=0.6)
예제 #12
0
파일: test.py 프로젝트: orb1t/turbine
    def setUp(self):
        self.comp_turb_2st = Turbine(TurbineType.WORK,
                                     T_g_stag=1400,
                                     p_g_stag=5.5e5,
                                     G_turbine=25,
                                     G_fuel=1,
                                     work_fluid=KeroseneCombustionProducts(),
                                     alpha_air=2.87,
                                     l1_D1_ratio=0.25,
                                     n=15e3,
                                     T_t_stag_cycle=1200,
                                     stage_number=2,
                                     eta_t_stag_cycle=0.91,
                                     k_n=6.8,
                                     eta_m=0.99,
                                     auto_compute_heat_drop=True,
                                     auto_set_rho=True,
                                     precise_heat_drop=False,
                                     H01_init=150e3,
                                     c21_init=250,
                                     alpha11=np.radians([17])[0],
                                     gamma_av=np.radians([4])[0],
                                     gamma_sum=np.radians([10])[0])
        self.comp_turb_2st.geom[0].g_cool = 0.004
        self.comp_turb_2st.geom[1].g_cool = 0.003
        self.comp_turb_2st.compute_geometry()
        self.comp_turb_2st.compute_stages_gas_dynamics()
        self.comp_turb_2st.compute_integrate_turbine_parameters()

        self.turb_profiler = TurbineProfiler(
            turbine=self.comp_turb_2st,
            p_in_stag=lambda r: self.comp_turb_2st[0].p0_stag,
            T_in_stag=lambda r: self.comp_turb_2st[0].T0_stag,
            c_in=lambda r: 100,
            alpha_in=lambda r: np.radians([90])[0],
            section_num=3,
            center=True
        )
        self.turb_profiler[0].profiling_type = ProfilingType.ConstantAngle
        self.turb_profiler[1].profiling_type = ProfilingType.ConstantAngle
        self.turb_profiler.compute_stage_profiles()

        x_hole_rel = [-0.5, -0.25, 0., 0.2, 0.6]
        G_cool0 = 0.2
        g_cool0 = G_cool0 * 2 / (self.turb_profiler[0].D1_out - self.turb_profiler[0].D1_in)

        self.cooler = get_sa_cooler(
            self.turb_profiler[0],
            channel_width=0.001,
            wall_thickness=0.001,
            T_wall_out_av_init=1000,
            lam_blade=lambda T: 24,
            x_hole_rel=x_hole_rel,
            hole_num=[35 for _ in x_hole_rel],
            d_hole=[0.5e-3 for _ in x_hole_rel],
            phi_hole=[0.98 for _ in x_hole_rel],
            mu_hole=[0.95 for _ in x_hole_rel],
            work_fluid=KeroseneCombustionProducts(),
            T_cool0=650,
            p_cool_stag0=0.99 * self.comp_turb_2st[0].p0_stag,
            g_cool0=lambda r: g_cool0,
            cool_fluid=Air(),
            cover_thickness=0,
        )
예제 #13
0
 def __init__(self,
              T0_stag,
              p0_stag,
              T0_stag_ad_t,
              G_stage_in,
              G_turbine,
              G_fuel,
              work_fluid: IdealGas,
              rho,
              phi,
              psi,
              l1,
              l2,
              D1,
              D2,
              delta_r_rk,
              n,
              epsilon,
              g_lk,
              g_ld,
              g_lb,
              g_cool,
              T_cool=700,
              precision=0.001,
              cool_fluid: IdealGas = Air(),
              **kwargs):
     """
     :param T0_stag:
     :param p0_stag:
     :param T0_stag_ad_t: Температура на входе в ступень при адиабатическом процессе в турбине.
     :param G_stage_in: расход газа на входе в ступень
     :param G_turbine: расход газа через СА первой ступени
     :param G_fuel: расход топлива по тракту до турбины
     :param work_fluid:
     :param rho:
     :param phi:
     :param psi:
     :param l1:
     :param l2:
     :param D1:
     :param D2:
     :param delta_r_rk:
     :param n:
     :param epsilon: Степень парциальности. Необходима для вычисления затрат на трение и вентиляцию
     :param g_lk: относительный расход утечек в концевых лабиринтах
     :param g_ld: относительный расход перетечек в лабиринтных уплотнениях сопловых диафрагм
     :param g_lb: относительный расход перетечек поверх бондажа рабочих лопаток
     :param g_cool: Отношение расхода охлаждающего воздуха к расходу газа через СА первой ступени.
     :param T_cool: температура охлаждающего воздуха.
     :param precision: точность.
     :param cool_fluid: рабочее тело для охлажденияю
     :param kwargs: H0 - теплоперепад на ступени, p2_stag - полное давление на выходе из ступени,
             L_t - работа ступени, eta_t0 - КПД ступени в первом приближении.
     """
     set_logging()
     self.T0_stag = T0_stag
     self.p0_stag = p0_stag
     self.T0_stag_ad_t = T0_stag_ad_t
     self.G_stage_in = G_stage_in
     self.G_turbine = G_turbine
     self.work_fluid = work_fluid
     self.work_fluid_ad = type(work_fluid)()
     self.work_fluid_stag_ad = type(work_fluid)()
     self.G_fuel = G_fuel
     self.phi = phi
     self.psi = psi
     self.l1 = l1
     self.l2 = l2
     self.D1 = D1
     self.D2 = D2
     self.rho = rho
     self.n = n
     self.delta_r_rk = delta_r_rk
     self.epsilon = epsilon
     self.g_lk = g_lk
     self.g_ld = g_ld
     self.g_lb = g_lb
     self.g_cool = g_cool
     self.T_cool = T_cool
     self.precision = precision
     self.cool_fluid = cool_fluid
     (self.stage_type, self.H0, self.p2_stag_pre, self.L_t_pre,
      self._eta_t0) = self._get_turbine_type_specific_params(**kwargs)
     self.k_res = None
     self.L_t_res = None
     self.p2_stag_res = None
예제 #14
0
    def __init__(self,
                 section: BladeSection,
                 height=None,
                 wall_thickness=None,
                 T_cool_fluid0=None,
                 T_wall_av=None,
                 alpha_cool: typing.Callable[[float, float], float] = None,
                 T_out_stag: typing.Callable[[float], float] = None,
                 alpha_out: typing.Callable[[float], float] = None,
                 G_cool: typing.Callable[[float], float] = None,
                 lam_blade: typing.Callable[[float], float] = None,
                 cool_fluid: IdealGas = Air(),
                 cover_thickness=0.15e-3,
                 lam_cover=2,
                 node_num: int = 500):
        """
        :param section: BladeSection. \n
            Сечение рассчитываемого участка лопатки.
        :param height: float. \n
            Высота рассчитываемого участка лопакти.
        :param wall_thickness: float. \n
            Толщина стенки.
        :param T_cool_fluid0: float. \n
            Температура охраждающего тела на входе в лопатку.
        :param T_wall_av: float. \n
            Средняя температура стенки лопатки.
        :param alpha_cool: callable. \n
            Зависимость коэффициента теплоотдачи от охлаждающего тела к стенке лопатки от координаты вдоль
            обвода профиля и температуры охлаждающего тела.
        :param T_out_stag: callable. \n
            Распределение температуры обтекающей лопатку среды вдоль обвода профиля.
        :param alpha_out: callable. \n
            Распределение коэффициента теплоотдачи от обтекающей лопатку среды к лопатке вдоль обвода профиля.
        :param G_cool: callable. \n
            Распределение расхода охлаждающего тела к лопатке вдоль обвода профиля.
        :param lam_blade: callable. \n
            Тепопроводность материала лопатки в зависимости от температуры.
        :param cool_fluid: IdealGas. \n
            Охлаждающее тело.
        :param cover_thickness: float, optional. \n
            Толщина защитного покрытия.
        :param lam_cover: float, optional. \n
            Теплопроводность защитного покрытия.
        :param node_num: int, optional. \n
            Число узлов на интервале решения уравнения теплового баланса.
        """
        self.section = section
        self.height = height
        self.wall_thickness = wall_thickness
        self.T_cool_fluid0 = T_cool_fluid0
        self.alpha_cool = alpha_cool
        self.T_wall_av = T_wall_av
        self.T_out_stag = T_out_stag
        self.alpha_out = alpha_out
        self.G_cool = G_cool
        self.lam_blade = lam_blade
        self.cool_fluid = cool_fluid
        self.node_num = node_num
        self.cover_thickness = cover_thickness
        self.lam_cover = lam_cover

        self.T_cool_fluid_s_arr = None
        self.T_cool_fluid_k_arr = None
        self.T_cool_fluid_arr = None
        self._T_cool_int = None
        self._T_wall_int = None
        self.alpha_cool_fluid_arr = None
        self.alpha_cool_fluid_k_arr = None
        self.alpha_out_arr = None
        self.alpha_gas_k_arr = None
        self.T_wall_arr = None
        self.x_s_arr = None
        self.x_k_arr = None
        self.x_arr = None
        self.M_s, self.N_s = None, None
        self.M_k, self.N_k = None, None
        self.T_wall_s_arr = None
        self.T_wall_k_arr = None
예제 #15
0
    def __init__(
            self,
            x_hole: typing.List[float] = None,
            hole_num: typing.List[float] = None,
            d_hole: typing.List[float] = None,
            phi_hole: typing.List[float] = None,
            mu_hole: typing.List[float] = None,
            T_gas_stag=None,
            p_gas_stag=None,
            v_gas: typing.Callable[[float], float] = None,
            c_p_gas_av=None,
            work_fluid: IdealGas = KeroseneCombustionProducts(),
            alpha_gas: typing.Callable[[float], float] = None,
            T_cool: typing.Callable[[float], float] = None,
            G_cool0=None,
            p_cool_stag0=None,
            c_p_cool_av=None,
            cool_fluid: IdealGas = Air(),
            height=None,
            g_cool0_s=0.5,
    ):
        """
        :param x_hole: Координаты рядов отверстий.
        :param hole_num:  Число отверстий в рядах.
        :param d_hole: Диаметры отверстий в рядах.
        :param phi_hole: Коэффициенты скорости в рядах отверстий.
        :param mu_hole: Коэффициенты расхода в рядах отверстий.
        :param T_gas_stag: Температура торможения газа.
        :param p_gas_stag: Давление тороможения газа.
        :param v_gas: Распределение скорости газа по профилю.
        :param c_p_gas_av: Средняя теплоемкость газа
        :param work_fluid: Рабочее тело турбины.
        :param alpha_gas: Распределение коэффициента теплоотдачи со стророны газа.
        :param T_cool: Распределение температуры торможения охлаждающего воздуха вдоль профиля.
        :param G_cool0: Расход охлаждающего воздуха на входе в канал.
        :param p_cool_stag0: Полное давление охлаждающего воздуха на входе в канал.
        :param c_p_cool_av: Средняя теплоемкость охлаждающего воздуха.
        :param cool_fluid: Охлаждающее тело.
        :param height: Высота участка лопатки
        :param g_cool0_s: Относительный расход охлаждающего воздуха на входе в канал спинки.
        """
        self.x_hole = np.array(x_hole)
        self.hole_num = np.array(hole_num)
        self.d_hole = np.array(d_hole)
        self.phi_hole = np.array(phi_hole)
        self.mu_hole = np.array(mu_hole)

        self._modify_hole_data()

        self.T_gas_stag = T_gas_stag
        self.p_gas_stag = p_gas_stag
        self.v_gas = v_gas
        self.c_p_gas_av = c_p_gas_av
        self.work_fluid = work_fluid
        self.alpha_gas = alpha_gas
        self.T_cool = T_cool
        self.p_cool_stag0 = p_cool_stag0
        self.G_cool0 = G_cool0
        self.c_p_cool_av = c_p_cool_av
        self.cool_fluid = cool_fluid
        self.height = height
        self.g_coo0_s = g_cool0_s

        self.k_gas_av = self.work_fluid.k_func(self.c_p_gas_av)
        self.k_cool_av = self.cool_fluid.k_func(self.c_p_cool_av)

        self.hole_step = np.zeros(self.x_hole.shape[0])
        self.s = np.zeros(self.x_hole.shape[0])
        self.T_cool_hole = np.zeros(self.x_hole.shape[0])
        "Температура торможения охлаждающей среды у входа в отверстия"
        self.v_gas_hole = np.zeros(self.x_hole.shape[0])
        "Скорость газа у отверстий"
        self.T_gas_hole = np.zeros(self.x_hole.shape[0])
        "Статическая температура газа у отверстий"
        self.p_gas_hole = np.zeros(self.x_hole.shape[0])
        "Статическое давление газа у отверстий"
        self.rho_gas_hole = np.zeros(self.x_hole.shape[0])
        "Статичекая плотность газа у отверстий"
        self.v_cool_hole_out = np.zeros(self.x_hole.shape[0])
        "Скорость истечения охлаждающей среды из отвестий"
        self.rho_cool_stag_hole = np.zeros(self.x_hole.shape[0])
        "Плотность охлаждающей среды по параметрам торможения на входе в отверстия"
        self.rho_cool_hole_out = np.zeros(self.x_hole.shape[0])
        "Статическая плотность охлаждающей среды на выходе из отверстия"
        self.m = np.zeros(self.x_hole.shape[0])
        "Параметры вдува на отверстиях"
        self.Re_s = np.zeros(self.x_hole.shape[0])
        "Число Рейнольдса по ширине щели на отверстиях"
        self.phi_temp = np.zeros(self.x_hole.shape[0])
        "Температурный фактор на отверстиях"
        self.G_cool_hole = np.zeros(self.x_hole.shape[0])
        "Расход охлаждающей среды в сечении канала перед отверстиями"
        self.dG_cool_hole = np.zeros(self.x_hole.shape[0])
        "Расход охлаждающей среды перед отверстиями"
        self.film_eff_list = []
        "Список функций эффективности пленок от каждого ряда отверстий"
예제 #16
0
    def __init__(self,
                 section: BladeSection,
                 height=None,
                 D_av=None,
                 wall_thickness=None,
                 T_wall_out=None,
                 T_cool_fluid0=None,
                 T_out_stag=None,
                 alpha_out=None,
                 G_cool=None,
                 lam_blade: typing.Callable[[float], float] = None,
                 cool_fluid: IdealGas = Air(),
                 cover_thickness=0.15e-3,
                 lam_cover=2):
        """
        :param section: BladeSection. \n
            Сечение рассчитываемого участка лопатки.
        :param height: float. \n
            Высота рассчитываемого участка лопакти.
        :param D_av: float. \n
            Средний диаметр участка.
        :param wall_thickness: float. \n
            Толщина стенки.
        :param T_wall_out: float. \n
            Средняя температура наружной поверхности стенки участка лопатки.
        :param T_cool_fluid0: float. \n
            Температура охраждающего тела на входе в лопатку.
        :param T_out_stag: float. \n
            Средняя температура торможения обтекающей лопатку среды.
        :param alpha_out: float. \n
            Средний коэффициент теплоотдачи от обтекающей лопакту среды к лопатке.
        :param G_cool: float. \n
            Расход охлаждающего тела.
        :param lam_blade: callable. \n
            Тепопроводность материала лопатки в зависимости от температуры
        :param cool_fluid: IdealGas. \n
            Охлаждающее тело.
        :param cover_thickness: float, optional. \n
            Толщина защитного покрытия.
        :param lam_cover: float, optional. \n
            Теплопроводность защитного покрытия.
        """
        self.section = section
        self.height = height
        self.D_av = D_av
        self.wall_thickness = wall_thickness
        self.T_wall_out = T_wall_out
        self.T_cool_fluid0 = T_cool_fluid0
        self.T_out_stag = T_out_stag
        self.alpha_out = alpha_out
        self.G_cool = G_cool
        self.lam_blade = lam_blade
        self.cool_fluid = cool_fluid
        self.cover_thickness = cover_thickness
        self.lam_cover = lam_cover

        self.perimeter = None
        self.square = None
        self.Q_blade = None
        self.T_wall_av = None
        self.T_wall_in = None
        self.delta_T = None
        self.T_cool_fluid_av = None
        self.T_cool_fluid_old = None
        self.cool_fluid_temp_res = None
        self.heat_transfer_coef = None
        self.c_p_cool_av = None
        self.mu_cool_fluid = None
        self.Re_cool_fluid = None
        self.alpha_cool_fluid_av = None
        self.lam_cool_fluid = None
        self.epsilon = None
        self.D = None
        self.channel_width = None
예제 #17
0
 def setUp(self):
     self.comb_chamber = CombustionChamberModel(
         g_fuel=0.02,
         G_c1_in=30,
         T_stag_in=800,
         p_stag_in=13e5,
         G_in=29,
         G_fuel_in=0,
         eta_comb=0.99,
         sigma_comb=0.99,
     )
     self.turbine = Turbine(turbine_type=TurbineType.WORK,
                            stage_number=2,
                            T_g_stag=1400,
                            p_g_stag=15e5,
                            G_turbine=34,
                            G_fuel=0.9,
                            work_fluid=NaturalGasCombustionProducts(),
                            l1_D1_ratio=0.15,
                            n=10e3,
                            T_t_stag_cycle=1150,
                            eta_t_stag_cycle=0.9,
                            alpha11=np.radians(14),
                            precision=0.0001,
                            gamma_in=np.radians(0),
                            gamma_out=np.radians(10),
                            H01_init=200e3,
                            c21_init=250)
     self.turbine.compute_geometry()
     self.turbine.compute_stages_gas_dynamics()
     self.turbine.compute_integrate_turbine_parameters()
     self.turb_model = OutletTurbineModel(
         T_stag_in=self.turbine.T_g_stag,
         p_stag_in=self.turbine.p_g_stag,
         G_in=self.turbine.G_turbine,
         G_fuel_in=self.turbine.G_fuel,
         pi_t_stag=self.turbine.pi_t_stag,
         T_stag_in_nom=self.turbine.T_g_stag,
         p_stag_in_nom=self.turbine.p_g_stag,
         G_in_nom=self.turbine.G_turbine,
         pi_t_stag_nom=self.turbine.pi_t_stag,
         eta_t_stag_nom=self.turbine.eta_t_stag,
         F_out=self.turbine.geom.last.A2,
         eta_m=self.turbine.eta_m,
         precision=self.turbine.precision)
     comp_stage_num = 10
     H_t_rel_dist = QuadraticBezier(0.3,
                                    0.25,
                                    stage_num=comp_stage_num,
                                    angle1=np.radians(10),
                                    angle2=np.radians(10))
     eta_rel_dist = QuadraticBezier(0.84,
                                    0.84,
                                    stage_num=comp_stage_num,
                                    angle1=np.radians(3),
                                    angle2=np.radians(3))
     c1_a_rel_dist = QuadraticBezier(0.4,
                                     0.4,
                                     stage_num=comp_stage_num,
                                     angle1=np.radians(10),
                                     angle2=np.radians(10))
     self.comp = Compressor(
         work_fluid=Air(),
         stage_num=comp_stage_num,
         const_diam_par_arr=[0.5 for _ in range(comp_stage_num)],
         p0_stag=1e5,
         T0_stag=288,
         G=28,
         n=9e3,
         H_t_rel_arr=H_t_rel_dist.get_array(),
         eta_ad_stag_arr=eta_rel_dist.get_array(),
         R_av_arr=[0.5 for _ in range(comp_stage_num)],
         k_h_arr=[1.0 for _ in range(comp_stage_num)],
         c1_a_rel_arr=c1_a_rel_dist.get_array(),
         h_rk_rel_arr=[3.5 for _ in range(comp_stage_num)],
         h_na_rel_arr=[3.5 for _ in range(comp_stage_num)],
         delta_a_rk_rel_arr=[0.4 for _ in range(comp_stage_num)],
         delta_a_na_rel_arr=[0.4 for _ in range(comp_stage_num)],
         d1_in_rel1=0.5,
         zeta_inlet=0.04,
         zeta_outlet=0.03,
         c11_init=200,
         precision=0.0001)
     self.comp.compute()
     self.comp_model = CompressorModel(characteristics=From16To18Pi(),
                                       T_stag_in=self.comp.T0_stag,
                                       p_stag_in=self.comp.p0_stag,
                                       pi_c_stag_rel=1,
                                       n_norm_rel=1,
                                       T_stag_in_nom=self.comp.T0_stag,
                                       p_stag_in_nom=self.comp.p0_stag,
                                       G_in_nom=self.comp.G,
                                       eta_c_stag_nom=self.comp.eta_c_stag,
                                       n_nom=self.comp.n,
                                       pi_c_stag_nom=self.comp.pi_c_stag,
                                       precision=0.0001)
     self.T_stag_in_outlet = np.linspace(300, 1000, 5)
     self.G_in_outlet = np.linspace(2, 40, 5)
     self.dif_outlet = np.linspace(1.1, 10.5, 5)