def _generate_combustion_parameters(combustion_init_dict, json_interpreter): """ _generate_combustion_parameters performs all of the necessary calculations (if there are )required to set the inputs for the combustion module :param combustion_init_dict: dictionary containing the data required to prepare the inputs for the combustion module. :param json_interpreter: JsonInterpreter instance :return: combustion_parameters dictionary """ # ------------- Generate the objects: # Geometry geometry_obj = combustion_init_dict['geometric_params'].pop('type') geometry_obj = geometry_obj(**combustion_init_dict['geometric_params']) # Nozzle nozzle_obj = Nozzle(**combustion_init_dict['nozzle_params']) nozzle_obj.set_design(**combustion_init_dict['design_params']) # Return output return { 'json_interpreter': json_interpreter, 'geometry_object': geometry_obj, 'nozzle_object': nozzle_obj }
def generate_combustion_parameters(combustion_init_dict, json_interpreter): """ generate_combustion_parameters performs all of the necessary calculations (if there are )required to set the inputs for the combustion module :param combustion_init_dict: dictionary containing the data required to prepare the inputs for the combustion module. :param json_interpreter: JsonInterpreter instance :return: combustion_parameters dictionary """ # ------------- Generate the objects: # Geometry geometry_type = combustion_init_dict['geometric_params'].pop('type') regression_obj = Reg.MarxmanAndConstantFloodingRegimeModel( **json_interpreter.return_combustion_table()) combustion_init_dict['geometric_params'][ 'regressionModel'] = regression_obj geometry_obj = geometry_type( **combustion_init_dict['geometric_params']) if geometry_type == SinglePortImageGeometry: geometry_obj.generateFourier( **combustion_init_dict['shape_params']) # Nozzle nozzle_obj = Nozzle(**combustion_init_dict['nozzle_params']) # Set the nozzle design if combustion_init_dict['set_nozzle_design']: nozzle_obj.set_design(**combustion_init_dict['design_params']) # Return output return { 'json_interpreter': json_interpreter, 'geometry_object': geometry_obj, 'nozzle_object': nozzle_obj }