| ²é¿´: 1406 | »Ø¸´: 2 | ||
| ¡¾ÐüÉͽð±Ò¡¿»Ø´ð±¾ÌûÎÊÌ⣬×÷ÕßQiaoPengyu½«ÔùËÍÄú 5 ¸ö½ð±Ò | ||
QiaoPengyuгæ (³õÈëÎÄ̳)
|
[ÇóÖú]
fluent¼ÓÔØudfºó³õʼ»¯ÉÁÍË
|
|
|
fluent²»¼ÓÔØudfµÄʱºò¿ÉÒÔ¼ÆË㣬һ¼ÓÈëudf¾Í»á±¨´íÉÁÍË£¨udf±àÒëºÍ¼ÓÔØ¶¼¿ÉÒԳɹ¦£©¡£udfÈçÏ ´óÀÐÃÇ¿´¿´udfÊDz»ÊÇ´æÔÚÎÊÌâ¡£ #include "udf.h" #include "flow.h" #include"unsteady.h" #include"stdio.h" #define M0 0.032 #define M1 0.028 #define k10 7.87e-9 #define k11 9.86e-9 #define k20 1541.211 #define k21 2010.908 #define k30 6.79e-10 #define k31 1.67e-9 #define k40 1968.24 #define k41 2250 #define K0 62 #define K1 19.7 #define D 0.08 #define d 1.6e-3 #define h0 12000 #define h1 18000 #define L 1035 #define hf 0.2 #define hw 3.84e-3 #define Tw 288 #define e 0.4 #define cp_s 1010 /*specific heat of solid [cp_s]=j/(kg.K)*/ /* Define which user-defined scalars to use.*/ enum { q0,q1,Q0,Q1,OM,TM,TE,T_S }; DEFINE_ADJUST(adjust_fcn, domain) { Thread* t; cell_t c; /*solve the q0.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(q0)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(q0))) { begin_c_loop(c, t) { real p_0, p_1, x0, x1, b0, b1; p_0 = 7 * C_YI(c, t, 0) * ABS_P(C_P(c, t), op_pres) / (8 - C_YI(c, t, O)); p_1 = 8 * C_YI(c, t, 1) * ABS_P(C_P(c, t), op_pres) / (7 + C_YI(c, t, 1)); x0 = k10 * exp(k20 / C_T(c, t)); b0 = k30 * exp(k40 / C_T(c, t)); b1 = k31 * exp(k41 / C_T(c, t)); C_UDSI(c, t, q0) = x0 * p_0 / (1 + b0 * p_0 + b1 * p_1); } end_c_loop(c, t) } } /* solve the q1.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(q1)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(q1))) { begin_c_loop(c, t) { real p_0, p_1, x0, x1, b0, b1; x1 = k11 * exp(k21 / C_T(c, t)); b0 = k30 * exp(k40 / C_T(c, t)); b1 = k31 * exp(k41 / C_T(c, t)); C_UDSI(c, t, q1) = x1 * p_1 / (1 + b0 * p_0 + b1 * p_1); } end_c_loop(c, t) } } /* solve the Q0.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(Q0)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(Q0))) { begin_c_loop(c, t) { real physical_dt; physical_dt = RP_Get_Real("physical-time-step" ;C_UDSI(c, t, Q0) = C_UDSI_M1(c, t, Q0) + K0 * physical_dt * (C_UDSI(c, t, q0) - C_UDSI_M1(c, t, Q0)); } end_c_loop(c, t) } } /* solve the Q1.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(Q1)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(Q1))) { begin_c_loop(c, t) { real physical_dt; physical_dt = RP_Get_Real("physical-time-step" ;C_UDSI(c, t, Q1) = C_UDSI_M1(c, t, Q1) + K1 * physical_dt * (C_UDSI(c, t, q1) - C_UDSI_M1(c, t, Q1)); } end_c_loop(c, t) } } /* solve the OM.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(OM)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(OM))) { begin_c_loop(c, t) { C_UDSI(c, t, OM) = -(1.0 - e) * M0 * L * K0 * (C_UDSI(c, t, q0) - C_UDSI_M1(c, t, Q0)); } end_c_loop(c, t) } } /* solve the TM.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(TM)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(TM))) { begin_c_loop(c, t) { C_UDSI(c, t, TM) = C_UDSI(c, t, OM) - (1.0 - e) * M1 * L * K1 * (C_UDSI(c, t, q1) - C_UDSI_M1(c, t, Q1)); } end_c_loop(c, t) } } /* solve the TE.*/ thread_loop_c(t, domain) { if (NULL != THREAD_STORAGE(t, SV_UDS_I(TE)) && NULL != T_STORAGE_R_NV(t, SV_UDSI_M1(TE))) { begin_c_loop(c, t) { C_UDSI(c, t, TE) = (1.0 - e) * L * (K0 * h0 * (C_UDSI(c, t, q0) - C_UDSI_M1(c, t, Q0)) + K1 * h1 * (C_UDSI(c, t, q1) - C_UDSI_M1(c, t, Q1))); } end_c_loop(c, t) } } } DEFINE_UDS_UNSTEADY(uns_time, c, t, i, apu, su) { real physical_dt, vol, rho, phi_old; physical_dt = RP_Get_Real("physical-time-step" ;vol = C_VOLUME(c, t); rho = L; *apu = -rho * cp_s * vol / physical_dt; /*implicit part*/ phi_old = C_STORAGE_R(c, t, SV_UDSI_M1(T_S)); *su = rho * cp_s * vol * phi_old / physical_dt; /*explicit part*/ } DEFINE_SOURCE(O2mass_source, c, t, dS, eqn) { real source; source = C_UDSI(c, t, OM); dS[eqn] = 0; return source; } DEFINE_SOURCE(total_mass_source, c, t, dS, eqn) { real mass_source; mass_source = C_UDSI(c, t, TM); dS[eqn] = 0; return mass_source; } DEFINE_SOURCE(energy_source_fluid, c, t, dS, eqn) { real e_source; e_source = C_UDSI(c, t, TE); dS[eqn] = 0; return e_source; } DEFINE_SOURCE(energy_source_solid, c, t, dS, eqn) { real e_source; e_source = 1.0 * C_UDSI(c, t, TE) / (1.0 - e) + 6 * hf * (C_T(c, t) - C_UDSI(c, t, T_S)) / d; dS[eqn] = 0; return e_source; } DEFINE_DIFFUSIVITY(m_diff, c, t, i) { real diff; diff = 6.324e-5 * pow(C_T(c, t), 1.83) / ABS_P(C_P(c, t), op_pres); return diff; }@wuming524 |
» ²ÂÄãϲ»¶
Ò»Ö¾Ô¸085502£¬267·ÖÇóµ÷¼Á
ÒѾÓÐ16È˻ظ´
085801µçÆø×¨Ë¶272Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
366Çóµ÷¼Á
ÒѾÓÐ9È˻ظ´
²ÄÁϹ¤³Ì085601£¬270Çóµ÷¼Á
ÒѾÓÐ37È˻ظ´
279ѧ˶ʳƷרҵÇóµ÷¼ÁԺУ
ÒѾÓÐ18È˻ظ´
290µ÷¼ÁÉúÎï0860
ÒѾÓÐ31È˻ظ´
Ò»Ö¾Ô¸085802 323·ÖÇóµ÷¼Á
ÒѾÓÐ13È˻ظ´
277Çóµ÷¼Á
ÒѾÓÐ23È˻ظ´
322Çóµ÷¼Á£¬08¹¤¿Æ
ÒѾÓÐ4È˻ظ´
²ÄÁϹ¤³Ì281»¹Óе÷¼Á»ú»áÂð
ÒѾÓÐ30È˻ظ´
sallywhe1
½ð³æ (СÓÐÃûÆø)
- Ó¦Öú: 1 (Ó×¶ùÔ°)
- ½ð±Ò: 876.4
- É¢½ð: 5
- Ìû×Ó: 132
- ÔÚÏß: 70.1Сʱ
- ³æºÅ: 7342866
- ×¢²á: 2017-10-22
- רҵ: ¹¤³ÌÈÈÎïÀíÏà¹Ø½»²æÁìÓò
2Â¥2023-11-06 10:11:15
QiaoPengyu
гæ (³õÈëÎÄ̳)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 29
- Ìû×Ó: 10
- ÔÚÏß: 2.9Сʱ
- ³æºÅ: 28904850
- ×¢²á: 2022-03-02
- רҵ: ¹¤³ÌÈÈÎïÀíÓëÄÜÔ´ÀûÓÃ
3Â¥2023-11-06 10:47:51













;
»Ø¸´´ËÂ¥
5