def __init__(self, propellant, motor_height, motor_diameter, exit_area, throat_area): self.motor_height = motor_height self.motor_diameter = motor_diameter self.exit_area = exit_area self.throat_area = throat_area self.density = propellant.density self.a = propellant.a self.n = propellant.n self.T = propellant.T self.gamma = propellant.gamma self.molar_mass = propellant.molar_mass self.c_star = propellant.c_star self.R = propellant.R self.exit_mach = burn.calculate_exit_mach(self.gamma, self.exit_area, self.throat_area) self.exit_temp = burn.calculate_nozzle_exit_temp( self.T, self.gamma, self.exit_mach) self.exit_velocity = burn.calculate_nozzle_exit_velocity( self.exit_mach, self.gamma, self.R, self.exit_temp) # initializing variables to be stored after burn method self.chamber_pressure = 0 self.burn_rate = 0 self.regression_depth = 0 self.burning_area = 0 self.m_dot = 0 self.exit_pressure = 0 self.elapsed_time = 0 self.thrust = 0 self.method = 0
def __init__(self, propellant, motor_height, motor_diameter, bore_radius, web_radius, fillet_radius, epsilon, number_of_points, exit_area, throat_area, burn_top, burn_bottom): self.burn_top = burn_top self.burn_bottom = burn_bottom self.motor_height = motor_height self.motor_diameter = motor_diameter self.exit_area = exit_area self.throat_area = throat_area self.Ro = motor_diameter / 2 self.Ri = bore_radius self.Rp = web_radius self.f = fillet_radius self.epsilon = epsilon self.N = number_of_points self.theta = 2 * np.arctan( self.Rp * np.sin(np.pi * epsilon / self.N) * np.tan(np.pi * epsilon / self.N) / (self.Rp * np.sin(np.pi * epsilon / self.N) - self.Ri * np.tan(np.pi * epsilon / self.N))) self.density = propellant.density self.a = propellant.a self.n = propellant.n self.T = propellant.T self.gamma = propellant.gamma self.molar_mass = propellant.molar_mass self.c_star = propellant.c_star self.R = propellant.R self.exit_mach = burn.calculate_exit_mach(self.gamma, self.exit_area, self.throat_area) self.exit_temp = burn.calculate_nozzle_exit_temp( self.T, self.gamma, self.exit_mach) self.exit_velocity = burn.calculate_nozzle_exit_velocity( self.exit_mach, self.gamma, self.R, self.exit_temp) # initializing variables to be stored after burn method self.chamber_pressure = 0 self.burn_rate = 0 self.regression_depth = 0 self.burning_area = 0 self.m_dot = 0 self.exit_pressure = 0 self.elapsed_time = 0 self.thrust = 0 self.method = 0
def __init__(self, propellant, motor_height, motor_diameter, bore_radius, fin_width, fin_length, number_of_fins, exit_area, throat_area, burn_top, burn_bottom): self.burn_top = burn_top self.burn_bottom = burn_bottom self.motor_height = motor_height self.motor_diameter = motor_diameter self.exit_area = exit_area self.throat_area = throat_area self.Rp = motor_diameter / 2 self.fin_width = fin_width self.fin_length = fin_length self.Rb = bore_radius self.N = number_of_fins self.density = propellant.density self.a = propellant.a self.n = propellant.n self.T = propellant.T self.gamma = propellant.gamma self.molar_mass = propellant.molar_mass self.c_star = propellant.c_star self.R = propellant.R self.exit_mach = burn.calculate_exit_mach(self.gamma, self.exit_area, self.throat_area) self.exit_temp = burn.calculate_nozzle_exit_temp( self.T, self.gamma, self.exit_mach) self.exit_velocity = burn.calculate_nozzle_exit_velocity( self.exit_mach, self.gamma, self.R, self.exit_temp) # initializing variables to be stored after burn method self.chamber_pressure = 0 self.burn_rate = 0 self.regression_depth = 0 self.burning_area = 0 self.m_dot = 0 self.exit_pressure = 0 self.elapsed_time = 0 self.thrust = 0 self.method = 0