¸ÕÂòÁËһ̨·þÎñÆ÷£¬ÊÇ8·4ºËµÄÅäÖã¬ÏµÍ³Îªlinux £¬fluent6.3.26¡£µ÷ÊÔµÄʱºò£¬½«ÔÀ´ÔÚwindowsϵͳϵÄËãÀýÄùýÀ´²âÊÔ£¬½á¹û·¢ÏÖÐèÒªµ÷ÓÃudfµÄËãÀýÎÞ·¨ÔËÐС£±¾È˶ÔlinuxÁ˽â½ÏÉÙ£¬fluentÒ²ÊǸոÕÆð²½£¬Çë´ó¼Ò¶à¶àÖ¸½Ì¡£
¾ßÌå²Ù×÷²½ÖèÈçÏ£º
1. ½« windowsÏÂ×öºÃµÄcasºÍdatÎļþ£¬ÒÔ¼°udfÎļþ ÉÏ´«µ½·þÎñÆ÷¡£
2.ÔÚ shellÖÐÊäÈë "fluent 3d -t20" Æô¶¯fluentͼÐνçÃæ¡£
3. read¡ª¡ª case &data£¬ ½«Îļþ¶ÁÈë¡£Õâʱ±¨´í ¡° error£ºchip-exex: function "liq_gas_source" not found." Õâ¸ö¿ÉÄÜÊÇÓÉÓÚ´Ówindows¿¼¹ýÀ´µÄÎļþ£¬ÀïÃæ±àÒëudfÎļþµÄ·¾¶²»Ò»ÑùËùÖ¡£
4. ÎÒÔÚdefine----£¨user-defined£©¡ª¡ª¡ªfunctions-------(interpreted)ÖÐÖØÐÂÖ¸¶¨udfλÖã¬È»ºóinterpret¡£Õâʱ¾ÍÏÔʾ cpp -I"/public/fluent.inc/fluent6.3.26/src
error£º/root/Documents/udfcase/mass_evaporator.c: line 2: syntax error
5.Õâ¸öʱºòÎÒÔÚ¿ªÊ¼µü´ú£¬Ò²¿ÉÒÔË㣬µ«Êǽá¹ûÏ൱ÓÚûÓмÓudf¡£
6.ÎÒµÄudfÒ²ºÜ¼òµ¥£¬ÄÚÈÝÈçÏÂ
#include "udf.h"
DEFINE_MASS_TRANSFER(liq_gas_source,cell,thread,from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 343.15;
Thread *liq = THREAD_SUB_THREAD(thread, from_index);
Thread *gas = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.;
if (C_T(cell, liq) >= T_SAT)
{
m_lg = 0.1*C_VOF(cell,liq)*C_R(cell,liq)*
fabs(C_T(cell,liq)-T_SAT)/T_SAT;
}
if ((m_lg == 0. ) && (C_T(cell, gas) <= T_SAT))
{
m_lg = -0.1*C_VOF(cell,gas)*C_R(cell,gas)*
fabs(T_SAT-C_T(cell,gas))/T_SAT;
}
if(C_T(cell, liq)>T_SAT){
/* printf("\n m_dot_v=%g\n",m_dot_v);
printf("\n m_dot_v=%g\n",C_T(cell, liq)-T_SAT);*/
}
return (m_lg);
}
ÇëÎÊ£¬ ÈçºÎ²ÅÄÜÔÚÊÇudfÄÜÕý³£²¢ÐУ¿¡£ÁíÍâÕâÖֶ෷þÎñÆ÷ºÍ¶à½ÚµãclusterÔÀíÒ»ÑùÂ𣿠|