test

def sm_series_configurator(nid, required_pressure, max_temp): # Define material properties materials = { '321 Stainless Steel': {'max_temp': 1500, 'max_pressure_no_braid': 180, 'max_pressure_single_braid': 2460, 'max_pressure_double_braid': 3690}, '316L Stainless Steel': {'max_temp': 900, 'max_pressure_no_braid': 180, 'max_pressure_single_braid': 2460, 'max_pressure_double_braid': 3690} } # Determine suitable material suitable_material = None for material, properties in materials.items(): if max_temp <= properties['max_temp']: if required_pressure <= properties['max_pressure_double_braid']: suitable_material = material break if not suitable_material: return "No suitable material found that can handle the specified temperature and pressure." # Determine the required braid configuration if required_pressure <= materials[suitable_material]['max_pressure_no_braid']: braid_configuration = "No Braid" elif required_pressure <= materials[suitable_material]['max_pressure_single_braid']: braid_configuration = "Single Braid" else: braid_configuration = "Double Braid" return f"Recommended Hose: SM Series {nid}\" I.D. with {braid_configuration}, Material: {suitable_material}" # Example usage print(sm_series_configurator(1, 1000, 1200)) print(sm_series_configurator(0.5, 2000, 800))