import numpy as np
import math
import jsonm =(1, 2, 3, 4)shell_resistance = json.dumps({'Density_ave_tem':m})def Shell_resistance(Shell_resistance1):'''热交换器壳程流阻本函数作用于计算管壳式热交换器的壳程流阻Keyword arguments:input:Cor_pre 换热管排列形式对压降的校正系数,当排布方式为站三角形时,取0.5,正方形排列时取0.3,正方形斜转45°时取0.4Bundle_center 横过管束中心的管束(根)Fri_shell 壳程流体摩擦系数Num_baffles 折流板数目Density_ave_tem 壳程液体流速V_tube 折流板间距Factor_fvc 壳体直径output:T_pre_tube 管束阻力损失Res_way 折流板弓形缺口处的阻力损失Res_bend 壳程总体阻力损失calculate process:利用输入参数分别求出管束阻力损失、折流板弓形缺口处的阻力损失壳程总体阻力损失为上述阻力损失之和'''Cor_pre = float(input('换热管排列形式对压降的校正系数:\t'))Bundle_center = float(input('横过管束中心的管束:\t'))Fri_shell = float(input('壳程流体摩擦系数:\t'))Num_baffles =float(input('折流板数目:\t'))V_tube = float(input('折流板间距:\t'))Factor_fvc = float(input('壳体直径:\t'))resistance = json.loads(Shell_resistance1)print(f'壳程流阻:{resistance}')velocity = np.array(resistance['Density_ave_tem'])T_pre_tube = (Cor_pre*Fri_shell*Bundle_center*(Num_baffles+1)*velocity**2)/2Res_way = (Num_baffles*(3.5-2*V_tube/Factor_fvc)*velocity**2)/2Res_bend = T_pre_tube + Res_wayT_pre_tube = tuple(T_pre_tube)Res_way = tuple(Res_way)Res_bend = tuple(Res_bend)output_resistance ={'管束阻力损失':T_pre_tube,'折流板弓形缺口处的阻力损失':Res_way,'壳程总体阻力损失':Res_bend}print(output_resistance)output = json.dumps(output_resistance)Shell_resistance(shell_resistance)
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!