²é¿´: 1681  |  »Ø¸´: 16
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

xiaoguai3

гæ (³õÈëÎÄ̳)

[ÇóÖú] ÐÂÊÖÇó½ÌUDFÎÊÌâ~

ÄܽâÊÍ£¬µ«Ò»Ìí¼Óµ½±ß½ç»ò³õʼ»¯¾Í±¨´í¡£
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()

ÎÒµÄUDFÈçÏ£¬¶þάģÐÍ£¬¼òµ¥µÄ¹ÌÌå´«ÈÈÎÊÌ⣬ÏëÔÚÄ£Äâ¹ý³ÌµÄͬʱÀÛ¼ÓÕû¸ö¹ÌÌåÇøÓòµÄËùÓеÃÈÈÁ¿£¬´ïµ½Ò»¶¨Öµºó¸Ä±äÈÈÁ÷±ß½çÖµ¡£ÓÉÓÚ¸Õ½Ó´¥UDF²»¾Ã£¬²»ÖªµÀÎÊÌâ³öÔںδ¦¡£ÇëÖ¸½Ì£¡d= Get_Domain(1);Õâ¸öÓï¾äÓÐÎÊÌâÂð£¿
#include "udf.h"
real Q_tot=0;
DEFINE_PROFILE (unsteady_heatflux, thread, position)
{
Domain *d;
real cp=880;
real density=2180;
real tempn, templ, volume, Q;
Thread *t;
cell_t c;
d= Get_Domain(1); /*Get the domain using Fluent utility *//*Loop over all cell threads in the domain*/
thread_loop_c(t,d) /*Compute Q */ /*Loop over all cells */
begin_c_loop(c,t)
{
real time= RP_Get_Real("flow-time";
real b=(int)(time/3600)+1;
int i=(int)((b-1)/24);
real Heat[3]={278.5, 280.7, 278.5};
volume=C_VOLUME(c,t); /* get cell volume */
templ=C_T_M1(c,t); /*Get cell tempertuare of previous step*/
tempn=C_T(c,t); /*Get cell tempertuare*/
Q=cp*density*volume*(tempn-templ);
Q_tot +=Q;
if (Q_tot<= Heat )
F_PROFILE(c,t,position)=60;
else F_PROFILE(c,t,position)=0;
}
end_c_loop(c,t)
}
»Ø¸´´ËÂ¥

» ±¾Ìû@֪ͨ

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

xiaoguai3

гæ (³õÈëÎÄ̳)

ÒýÓûØÌû:
3Â¥: Originally posted by kylafree at 2012-01-04 22:06:24:
real Q_tot=0;
real Heat[3]={278.5, 280.7, 278.5};

if (Q_tot<= Heat )
ÕâÀïÊÇÒ»¸öÊý×éºÍÒ»¸öÊýÔڱȴóСÂð£¿

²»ºÃÒâ˼£¬ÊÇÕâÑùµÄ
CODE:
#include "udf.h"
real Q_tot=0;
DEFINE_PROFILE (unsteady_heatflux, thread, position)
{
Domain *d;
real cp=880;
real density=2180;
real tempn, templ, volume, Q;
Thread *t;
cell_t c;
d= Get_Domain(1); /*Get the domain using Fluent utility *//*Loop over all cell threads in the domain*/
thread_loop_c(t,d) /*Compute Q */ /*Loop over all cells */
begin_c_loop(c,t)
{
real time= RP_Get_Real("flow-time";
real b=(int)(time/3600)+1;
int i=(int)((b-1)/24);
real Heat[3]={278.5, 280.7, 278.5};
volume=C_VOLUME(c,t); /* get cell volume */
templ=C_T_M1(c,t); /*Get cell tempertuare of previous step*/
tempn=C_T(c,t); /*Get cell tempertuare*/
Q=cp*density*volume*(tempn-templ);
Q_tot +=Q;
if (Q_tot<= Heat[i] )
F_PROFILE(c,t,position)=60;
else F_PROFILE(c,t,position)=0;
}
end_c_loop(c,t)
}

7Â¥2012-01-04 22:52:46
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 17 ¸ö»Ø´ð

wuming524

ר¼Ò¹ËÎÊ (ÖøÃûдÊÖ)

ʯ»¯Öû³æ

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
xiegangmai(½ð±Ò+1): лл²ÎÓ룡 2012-01-04 22:45:44
Â¥Ö÷̧̫¾Ù°³ÁË£¬³öÏÖÕâÖÖÎÊÌâÄãÐèÒª¼ì²éÄãµÄÓï¾ä£¬´ó¶à³öÏÖµ÷ÓÃÎÞЧÓï¾ä³öÏֵĴíÎó¡£±¾ÈËÒ²²»ÊÇÌ«¶®¡£´ý¸ßÈ˽â´ð°É~ºÃÔË¡£
2Â¥2012-01-04 22:06:19
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

kylafree

ÖÁ×ðľ³æ (ÖªÃû×÷¼Ò)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
xiegangmai(½ð±Ò+1): ¹ÄÀøÌÖÂÛ½»Á÷£¡ 2012-01-04 22:45:54
real Q_tot=0;
real Heat[3]={278.5, 280.7, 278.5};

if (Q_tot<= Heat )
ÕâÀïÊÇÒ»¸öÊý×éºÍÒ»¸öÊýÔڱȴóСÂð£¿
3Â¥2012-01-04 22:06:24
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

xiaoguai3

гæ (³õÈëÎÄ̳)

ÒýÓûØÌû:
3Â¥: Originally posted by kylafree at 2012-01-04 22:06:24:
real Q_tot=0;
real Heat[3]={278.5, 280.7, 278.5};

if (Q_tot<= Heat )
ÕâÀïÊÇÒ»¸öÊý×éºÍÒ»¸öÊýÔڱȴóСÂð£¿

²»ºÃÒâ˼´ò´íÁË£¬ÊÇif (Q_tot <= Heat )
Q_totÊǵÃÈÈÖ®ºÍ£¬ÓÉÏÂÇóµÃ
Q=cp*density*volume*(tempn-templ);
Q_tot +=Q;
4Â¥2012-01-04 22:15:32
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] ×ÊÔ´Óë»·¾³ µ÷¼ÁÉêÇë(333·Ö) +5 holy J 2026-03-21 5/250 2026-03-21 22:42 by Catalysis25
[¿¼ÑÐ] ²ÄÁÏÇóµ÷¼Á +5 @taotao 2026-03-21 5/250 2026-03-21 20:55 by lbsjt
[¿¼ÑÐ] ¹¤¿Æ0856Çóµ÷¼Á +3 ãåÎö͡͡ 2026-03-21 3/150 2026-03-21 18:30 by ѧԱ8dgXkO
[¿¼ÑÐ] 317Çóµ÷¼Á +9 Éê×ÓÉêÉê 2026-03-19 15/750 2026-03-21 17:31 by ѧԱ8dgXkO
[¿¼ÑÐ] ²ÄÁϹ¤³Ì£¨×¨£©Ò»Ö¾Ô¸985 ³õÊÔ335Çóµ÷¼Á +3 hiloiy 2026-03-17 4/200 2026-03-21 03:04 by JourneyLucky
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖйúʯÓÍ´óѧ£¨»ª¶«£© ±¾¿ÆÆë³¹¤Òµ´óѧ +3 ʯÄÜΰ 2026-03-17 3/150 2026-03-21 02:22 by JourneyLucky
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖØÇì´óѧ085700×ÊÔ´Óë»·¾³×¨Ë¶£¬×Ü·Ö308Çóµ÷¼Á +3 īīĮ 2026-03-18 3/150 2026-03-21 00:39 by JourneyLucky
[¿¼ÑÐ] 274Çóµ÷¼Á +10 S.H1 2026-03-18 10/500 2026-03-20 23:51 by JourneyLucky
[¿¼ÑÐ] Çóµ÷¼Á +3 eation27 2026-03-20 3/150 2026-03-20 19:32 by JourneyLucky
[¿¼ÑÐ] ¹¤¿Æ²ÄÁÏ085601 279Çóµ÷¼Á +7 À§ÓÚÐdz¿ 2026-03-17 9/450 2026-03-20 17:38 by ÎÞи¿É»÷111
[¿¼ÑÐ] ²ÄÁÏѧ˶318Çóµ÷¼Á +5 February_Feb 2026-03-19 5/250 2026-03-19 23:51 by 23Postgrad
[¿¼²©] É격26Äê +3 °Ë6°Ë68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[¿¼ÑÐ] 0703»¯Ñ§µ÷¼Á +4 18889395102 2026-03-18 4/200 2026-03-19 16:13 by 30660438
[¿¼ÑÐ] ²ÄÁϹ¤³Ìר˶µ÷¼Á +5 204818@lcx 2026-03-17 6/300 2026-03-18 22:55 by 204818@lcx
[¿¼ÑÐ] ¡¾Í¬¼ÃÈí¼þ¡¿Èí¼þ£¨085405£©¿¼ÑÐÇóµ÷¼Á +3 2026eternal 2026-03-18 3/150 2026-03-18 19:09 by ²«»÷518
[¿¼ÑÐ] 085601ר˶£¬×Ü·Ö342Çóµ÷¼Á£¬µØÇø²»ÏÞ +5 share_joy 2026-03-16 5/250 2026-03-18 14:48 by haxia
[¿¼ÑÐ] 334Çóµ÷¼Á +3 Ö¾´æ¸ßÔ¶ÒâÔÚ»úÐ 2026-03-16 3/150 2026-03-18 08:34 by lm4875102
[¿¼ÑÐ] 290Çóµ÷¼Á +3 p asserby. 2026-03-15 4/200 2026-03-17 16:35 by wangkm
[¿¼ÑÐ] ÖпÆÔº²ÄÁÏ273Çóµ÷¼Á +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[¿¼ÑÐ] 0856Çóµ÷¼Á +3 ÁõÃÎ΢ 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û