• 大小: 15KB
    文件类型: .c
    金币: 2
    下载: 2 次
    发布日期: 2021-06-17
  • 语言: 其他
  • 标签: fluent  UDF  

资源简介

该程序对学习fluent UDF有很大的帮助 里面涉及到很大宏的使用

资源截图

代码片段和文件信息



/*This code was originally written by Kim Bindesboll Andersen & Soren heinsen. A few 
alterations and different solution strategies are adopted for this case.   */ 

/******************************************************************* 
 Version 13 - 22. juni 2004 
 UDF for combustion of C and devolatilization 
 Update of C content 
 Update of volatile content 
 Update of porosity 
 O2 source 
 CO source 
 CO2 source 
 H2 source 
 CH4 source 
 Energy source 
 Incident radiative heat 
 Flux based char gasification 
 Flux based evaporation 
 No condensation 
 Direct update of porosity 
 Moisture source as Arrhenius expression 
******************************************************************* 

Definition of User Defined Memories: 
 (Utilized for description of solid properties of cells) 
UDM0:  Initial total mass 
UDM1:  Total mass 
UDM2:  C mass 
UDM3:  Votalile mass 
UDM4:  Moisture mass 
UDM5:  Porosity 
UDM6:  Total mass source 
UDM7:  Moisture mass source 
UDM8:  Volatile mass source 
UDM9:  Ash mass 
UDM10: CO mass source from C combustion 
UDM11: CO mass source from volatiles 
UDM12: C mass fixed char reacted 

**********************************************************************/ 

#include “udf.h“ 

int i; 

/* Solid properties */ 

/* Particle density [kg/m3] */ 
real solid_rho = 1000.0; 

/* Initial porosity */ 
real porosity_init = 0.2; 

/* Wood composition */ 
real frac_moist = 0.4; 
real frac_vol = 0.486; 
real frac_c = 0.1092; 
real frac_ash = 0.0048; 

/* Heat of reaction C to CO [J/kg] */ 
real h_C_CO = 9210830.0; 
/* Heat of evaporation of water [J/kg] */ 
real h_evap = 2256900.0; 
/* Heat of reaction for devolatilization [J/kg] */ 
real h_devol = 411100.0; 

/* Species enthalpies */ 
real T_ref = 288.15; 
real cp_co = 1043.0; 
real cp_o2 = 919.31; 
real cp_h2o = 2014.0; 
real cp_vol = 1522.0; 

/* Volatile properties */ 
real frac_vol_h2 = 0.0272; 
real frac_vol_co = 0.2123; 
real frac_vol_ch4 = 0.1974; 
real frac_vol_co2 = 0.5632; 
/* Devolatilization rate parameters [J/kmol] */ 
real A1 = 312000.0; 
real E1 = 7.4e+07; 
/* Universal gas constant [J/kmol] */ 
real R = 8314.0; 
/* Char combustion rate parameters [J/kmol] */ 
real A2 = 1.45e+11; 
real E2 = 1.83e+08; 
/* Evaporation Arrhenius constants */ 
real A3 = 5.13e+10; 
real E3 = 8.8e+07; 

enum 

           /* UDM0  */ m_init_tot 
           /* UDM1  */ m_tot 
           /* UDM2  */ m_C 
           /* UDM3  */ m_vol 
           /* UDM4  */ m_moist 
           /* UDM5  */ m_por 
           /* UDM6  */ source_total 
           /* UDM7  */ source_moist 
           /* UDM8  */ source_vol 
           /* UDM9  */ m_ash 
           /* UDM10 */ source_COC 
           /* UDM11 */ source_COvol 
           /* UDM12 */ source_C 
           /*UDM13*/ moist_flux 
           /*UDM14*/ vol_flux 
           /*UDMI15*/Hydrogen 

}; 

/**********************

评论

共有 条评论