|
楼主 |
发表于 2022-5-24 17:15:44
|
显示全部楼层
本帖最后由 kitsuchiLi 于 2022-5-24 17:20 编辑
/计算界面速度边界速度与温度/
DEFINE_ADJUST(WICK_VAPOR_INTERFACE, domain)
{
double TEMPERATURE_INTERFACE,VELOCITY_INTERFACE_E,VELOCITY_INTERFACE_C;
TEMPERATURE_INTERFACE=0;
VELOCITY_INTERFACE_E=0;
VELOCITY_INTERFACE_C=0;
Z_ID = MARZ_VAPOR_WICK_ID;
tt = Lookup_Thread(domain,Z_ID);
Z_ID = MARZ_WICK_VAPOR_ID;
tt_shadow = Lookup_Thread(domain,Z_ID);
iii=-1;
begin_f_loop(ff, tt)
{
iii=iii+1;
F_CENTROID(x,ff,tt);
xx = x[0];
ff_shadow=ff_VAPOR_WICK[iii];
c0 = F_C0(ff,tt);
t0 = F_C0_THREAD(ff,tt);
temp_Cell=C_UDSI(c0,t0,1);
temp_face=F_UDSI(ff,tt,1);
k_Cell=C_K_L(c0,t0);
ro_Cell=C_R(c0,t0);
cp_Cell=C_CP(c0,t0);
v_face=F_V(ff,tt);
P_Cell=C_P(c0,t0)-PRESSURE_VAPOR_0;
BOUNDARY_FACE_GEOMETRY(ff,tt,A,ds,es,A_by_Es,dr0);
c0_shadow = F_C0(ff_shadow,tt_shadow);
t0_shadow = F_C0_THREAD(ff_shadow,tt_shadow);
temp_Cell_shadow=C_UDSI(c0_shadow,t0_shadow,1);
temp_face_shadow=F_UDSI(ff_shadow,tt_shadow,1);
k_Cell_shadow=C_K_L(c0_shadow,t0_shadow);
ro_Cell_shadow=C_R(c0_shadow,t0_shadow);
cp_Cell_shadow=C_CP(c0_shadow,t0_shadow);
v_face_shadow=F_V(ff_shadow,tt_shadow);
BOUNDARY_FACE_GEOMETRY(ff_shadow,tt_shadow,A,ds_shadow,ess,A_by_Ess,dr0s);
//=====================================
temp_face=TEMP_INTERFACE[iii];
aa1=0.0;
aa1=HFG/R_R*(1.0/T_C-1.0/temp_face);
PRESSURE_INTERFACE=P_C*exp(aa1);
aa1=2.0*ZIGMA/(2.0-ZIGMA);
aa2=1/sqrt(2*PI_num*R_R);
aa3=((P_OP_2+P_Cell)/sqrt(temp_Cell)-PRESSURE_INTERFACE/sqrt(temp_face));
M_DOT[iii]=aa1*aa2*aa3; //单位面积传质速率的计算
VEL_INTERFACE_VAPOR[iii] = M_DOT[iii]/ro_Cell; //计算蒸汽侧边界速度
VEL_INTERFACE_WICK[iii]= VEL_INTERFACE_VAPOR[iii]*ro_Cell/ro_Cell_shadow; //计算吸液芯侧边界速度
//=====================================
k_ds=k_Cell/ds;
k_ds_shadow=k_Cell_shadow/ds_shadow;
aa1=temp_Cell_shadow*k_ds_shadow;
aa2=temp_Cell*k_ds;
aa3=2.0*ZIGMA/(2.0-ZIGMA)*1/sqrt(2*PI_num*R_R)*((P_OP_2+P_Cell)/sqrt(temp_Cell))*HFG;
bb1=k_ds_shadow;
bb2=k_ds;
bb3=2.0*ZIGMA/(2.0ZIGMA)*1/sqrt(2*PI_num*R_R)(PRESSURE_INTERFACE/sqrt(temp_face))*HFG/temp_face;
TEMP_INTERFACE[iii]=TEMP_INTERFACE[iii]+URF_TEMP*((aa1+aa2+aa3)/(bb1+bb2)-TEMP_INTERFACE[iii]);//计算界面温度 由边界上的传热方程推导获得
}
end_f_loop(ff, tt)
}
/计算蒸汽腔内的基准压力/
DEFINE_ADJUST(PARAMETERS_UPDATE, domain)
{
double P_OP_2_old,P_OP_2_new;
double AAA,BBB,CCC,DDD;
double NV_VEC(f_area);
double d_area;
TIME_STEP=CURRENT_TIMESTEP;
//=====================================
Z_ID = MARZ_VAPOR_WICK_ID;
tt = Lookup_Thread(domain,Z_ID);
aa1=0.0;
iii=-1;
begin_f_loop (ff,tt)
{
iii=iii+1;
c0 = F_C0(ff,tt);
t0= F_C0_THREAD(ff,tt);
v_face =F_V(ff,tt);
ro_Cell=C_R(c0,t0);
F_AREA(f_area,ff,tt);
d_area = NV_MAG(f_area);
aa1=aa1+v_face*ro_Cell*d_area; // 边界上密度x速度获取上一次迭代计算的界面传质量
}
end_f_loop (ff,tt)
M_DOT_BALANCE=aa1;
MASS_VAPOR2=MASS_VAPOR1-TIME_STEP*(aa1);//计算新蒸汽质量
MASS_LIQUID_2=MASS_LIQUID_1+TIME_STEP*(aa1);
//====================================================
Z_ID = VAPOR_Core_ID;
t0 = Lookup_Thread(domain,Z_ID);
aa1=0.0;
begin_c_loop (c0,t0)
{
aa1=aa1+C_VOLUME(c0,t0)*POROSITY2/C_UDSI(c0,t0,1);
}
end_c_loop (c0,t0)
BBB=R_R/aa1;
//====================================================
Z_ID = MARZ_VAPOR_WICK_ID;
tt = Lookup_Thread(domain,Z_ID);
CCC=0.0;
DDD=0.0;
iii=-1;
begin_f_loop (ff,tt)
{
iii=iii+1;
c0 = F_C0(ff,tt);
t0= F_C0_THREAD(ff,tt);
temp_Cell=C_UDSI(c0,t0,1);
temp_face=TEMP_INTERFACE[iii];
PRESSURE_INTERFACE=P_C*exp(HFG/R_R*(1.0/T_C-1.0/temp_face));//计算界面的饱和压力
P_Cell=C_P(c0,t0);//蒸汽的压力
F_AREA(f_area,ff,tt);
d_area = NV_MAG(f_area);
CCC=CCC+d_area*(P_Cell/sqrt(temp_Cell)-PRESSURE_INTERFACE/sqrt(temp_face));
DDD=DDD+d_area*(1/sqrt(temp_Cell));
}
end_f_loop(ff,tt)
AAA=(2.0*ZIGMA/(2.0-ZIGMA))*(1/sqrt(2*PI_num*R_R));
P_OP_2_new=(BBB*(MASS_VAPOR1-TIME_STEP*AAA*CCC))/(1+BBB*TIME_STEP*AAA*DDD);//结合单位面积的传质方程累加与理想气体状态方程计算蒸汽腔内的基准压力
P_OP_2 = P_OP_2_new;
MASS_LIQUID_2,TIME_STEP*AAA*CCC);
}
以上为UDF中最核心的计算部分,计算蒸汽腔的参考压力以及汽液交界面上的速度与温度,计算所得速度与压力通过2个PROFILE宏赋予蒸汽侧与吸液芯侧的边界,并予以符号相反的处理;赋予两边界相同的温度边界,通过UDF的计算所得此前所属的边界速度分布,蒸发端蒸汽侧速度进,吸液芯侧速度出,冷凝端蒸汽侧速度出,吸液芯测速度进。但是流场计算不符合,是否为流域的压力场计算问题? |
|