(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF

上传人:206****923 文档编号:91557036 上传时间:2019-06-29 格式:DOCX 页数:11 大小:14.04KB
返回 下载 相关 举报
(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF_第1页
第1页 / 共11页
(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF_第2页
第2页 / 共11页
(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF_第3页
第3页 / 共11页
(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF_第4页
第4页 / 共11页
(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF》由会员分享,可在线阅读,更多相关《(最全面-和网上流传的都不一样)fluent空气蒸汽冷凝UDF(11页珍藏版)》请在金锄头文库上搜索。

1、#include udf.h /*head files*/#include mem.h#include flow.h#define PI 3.141592653 /*constant*/#define Mv 18.01534 /*molecular weight of vapor(kg/kmol)*/#define Ma 28.966 /*molecular weight of air(kg/kmol) */int *a;real *b;real *d;real *q;real *g;real *l;real s1;real s2;real s3;real s0;int counter=0;

2、/*counter*/int j; /*index of interface wall cell*/int k;real latent_heat(real T)real t;real Hlg;t=T-273.15;if(t=10.0)&(t=20.0)&(t=30.0)&(t=40.0)&(t=50.0)&(t=60.0)&(t=70.0)&(t=80.0)&(t=90.0)&(t=100.0)&(t=110.0)&(t=120.0)&(t=130.0)&(t=140.0)&(t=150.0)&(t=160.0)&(t=170.0)&(t=180.0)&(t=190.0)&(t=200.0)&

3、(t=210.0)&(t=220.0)&(t=230.0)&(t=240.0)&(t=250.0)Hlg=1715325.26;return Hlg;real s_enthalpy(real T)real t;real H;t=T-273.15;if(t=10.0)&(t=20.0)&(t=30.0)&(t=40.0)&(t=50.0)&(t=60.0)&(t=70.0)&(t=80.0)&(t=90.0)&(t=100.0)&(t=110.0)&(t=120.0)&(t=130.0)&(t=140.0)&(t=150.0)&(t=160.0)&(t=170.0)&(t=180.0)&(t=1

4、90.0)&(t=200.0)&(t=210.0)&(t=220.0)H=2802000.0;return H;DEFINE_DELTAT(my_timestep,d)real time_step;real flow_time=RP_Get_Real(flow-time);if(flow_time4.0)time_step=0.01;elsetime_step=0.05;return time_step;DEFINE_PROFILE(cwalltemp,t,i)real xND_ND;real s,ma,mb,mc,md,me;face_t f;ma=8.284;mb=-25.585;mc=2

5、2.699;md=-5.3462;me=350.87;begin_f_loop(f,t)F_CENTROID(x,f,t);s=x1;F_PROFILE(f,t,i) = ma*s*s*s*s+mb*s*s*s+mc*s*s+md*s+me;end_f_loop(f,t)DEFINE_PROFILE(mass_flow,t,i)face_t f;begin_f_loop(f,t)F_PROFILE(f,t,i) =-s0;end_f_loop(f,t)DEFINE_ON_DEMAND(INIT)int thread_ID;Domain *domain;Thread *tt;int i;face_t f; /*face index on the wall*/cell_t c0;real AND_ND;i=0;thread_ID=6;domain=Get_Domain(1);tt=Lookup_Thread(domain,thread_ID);/*calculate the

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号