예제 #1
0
    def test_6_88(self):
    # Letra A
        Pa = 60E5
        Ta = 650
        benz = thermo.Chemical('benzene')
        cyclo = thermo.Chemical('cyclohexane')
        bc = thermo.Mixture(['benzene','cyclohexane'],zs = [0.5,0.5],T=Ta,P=Pa)
        Za = z_find.Lee_Kesler(bc.Tc,bc.Pc,bc.omega,Ta,Pa)
        eosamix = thermo.eos_mix.SRKMIX([benz.Tc,cyclo.Tc],[benz.Pc,cyclo.Pc],[benz.omega,cyclo.omega],[0.5,0.5],[[0,0],[0,0]],Ta,Pa)
    #    Z = thermo.utils.Z(Ta,Pa,eosamix.V_g)
    #    ZRK,eosa = z_find.SRK(bc.Tc,bc.Pc,bc.omega,Ta,Pa)
        #eos_PR = thermo.eos.PR(bc.Tc,bc.Pc,bc.omega,T,P)

    # Letra B
        Pb = 100E5
        Tb = 300
        #cd = thermo.Chemical('carbon dioxide')
        #cm = thermo.Chemical('carbon monoxide')
        cmd = thermo.Mixture(['carbon dioxide','carbon monoxide'],zs=[0.5,0.5],T=Tb,P=Pb)
        Zb = z_find.Lee_Kesler(cmd.Tc,cmd.Pc,cmd.omega,Tb,Pb)

    # Letra C
        Pc = 100E5
        Tc = 600
        cdo = thermo.Mixture(['carbon dioxide','n-octane'],zs=[0.5,0.5],T=Tc,P=Pc)
        Zc = z_find.Lee_Kesler(cdo.Tc,cdo.Pc,cdo.omega,Tc,Pc)
        self.assertEqual([Za,Zb,Zc],[0.68,0.794,0.813],'ValueError:Failed') # values are different, based on what I saw,
예제 #2
0
    def __init__(self, coolant, coolant_massfraction, coolant_massflow,
                 total_massflow, fuel, oxidiser, mixture_ratio,
                 chamber_pressure, coolant_temperature, coolant_pressure,
                 geometry, wall_thickness, thermal_conductivity):
        """[summary]
		Coolant flow properties stored as total conditions
		Hot gas properties from CEA, currently assumes constant gas properties in chamber 
		USE SI UNITS
		"""
        self.chamber_pressure = chamber_pressure
        self.mixture_ratio = mixture_ratio
        self.massflow = total_massflow
        self.coolant_massflow = coolant_massflow
        self.coolant = thermo.Mixture(coolant,
                                      ws=coolant_massfraction,
                                      T=coolant_temperature,
                                      P=coolant_pressure)
        self.chamber_diameter = 2 * geometry[0, 1]
        self.throat_diameter = 2 * min(geometry[:, 1])
        self.expansion_ratio = np.pi * geometry[-1][1]**2 / (
            np.pi * self.throat_diameter**2 / 4)
        self.wall_thickness = wall_thickness
        self.thermal_conductivity = thermal_conductivity

        # get hot gas properties from CEA, use 'throat' as this is the most critical area
        self.cea = CEA(fuel, oxidiser, self.chamber_pressure)
        self.cea.metric_cea_output('chamber', self.mixture_ratio,
                                   self.expansion_ratio)
예제 #3
0
    def __init__(self,
                 thermal_conductivity,
                 max_wall_thickness,
                 fluid_temperature,
                 fluid_pressure,
                 fluid_massflow,
                 fluid,
                 fluid_mixture,
                 hydrolic_diameter,
                 massflow,
                 chamber_pressure,
                 velocity,
                 gas_temperature=0):
        """
		Estimates wall temperature at injection element. Using convective and radiative heat transfer 
		"""
        self.thermal_conductivity = thermal_conductivity
        self.max_wall_thickness = max_wall_thickness
        self.fluid = thermo.Mixture(fluid,
                                    ws=fluid_mixture,
                                    T=fluid_temperature,
                                    P=fluid_pressure)
        self.flow_velocity = velocity
        self.chamber_diameter = std.chamber_diameter
        self.throat_diameter = std.throat_diameter
        self.chamber_pressure = chamber_pressure
        self.massflow = massflow
        self.hydrolic_diameter = hydrolic_diameter
        self.fluid_massflow = fluid_massflow
        self.gas_temperature = gas_temperature

        self.cea = std.cea
예제 #4
0
 def __init__(self, fluid, mixture, temperature, pressure, length, massflow,
              pressuredrop, inletangle):
     self.fluid = thermo.Mixture(fluid,
                                 ws=mixture,
                                 T=temperature,
                                 P=pressure)
     self.length = length
     self.massflow = massflow
     self.pressuredrop = pressuredrop
     self.inletangle = inletangle
예제 #5
0
 def __init__(self, fluid, mixture, temperature, pressure, length,
              pressuredrop, massflow, r_i):
     self.fluid = thermo.Mixture(fluid,
                                 ws=mixture,
                                 T=temperature,
                                 P=pressure)
     self.length = length
     self.pressuredrop = pressuredrop
     self.r_i = r_i
     self.massflow = massflow
예제 #6
0
    def iterator(self,
                 y_coordinate,
                 x_coordinate,
                 section_length,
                 section_number,
                 initial_guess,
                 mach,
                 t_aw,
                 eta=1,
                 max_iter=1000,
                 tol=1e-6):
        wall_temperature = 300
        coolant_wall_temperature = 300
        wall_thickness = self.cooling_geometry.wt1_arr[section_number]
        iteration = 0
        difference = 1

        while difference > tol:
            halpha = self.heat_trans_coeff_gas(
                mach, wall_temperature, t_aw,
                y_coordinate) * eta  # film cooling correction
            halpha_c, Re, Nu, flowvelocity = self.heat_trans_coeff_coolant(
                wall_temperature, coolant_wall_temperature, x_coordinate,
                y_coordinate, section_length, section_number)
            radiation = self.radiation(y_coordinate, mach)

            heat_flux = (t_aw - self.coolant.T + radiation / halpha) / (
                1 / halpha + wall_thickness / self.thermal_conductivity +
                1 / halpha_c)
            new_wall_temp = -((heat_flux - radiation) / halpha - t_aw)

            difference = abs(new_wall_temp - wall_temperature)

            iteration += 1
            if iteration > max_iter:
                raise ValueError('Non-convergence, iteration number exceeded ',
                                 max_iter)

            wall_temperature = new_wall_temp
            coolant_wall_temperature = -heat_flux * wall_thickness / self.thermal_conductivity + new_wall_temp

        T_new = self.coolant.T + heat_flux * 2 * np.pi * y_coordinate * section_length / (
            self.coolant_massflow * self.coolant.Cp)
        dp = self.pressure_drop(6e-6, section_length, section_number,
                                y_coordinate)
        self.coolant = thermo.Mixture(self.coolant_species,
                                      ws=self.coolant_massfraction,
                                      T=T_new,
                                      P=self.coolant.P - dp)
        print(section_number)
        print(self.coolant.T)

        return heat_flux, wall_temperature, Re, Nu, flowvelocity, radiation, halpha, halpha_c
예제 #7
0
 def test_6_86(self):
     P = 5500E3
     T = 363.15
     mponto = 1.4 #kg/s
     Vmax = 30 #m/s
     ymet = 0.5
     yprop = 1 - ymet
     pm = thermo.Mixture(['methane','propane'],zs = [ymet,yprop],T=T,P=P)
     Z = z_find.Lee_Kesler(pm.Tc,pm.Pc,pm.omega,T,P)
     v = Z*R*T/(P*pm.MW*10**(-3))
     A = mponto*v/Vmax
     d = math.sqrt(A*4/math.pi)
     self.assertAlmostEqual(d,0.0297,3,'ValueError:Failed') #D = 0.002964
예제 #8
0
	def heat_trans_coeff_coolant(self, hydrolic_diameter, wall_temperature):
		coolant_area = hydrolic_diameter**2/4 * np.pi * self.number_of_channels 
		flowvelocity = self.coolant_massflow/(self.coolant.rho * coolant_area)
		Pr = self.coolant.Pr
		Re = self.coolant.rho*flowvelocity*hydrolic_diameter/self.coolant.mu
		k = self.coolant.Cp*self.coolant.mu/Pr
		
		#Nu = 0.023*Re**0.8*Pr**0.4
		wall_fluid = thermo.Mixture(self.coolant_species, ws=self.coolant_massfraction, P=self.coolant.P, T=wall_temperature)
		Nu = 0.0208*Re**0.8*Pr**0.4*(1+0.01457*wall_fluid.mu/self.coolant.mu)  #Hess & Kunz relationship
		halpha = Nu*k/hydrolic_diameter

		return halpha, Re, Nu
예제 #9
0
    def __init__(self,
                 coolant,
                 coolant_massfraction,
                 coolant_massflow,
                 total_massflow,
                 fuel,
                 oxidiser,
                 mixture_ratio,
                 chamber_pressure,
                 coolant_temperature,
                 coolant_pressure,
                 geometry,
                 number_of_channels,
                 thermal_conductivity,
                 method,
                 k_tbc=0,
                 t_tbc=0):
        """[summary]
		Coolant flow properties stored as total conditions
		Hot gas properties from CEA, currently assumes constant gas properties in chamber 
		USE SI UNITS
		"""
        self.geometry = geometry
        self.chamber_pressure = chamber_pressure
        self.mixture_ratio = mixture_ratio
        self.massflow = total_massflow
        self.coolant_massflow = coolant_massflow
        self.coolant = thermo.Mixture(coolant,
                                      ws=coolant_massfraction,
                                      T=coolant_temperature,
                                      P=coolant_pressure)
        self.chamber_diameter = 2 * geometry[0, 1]
        self.throat_diameter = 2 * min(geometry[:, 1])
        self.expansion_ratio = np.pi * geometry[-1][1]**2 / (
            np.pi * self.throat_diameter**2 / 4)
        self.thermal_conductivity = thermal_conductivity
        self.coolant_species = coolant
        self.coolant_massfraction = coolant_massfraction
        self.number_of_channels = number_of_channels
        self.k_tbc = k_tbc
        self.t_tbc = t_tbc
        self.method = method

        # get hot gas properties from CEA
        self.cea = CEA(fuel, oxidiser, self.chamber_pressure)
        self.cea.metric_cea_output('throat', self.mixture_ratio,
                                   self.expansion_ratio)
예제 #10
0
    def __init__(self, fluid, mixture, temperature, pressure, length,
                 annulusdiameter, massflow, pressuredrop):
        """UNVARIFIED model of annular injectors. Uses numerical solution to Darcey Weisbach eqaution to determine discharge coefficent with cryo test data 

        :param fluid: fluid flowing through annulus
        :type fluid: string
        :param length: length of annulus flow passage (coaxial distance)
        :param annulusdiameter: mean diameter of annulus
        :param pressuredrop: design pressure drop over injector 
        """
        self.fluid = thermo.Mixture(fluid,
                                    ws=mixture,
                                    T=temperature,
                                    P=pressure)
        self.annulusdiameter = annulusdiameter
        self.length = length
        self.massflow = massflow
        self.pressuredrop = pressuredrop
예제 #11
0
    def heat_trans_coeff_coolant(self, hydraulic_diameter, wall_temperature,
                                 coolant_wall_temperature, x_coordinate,
                                 y_coordinate, section_length):
        coolant_area = hydraulic_diameter**2 / 4 * np.pi * self.number_of_channels  #hydraulic_diameter / 2 * y_coordinate * 2 * np.pi
        flowvelocity = self.coolant_massflow / (self.coolant.rho *
                                                coolant_area)
        Pr = self.coolant.Pr
        Re = self.coolant.rho * flowvelocity * hydraulic_diameter / self.coolant.mu
        k = self.coolant.Cp * self.coolant.mu / Pr

        wall_fluid = thermo.Mixture(self.coolant_species,
                                    ws=self.coolant_massfraction,
                                    P=self.coolant.P,
                                    T=coolant_wall_temperature)

        #Nu = 0.023*Re**0.8*Pr**0.4#*(self.coolant.T/coolant_wall_temperature) ** (0.57 - 1.59*hydraulic_diameter/x_coordinate)
        Nu = 0.0208 * Re**0.8 * Pr**0.4 * (
            1 + 0.01457 * wall_fluid.mu / self.coolant.mu
        )  #Hess & Kunz relationship
        '''
		def curvature_correction():
			idx = np.where(self.geometry[:,0] == x_coordinate)[0][0]
			if idx == 0 or idx == len(self.geometry[:,1])-1:
				return 1, 0

			dydx = (self.geometry[idx+1,1] - self.geometry[idx-1,1]) / (2*section_length)
			d2ydx2 = (self.geometry[idx+1,1] - 2*self.geometry[idx,1] + self.geometry[idx-1,1]) / section_length**2
			Rc = (1 + dydx**2)**(3/2) / (abs(d2ydx2))	
			if Rc > 100:
				return 1, 0
				
			if d2ydx2 > 0:
				c = 0.05
			else:
				c = -0.05
			return Rc,c

		Rc, c = curvature_correction()
		eta = (Re*(hydraulic_diameter / (2*Rc))**2)**c
		'''
        eta = 1
        halpha = Nu * eta * k / hydraulic_diameter

        return halpha, Re, Nu, flowvelocity
예제 #12
0
    def __init__(self):
        #def __init__(self, massflow, V_channel,V_chamber, x_loc_ind, inlet_angle,R,P_channel,T_channel,P_chamber,fluid,mixture,wt_channel):
        """
        self.fluid = thermo.Mixture(fluid, ws=mixture,  T=T_channel[x_loc_ind], P=P_channel[x_loc_ind])
        self.wt = wt_channel[x_loc_ind]
        self.massflow = massflow
        self.pressuredrop = (P_channel[x_loc_ind] - 1/2*self.fluid.rho*V_channel[x_loc_ind]**2)-P_chamber
        self.inletangle = inlet_angle
        self.V_chamber = V_chamber[x_loc_ind]
        self.R = R[x_loc_ind]
        """
        self.fluid = thermo.Mixture(['c2h5oh', 'h2o'], [0.9, 0.1],
                                    T=350,
                                    P=65e5)
        self.wt = 0.6e-3
        self.massflow = 0.2
        self.pressuredrop = 15e5
        self.inletangle = 30 / 180 * np.pi
        self.V_chamber = 200

        self.R = 25e-3
예제 #13
0
	def __init__(self, coolant, coolant_massfraction, coolant_massflow, total_massflow, cea, chamber_pressure, coolant_temperature, coolant_pressure, geometry, number_of_channels, thermal_conductivity, k_tbc=0, t_tbc=0):
		"""[summary]
		Coolant flow properties stored as total conditions
		Hot gas properties from CEA, currently assumes constant gas properties in chamber 
		"""
		self.chamber_pressure = chamber_pressure
		self.massflow = total_massflow
		self.coolant_massflow = coolant_massflow
		self.coolant = thermo.Mixture(coolant, ws = coolant_massfraction, T=coolant_temperature, P=coolant_pressure)
		self.chamber_diameter = 2*geometry[0,1]
		self.throat_diameter = 2*min(geometry[:,1])
		self.expansion_ratio = np.pi*geometry[-1][1]**2/(np.pi*self.throat_diameter**2/4)
		self.thermal_conductivity = thermal_conductivity
		self.coolant_species = coolant
		self.coolant_massfraction = coolant_massfraction
		self.number_of_channels = number_of_channels
		self.k_tbc = k_tbc
		self.t_tbc = t_tbc

		# get hot gas properties from CEA
		self.cea = cea
예제 #14
0
    def heat_trans_coeff_coolant(self, wall_temperature,
                                 coolant_wall_temperature, x_coordinate,
                                 y_coordinate, section_length, section_number):
        d_h = self.cooling_geometry.dhi_arr[section_number]
        A = self.cooling_geometry.Ai_arr[section_number]
        flowvelocity = self.coolant_massflow / (self.coolant.rho * A * 2 *
                                                self.cooling_geometry.N)

        if self.coolant.phase == 'l':
            Pr = self.coolant.Prl
            Cp = self.coolant.Cpl
            mu = self.coolant.mul

        if self.coolant.phase == 'g':
            Pr = self.coolant.Prg
            Cp = self.coolant.Cpg
            mu = self.coolant.mug

        Pr = 0.75 + 1.63 / np.log(1 + Pr / 0.0015)  # turbulent Pr correction

        Re = self.coolant.rho * flowvelocity * d_h / mu
        k = Cp * mu / Pr

        wall_fluid = thermo.Mixture(self.coolant_species,
                                    ws=self.coolant_massfraction,
                                    P=self.coolant.P,
                                    T=coolant_wall_temperature)
        Nu = 0.0208 * Re**0.8 * Pr**0.4 * (1 + 0.01457 * wall_fluid.mug / mu
                                           )  #Hess & Kunz relationship
        halpha = Nu * k / d_h

        #halpha = 0.023*self.coolant.Cp**0.333*k**0.667 / (self.coolant.mu**0.467*d_h**0.2) * (self.coolant_massflow/(np.pi/4 * d_h**2))**0.8  # McAdams
        #halpha = 0.023*k/d_h * (self.coolant.Cp / (k*self.coolant.mu))**0.4 * (self.coolant_massflow*d_h/A)**0.8
        #Nu = halpha / k * d_h

        return halpha, Re, Nu, flowvelocity
예제 #15
0
    an_inj = AnnulusInjector(['c2h5oh', 'h2o'], [0.9, 0.1], 410, 62.5e5, 2e-3,
                             30e-3, 2.227, 13.3e5)
    an_inj.injector()
    print(an_inj.mu)
    print(an_inj.diameter * 1000)
    print(an_inj.velocity)

    an_orifice = AnnularOrifice(['c2h5oh', 'h2o'], [0.9, 0.1], 410, 62.5e5,
                                2e-3, 13.3e5, 2.227, 30e-3 / 2)
    an_orifice.injector()
    print(an_orifice.mu)
    print(an_orifice.diameter * 1000)
    print(an_orifice.velocity)

    #print((liq_inj.velocity*liq_inj.massflow*n_holes)/(an_inj.velocity*an_inj.massflow))

    mass_fraction = [0.9, 0.1]
    mole_fraction = [46 / 64, 18 / 64]
    n_holes = np.arange(20, 100, 1)
    massflow = 3.5858

    print(thermo.Mixture(['c2h5oh', 'h2o'], [0.8, 0.2], T=288.15, P=1e5).rho)
    print(thermo.Mixture(['c2h5oh', 'h2o'], [0.8, 0.2], T=288.15, P=70e5).rho)

    print(thermo.Chemical('o2', T=90, P=1e5).rho)

    #ohnesorge_number(liq_inj, n_holes, massflow, mass_fraction, mole_fraction)

    #annulus_verification(24.2e-3/2, 25.32e-3/2, 'h2o', np.arange(1e5, 15e5, 0.1e5), 288, 0.61)
예제 #16
0
# CEA input values 
OF = 1.49	
oxidiser = 'LOX'
ethanol80 = rocketcea.blends.newFuelBlend(fuelL=['C2H5OH', 'H2O'], fuelPcentL=[80,20])  # new fuel blend for CEA
cea = ht.CEA(ethanol80, oxidiser, chamber_pressure)
cea.metric_cea_output('throat', OF, expansion_ratio)

# Thermo input values 
total_massflow = 5.8 						# [kg/s]
fuel_massflow = total_massflow / (1+OF)
mu = 0.15
film_massflow = fuel_massflow * mu / (1-mu)
coolant_velocity = 10
film_start_idx = 46
film_coolant = thermo.Mixture(['c2h5oh','h2o'], ws=[0.8,0.2], P=60e5, T=288)


ox_massflow = total_massflow - fuel_massflow
fuel_massflow += film_massflow
fuel_composition = ['c2h5oh']
fuel_mass_fraction = [1]


# Film cooling BETA
heat = ht.Heattransfer(fuel_composition, fuel_mass_fraction, fuel_massflow, total_massflow, ethanol80, oxidiser, OF, chamber_pressure, fuel_temperature, fuel_inlet_pressure, geometry, cooling_channels, thermal_conductivity, method)
heat.heatflux(geometry, eta_film=1, x_film_injection=0)

film = fm.FilmCooling(film_coolant, cea, total_massflow, chamber_pressure, coolant_velocity)
film.film_effectiveness(film_start_idx, heat.section_length[::-1], heat.mach[::-1], heat.q[::-1], heat.q_rad[::-1], film_massflow, geometry[:,1])
heat = ht.Heattransfer(fuel_composition, fuel_mass_fraction, fuel_massflow, total_massflow, ethanol80, oxidiser, OF, chamber_pressure, fuel_temperature, fuel_inlet_pressure, geometry, cooling_channels, thermal_conductivity, method)
예제 #17
0
flowrateCoolant5 = 40 #GPM
tempAir5 = 30 # Celsius

#constants

tempCoolant = 95 # Celsius

finHeight= 10.0/1000
finSpacing = 1.7/1000  #ref 1.59

tubeWall = .5/1000
tubeHeight = 2.0/1000 #outer dimension
##fluid constants
##coolant mixture calcs using thermo module
percentGlycol = .5
Coolant = thermo.Mixture(['water', 'glycol'], Vfls=[1-percentGlycol, percentGlycol], T= 273+tempCoolant, P=2E5)
k_Coolant = Coolant.k # W/(m K), thermal conductivity
C_Coolant = Coolant.Cp # J/(kg K), Specific Heat
rho_Coolant = Coolant.rho # kg/m3, Density
mu_Coolant = Coolant.mu # Pa s, Dynamic Viscosity

k_Air = 0.02664 # W/(m K), thermal conductivity
C_Air = 1004.16 # J/(kg K), Specific Heat
rho_Air = 1.13731 # kg/m3, Density
mu_Air = 0.00001912 # Pa s, Dynamic Viscosity


def radCalc(coreHeight, coreWidth, coreThickness, fanFlow, flowrateCoolant, tempAir):

    ## operating conditions
    fanFlow = fanFlow / 60. / 35.3 #convert to m3/s
예제 #18
0
def get_Tout(T, flow, rho):
    coreHeight = x * 25.4/1000 #all dims in meters
    coreWidth = y * 25.4/1000 #coolant tank to tank
    coreThickness = z * 25.4/1000

    wallThickness = 0.5/1000

    finHeightAir= 6.0/1000
    finSpacingAir = 25.4/12.5/1000  #ref frozen spec

    finHeightCoolant= 2.0/1000
    finSpacingCoolant = 25.4/8.5/1000  #ref frozen spec

    ## calculate surface areas
    numberofBars = math.floor((coreHeight - wallThickness)/(finHeightAir + wallThickness + finHeightCoolant + wallThickness))
    numberCoolantPass = (coreThickness/finSpacingCoolant + 1) * numberofBars

    numberAirPass = (coreWidth/finSpacingAir + 1) * numberofBars


    areaCoolant = numberCoolantPass * 2 * coreWidth * (finSpacingCoolant + finHeightCoolant)
    areaAir =  numberAirPass * 2 * coreThickness * (finSpacingAir + finHeightAir)

    ##fluid constants
    ##coolant to 50-50 glycol/water

    tempAir = T-273.0 # Celsius
    tempCoolant = var.coolantTemp # Celsius

    percentGlycol = .5
    Coolant = thermo.Mixture(['water', 'glycol'], Vfls=[1-percentGlycol, percentGlycol], T= 273+tempCoolant, P=2E5)
    k_Coolant = Coolant.k # W/(m K), thermal conductivity
    C_Coolant = Coolant.Cp # J/(kg K), Specific Heat
    rho_Coolant = Coolant.rho # kg/m3, Density
    mu_Coolant = Coolant.mu # Pa s, Dynamic Viscosity

    k_Air = 0.02664 # W/(m K), thermal conductivity
    C_Air = 1004.16 # J/(kg K), Specific Heat
    rho_Air = rho # kg/m3, Density
    mu_Air = 0.00001912 # Pa s, Dynamic Viscosity

    ## operating conditions

    flowrateCoolant = 5 #GPM, volumetric
    flowrateCoolant = flowrateCoolant * 3.8 #LPM

    flowrateCoolant = flowrateCoolant /60.0/1000. # convert to m3/s
    massflowCoolant = flowrateCoolant *rho_Coolant

    massflowAir = flow
    flowrateAir = massflowAir/rho_Air

    ## fluids calcs
    #Coolant
    Dh_Coolant = 4 * (finHeightCoolant * finSpacingCoolant) / (2*(finHeightCoolant + finSpacingCoolant))

    tubeVelocity = flowrateCoolant/numberCoolantPass/(finHeightCoolant*finSpacingCoolant)
    reynoldsCoolant = fluids.core.Reynolds(D=Dh_Coolant, rho=rho_Coolant, V=tubeVelocity, mu=mu_Coolant)
    reynoldsCoolant = 5000.0 #force turbulent
    prandltCoolant = fluids.core.Prandtl(Cp=C_Coolant , k=k_Coolant , mu=mu_Coolant, nu=None, rho=None, alpha=None)
    if reynoldsCoolant<2600:
        nusseltCoolant = ht.conv_internal.laminar_Q_const()
    else:
        nusseltCoolant = ht.conv_internal.turbulent_Dittus_Boelter(Re=reynoldsCoolant, Pr=prandltCoolant, heating=True)
    h_Coolant = nusseltCoolant * k_Coolant / Dh_Coolant

    #AIR
    Dh_Air = 4 * (finHeightAir * finSpacingAir) / (2*(finHeightAir + finSpacingAir))
    airVelocity = flowrateAir/numberAirPass/(finHeightAir*finSpacingAir)
    reynoldsAir = fluids.core.Reynolds(D=Dh_Air, rho=rho_Air, V=airVelocity, mu=mu_Air)
    reynoldsAir = 5000.0 # force turbulent

    prandltAir = fluids.core.Prandtl(Cp=C_Air , k=k_Air , mu=mu_Air, nu=None, rho=None, alpha=None)
    if reynoldsAir<2600:
        nusseltAir = ht.conv_internal.laminar_Q_const()
    else:
        nusseltAir = ht.conv_internal.turbulent_Dittus_Boelter(Re=reynoldsAir, Pr=prandltAir, heating=False)

    #nusseltAir =ht.conv_external.Nu_cylinder_Zukauskas(Re=reynoldsAir, Pr=prandltAir, Prw=None)

    #nusseltAir = 10  # manual overide for laminare flow

    h_Air = nusseltAir * k_Air / Dh_Air

    #calculate UA
    UA = 1/(h_Coolant*areaCoolant) + 1/(h_Air*areaAir)
    UA = 1/UA

    #NTU = ht.hx.effectiveness_NTU_method(mh=massflowCoolant, mc=massflowAir, Cph=C_Coolant, Cpc=C_Air, subtype='crossflow', Thi=tempCoolant, Tho=None, Tci=tempAir, Tco=None, UA=UA)
    NTU = ht.hx.effectiveness_NTU_method(mh=massflowAir, mc=massflowCoolant, Cph=C_Air, Cpc=C_Coolant, subtype='crossflow', Thi=tempAir, Tho=None, Tci=tempCoolant, Tco=None, UA=UA)
    #print NTU
    #print NTU['Q']

    Tout = NTU['Tho'] + 273 #kelvin
    Pwr = NTU['Q'] / 1000 #kW
    TCout = NTU['Tco']
    #output = [Tout, flowrateAir2]


    return Tout, Pwr
예제 #19
0
elevation = var.elevation  # ft
elevation = ft_to_m(elevation)
ambient = var.ambient  #C
ambient += 273  #K

#get air components and pressure at given elevation
atm = fluids.ATMOSPHERE_NRLMSISE00(Z=elevation)  #z is meters
Patm = atm.P
N2 = atm.zs[0]
O2 = atm.zs[1]
Ar = atm.zs[2]

#create air mixture so I can get some properties I need
air = thermo.Mixture(['nitrogen', 'oxygen', 'argon'],
                     Vfgs=[N2, O2, Ar],
                     T=ambient,
                     P=Patm)
k = air.isentropic_exponent
D1 = air.rho


# recalculate air density at given temp and pressure
def air_density_calc(T, P):
    air.calculate(T=T, P=P)
    density = air.rho
    return density


#compressor values
Pgage = var.boost  #psi gage
Pgage = psi_to_Pa(Pgage)  #Pa gage
예제 #20
0
# Hot gas properties
# can choose beteen 'chamber'. 'throat' and 'exit' for metric_cea_output\
cea = heatflux.CEA(ethanol90, oxidiser, chamber_pressure)
cea.metric_cea_output('chamber', OF, expansion_ratio)

if __name__ == "__main__":
    print('gas static temperature: ', cea.T_static, '[K]')
    print('gas dynamic viscosity: ', cea.mu, '[Pa s]')
    print('gas Prandtl number: ', cea.Pr, '[-]')
    print('ratio of specific heats: ', cea.gamma, '[-]')
    print('gas thermal conductivity: ', cea.k, '[W/m/K]')
    #print('gas mole fractions: ', cea.mole_fractions)

    # liquid properties
    liquid_fuel = thermo.Mixture(fuel_composition,
                                 ws=fuel_mass_fraction,
                                 T=fuel_temperature,
                                 P=pre_injection_pressure)
    liquid_ox = thermo.Chemical(ox_composition,
                                T=ox_temperature,
                                P=pre_injection_pressure)

    print('fuel density: ', liquid_fuel.rho, '[kg/m^3]')
    print('fuel dynamic visconsity', liquid_fuel.mu, '[Pa s]')
    print('fuel specific heat at constant pressure: ', liquid_fuel.Cpl,
          '[J/kg/K]')
    print('fuel thermal conductivity: ', liquid_fuel.k, '[W/m/K]')

    print('oxidiser density: ', liquid_ox.rho, '[kg/m^3]')
    print('oxidiser dynamic visconsity', liquid_ox.mu, '[Pa s]')
    print('oxidiser specific heat at constant pressure: ', liquid_ox.Cpl,
          '[J/kg/K]')
예제 #21
0
        'sparrow_50bar.txt', delimiter='', dtype=None,
        skip_header=13) / 1000  # conversion to [m]
    massflow = 5.8
    film_massflow = 0.5
    chamber_pressure = 50e5
    mach = 0.2
    radius_at_injection = 60e-3

    cea = CEA(ethanol90, oxidiser, chamber_pressure)
    cea.metric_cea_output('throat', OF, 12)

    isnetropic = Isentropic(chamber_pressure, cea.T_static, cea.gamma)
    mach = isnetropic.mach(geometry)[::-1]
    T_aw_uncooled = isnetropic.adiabatic_wall_temp(mach, geometry, cea.Pr)

    coolant = thermo.Mixture(['C2H5OH', 'H2O'], ws=[0.9, 0.1], P=60e5, T=350)

    film = FilmCooling(coolant, cea, massflow, film_massflow, chamber_pressure,
                       geometry[42, 1], geometry)
    film.local_conditions(mach)
    #print(film.liquid_lenght())
    #print(film.nasa_liquid_film(0.3))
    #print(film.nasa_gaseous_film(0.2,10,0.4e-3))

    T_aw_cooled = film.T_aw(42, 100, mach, T_aw_uncooled, 40, chamber_pressure)

    f, axes = plt.subplots(4, 1)
    axes[0].plot(geometry[:, 0], geometry[:, 1] * 1000)
    axes[0].set_ylabel('contour height [mm]')

    axes[1].plot(geometry[:, 0], T_aw_uncooled)
예제 #22
0
import numpy as np
import thermo

import injectors
from standard_fluid_config import ox_massflow, fuel_massflow

fuel = thermo.Mixture(['c2h5oh', 'h2o'], ws=[0.8, 0.2], T=288, P=7.5e6)
ox = thermo.Mixture(['o2'], [1], T=90, P=6.5e6)

# values form Wolfram Alpha
p_vap_water = 1204  #[Pa]
p_vap_ethanol = 3861  #[Pa]
p_vap_ox = 97.18e3  #[Pa]

p_vap_fuel = fuel.zs[0] * p_vap_ethanol + fuel.zs[
    1] * p_vap_water  # molar averaged vapor pressure of fuel [Pa]

dp_fuel = fuel.P - p_vap_fuel
dp_ox = ox.P - p_vap_ox

orifice_len = 3e-3
ethanol_bypass = injectors.LiquidInjector(['c2h5oh', 'h2o'], [0.8, 0.2],
                                          fuel.T, fuel.P, orifice_len,
                                          fuel_massflow * 0.1, dp_fuel, 0)
ethanol_bypass.injector()
lox_bypass = injectors.LiquidInjector(['o2'], [1], ox.T, ox.P, orifice_len,
                                      ox_massflow * 0.1, dp_ox, 0)
lox_bypass.injector()

print(ethanol_bypass.mu)
print(ethanol_bypass.diameter * 1000)
예제 #23
0
# Thermo input values
total_massflow = 0.4964  # [kg/s]
fuel_massflow = total_massflow / (1 + OF)
coolant_massflow = 0.498  #1.96
coolant_composition = ['H2O']
coolant_mass_fraction = [1]

# Film Cooling BETA

mu = 0.05
film_massflow = fuel_massflow * mu / (1 - mu)
isnetropic = film.Isentropic(chamber_pressure, cea.T_static, cea.gamma)
mach = isnetropic.mach(geometry)[::-1]
T_aw_uncooled = isnetropic.adiabatic_wall_temp(mach, geometry, cea.Pr)
coolant = thermo.Mixture(['benzine'], ws=[1], P=chamber_pressure + 10e5, T=273)
film = film.FilmCooling(coolant, cea, total_massflow, film_massflow,
                        chamber_pressure, geometry[49, 1], geometry)
T_aw_cooled = film.T_aw(film_start=49,
                        film_end=100,
                        mach=mach,
                        T_aw_uncooled=T_aw_uncooled,
                        n_holes=number_of_channels,
                        chamber_pressure=chamber_pressure)[::-1]

heat = ht.Heattransfer(coolant_composition, coolant_mass_fraction,
                       coolant_massflow, total_massflow, fuel, oxidiser, OF,
                       chamber_pressure, fuel_temperature, fuel_inlet_pressure,
                       geometry, cooling_channels, thermal_conductivity,
                       method, T_aw_cooled)
heat.heatflux(geometry)