Beispiel #1
0
def ideal_thrust(A_t,A_e,gamma,p_c,T_c,rho_c,a_c,altitude,m_dot):

	p_atm,T_atm,rho_atm = gd.standard_atmosphere([altitude])

	epsilon = A_e/A_t
	
	M_e = optimize.fsolve(lambda M: gd.expansion_ratio_zero(1,M,gamma,epsilon),5)
	# print(M_e)
	# throat conditions
	T_ratio,p_ratio,rho_ratio,a_ratio = gd.isentropic_ratios(0,1,gamma)
	T_t = T_ratio*T_c; p_t = p_ratio*p_c; rho_t = rho_ratio*rho_c; a_t = a_ratio*a_c;
	
	# exit conditions
	T_ratio,p_ratio,rho_ratio,a_ratio = gd.isentropic_ratios(0,M_e,gamma)
	T_e = T_ratio*T_c; p_e = p_ratio*p_c; rho_e = rho_ratio*rho_c; a_e = a_ratio*a_c;

	# mass flow rate (constant in ideal case)
	# m_dot = rho_t*A_t*a_t*1 
	# print(m_dot)

	# print('rho calc ' + str(rho_t))
	# print('a_t calc ' + str(a_t))
	# print('V_e calc ' + str(M_e*a_e))
	# print('p_e - p_atm' + str(p_e - p_atm))
	# print('M_e ' + str(M_e))

	return m_dot*M_e*a_e #+ (p_e - p_atm)*A_e
Beispiel #2
0
    def calc_flow_properties(self):
        T_ratio,p_ratio,rho_ratio,a_ratio = gd.isentropic_ratios(0,self.M,self.gamma)

        self.T = self.spike.T_c*T_ratio
        self.p = self.spike.p_c*p_ratio   
        self.a = self.spike.a_c*a_ratio
        self.rho = self.spike.rho_c*rho_ratio
Beispiel #3
0
    def compute_initial_expansion_fan(self):
        M_max = gd.PR_expansion_mach(self.PR, self.gamma)
        # print('M_max: ' + str(M_max))
        mach_fan = np.linspace(1.1, M_max, self.n)

        (T_ratio, p_ratio, rho_ratio,
         a_ratio) = gd.isentropic_ratios(0, mach_fan, self.gamma)

        V_fan = a_ratio * self.spike.a_c * mach_fan

        W_fan = V_fan / self.V_l

        theta_fan = -gd.prandtl_meyer(mach_fan, self.gamma) + self.slope_init

        angle_fan = gd.mach_angle(mach_fan)

        # print(180/np.pi*np.arcsin(np.sqrt((gamma-1)/2*(1/W_fan**2-1))))
        # print(W_fan)

        # print(angle_fan*180/np.pi)

        x_fan = np.ones(angle_fan.shape) * self.spike.lip_x

        y_fan = np.ones(angle_fan.shape) * self.spike.lip_y

        #print(theta_fan*180/np.pi)
        # print(gd.mach_angle_velocity_ratio(gd.prandtl_meyer(2.3,gamma),0.3,gamma))

        initial_point = self.contour_point(chr_point(self.gamma, x_fan[0],
                                                     y_fan[0], theta_fan[0],
                                                     W_fan[0], 'N/A'),
                                           plot_chr=self.plot_chr)
        self.ID += 1
        self.ID_contour_chr.pop(0)
        self.chr_array = np.append(self.chr_array, initial_point)

        for point in x_fan[1:-1]:
            temp_point = chr_point(self.gamma, x_fan[self.ID], y_fan[self.ID],
                                   theta_fan[self.ID], W_fan[self.ID], 'N/A')
            new_point = self.general_point(temp_point,
                                           self.chr_array[self.ID - 1],
                                           plot_chr=self.plot_chr)
            # adding to arrays
            self.chr_array = np.append(self.chr_array, new_point)
            self.ID += 1

        first_jet = chr_point(self.gamma, x_fan[-1], y_fan[-1], theta_fan[-1],
                              W_fan[-1], 'N/A')
        second_jet = self.jet_boundary_point(first_jet,
                                             self.chr_array[self.ID - 1],
                                             plot_chr=self.plot_chr)
        self.chr_array = np.append(self.chr_array, second_jet)
        #self.ID_jet_boundary.append(self.ID)
        self.ID += 1
        self.add_break_ID()