²é¿´: 2156  |  »Ø¸´: 5

yuzhuorong

гæ (³õÈëÎÄ̳)

[ÇóÖú] FluentÖбàдUDFÖ®ºóÎÞ·¨³õʼ»¯¡£¡£¡£ÒÑÓÐ1È˲ÎÓë

±¾ÈËÓÐÒ»¸ötxtÎļþ£¬µÚÒ»ÁÐΪλÖÃ×ø±êX£¨Îª¶¯×ø±êX=x-ct£©,µÚ¶þÁÐΪËÙ¶Èu£¬Ê×ÏȱàдUDF£¬Ê×ÏÈÒªµ¼Èëtxt£¬ÒÑÖªcµÄÖµ£¬²¢Áîx=0(СдµÄx)£¬µÃµ½t  vs   uµÄÁ½×éÊý£¬Ï£ÍûÓôË×÷ΪËÙ¶ÈÈë¿Ú£¨Ê±¿Ìtʱ£¬ËÙ¶ÈΪu£©£¬Ê±¼ä²½³¤Îª0.01£¬ÓÉÓÚÊýÁÐtµÄ±ä»¯¶¼±È0.01ҪС£¬ËùÒÔÔÚÄÚ²¿×öÁËÒ»¸öÑ­»·£¬µÃ³öÔÚ¼ÆË㵱ʱµÄFLOW_time Óët×î½Ó½üʱ£¬µÄuµÄÖµ×÷ΪËٶȡ££¨²»ÖªµÀÓÐûÓбíÊöÇå³þ£©£¬udf±àдÈçÏ£¬µ¼ÈëʱûÓгöÏÖ´íÎ󣬵«Êdzõʼ»¯µÄʱºò¾Í»á±¨´í£¬½ð±Ò²»¶à£¬µ«»¹ÏëÇë´óÉñÃÇ°ï°ïæ
j#include "udf.h"
#include <math.h>
#include "mem.h"
#include "dynamesh_tools.h"
#define c 0.2024607   //  cΪËÙ¶È
DEFINE_PROFILE(x_velocity1, t, i)
{
  int n,min;
  real time;
  double x[501],u[501],ts[501],tss[501],b[10000];
  FILE *fd;
  face_t f;
  fd=fopen("x_and_u.txt","r";
  if(!fd)  
  printf("can't open file\n";
  n=0;
  while(!feof(fd))
  {   
   fscanf(fd,"%lf",&x[n++],&u[n++]);   // ¶ÁÈë ´óдµÄX  ºÍ  u
  }
   fclose(fd);
  begin_f_loop(f,t)
{
   time=RP_Get_Real("flow-time";
   ts[n]=x[n]/c;                   //ÕâÀïµÄts´ú±í˵Ã÷ÖеÄt   X=x-ct
   for(n=0;500;n++) tss[n]=(ts[n]>time)?ts[n]-time:time-ts[n];  /////ÕÒ³öÓëtimeʱ¿Ì×î½Ó½üµÄtʱ¿Ì£¬È»ºóÈ¡Óõ±Ê±µÄu
   for(n=0;500;n++)  min=(b[n]<b[min])?i:min;
   F_PROFILE(f,t,i)=u[min];
         
  }
  end_f_loop(f,t)
}     


³õʼ»¯»á±¨´íError:
Fluent receivd fatal signal (ACCESS_VIOLATIN)
1Note exact events leading to error.
2Save case/date under new name.
3Exit program an restart to continue

ji
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

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

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

¾§ÁÖxz

½û³æ (СÓÐÃûÆø)

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
yuzhuorong: ½ð±Ò+10, ¡ï¡ï¡ïºÜÓаïÖú 2014-03-20 16:11:28
±¾ÌûÄÚÈݱ»ÆÁ±Î

» ±¾ÌûÒÑ»ñµÃµÄºì»¨£¨×îÐÂ10¶ä£©

2Â¥2014-03-20 10:14:02
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

yuzhuorong

гæ (³õÈëÎÄ̳)

Ëͺ컨һ¶ä
ÒýÓûØÌû:
2Â¥: Originally posted by ¾§ÁÖxz at 2014-03-20 10:14:02
ÄãÕâ¿Ï¶¨ÓÐÎÊÌâ°¡
´ò¿ªÎļþºó£¬ÎļþÖ¸ÕëÔÚÎļþµÄ×îºóÃ棬ÏêÇéÇë²Î¿¼CÓïÑÔÎļþ²Ù×÷£¡
1.´ò¿ªÎļþÖ®ºó£¬Ê×ÏÈÓ¦¸Ã°ÑÖ¸ÕëÖ¸ÏòºÏÊʵÄλÖ㨱ÈÈç˵µÚÒ»ÐлòÕßÆäËûÐУ©
2 ¶ÁȡÿһÐеÄÊý¾Ý£¨ÒÔ×Ö·û´®µÄÐÎʽ£©
3 ½«×Ö·û ...

Äܲ»ÄÜ´óÖ°ïÎÒ¸ÄÒ»¸Ä¡£¡£¡£²»Ì«»ácÓïÑÔ£¬ÊµÔڸ㲻¶®°¡¡£¡£¡£¡£
3Â¥2014-03-20 16:04:41
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

Êɻ갮²©²©

гæ (³õÈëÎÄ̳)

ÔÚµ¼ÈëUDF֮ǰ³õʼ»¯£¬³õʼ»¯ºóÔÙµ¼ÈëUDFÊÔÊÔ£¬¿´ÄÜ·ñ¼ÆËã
4Â¥2014-03-21 10:30:47
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

sky_lz

гæ (³õÈëÎÄ̳)

ÒýÓûØÌû:
4Â¥: Originally posted by Êɻ갮²©²© at 2014-03-21 10:30:47
ÔÚµ¼ÈëUDF֮ǰ³õʼ»¯£¬³õʼ»¯ºóÔÙµ¼ÈëUDFÊÔÊÔ£¬¿´ÄÜ·ñ¼ÆËã

µ¼ÈëUDF£¬³õʼ»¯Ò²²»±¨´í£¬µ«Ò»Ö±²»ÄÜÍê³É
5Â¥2016-03-25 20:33:31
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

²ÐÑôÃÈÉú

гæ (³õÈëÎÄ̳)

ÒýÓûØÌû:
5Â¥: Originally posted by sky_lz at 2016-03-25 20:33:31
µ¼ÈëUDF£¬³õʼ»¯Ò²²»±¨´í£¬µ«Ò»Ö±²»ÄÜÍê³É...

ÄúºÃ£¬ÎÒµ¼ÈëUDF£¬³õʼ»¯Ò²²»±¨´í£¬µ«Ò»Ö±²»ÄÜÍê³É£¬Õâ¸öÎÊÌâÄú½â¾öÁËÂð£¿Ö¸µ¼Ö¸µ¼Âð
6Â¥2017-03-17 19:52:41
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌøת ÎÒÒª¶©ÔÄÂ¥Ö÷ yuzhuorong µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍƼö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[˶²©¼ÒÔ°] ËÄÏß³ÇÊй«°ì¸ßУÎÞ±àor¶þÏß³ÇÊÐÃñ°ì¸ßУ +13 joshhartford 2024-12-20 30/1500 2024-12-22 08:20 by joshhartford
[½Ìʦ֮¼Ò] ΪɶºÜ¶à¸ßУÀÏʦ²»Ô¸Òâµ±¸±Ôº³¤£¿ +9 ÒâµÃ¼­_editage 2024-12-18 10/500 2024-12-22 07:25 by llhljsy
[˶²©¼ÒÔ°] ½ñÌìÊÇ¿¼ÑеĵÚÒ»Ìì +5 l4q8i@6n 2024-12-21 8/400 2024-12-22 06:47 by cx265
[ÂÛÎÄͶ¸å] Required Reviews Completed +6 ¿¹þ¹þ 2024-12-20 7/350 2024-12-22 06:28 by ¿¹þ¹þ
[Ö°³¡ÈËÉú] ¹úÆó¡¢ÃñÆóÐÐÒµ²»Í¬£¬ÈçºÎ¾öÔñ£¿ +3 haihe623 2024-12-19 5/250 2024-12-21 21:42 by haihe623
[ÕÒ¹¤×÷] »¯Ñ§²©Ê¿ +4 ʵÃûÐĶ¯¹úÃñÃÈÊ 2024-12-17 6/300 2024-12-21 16:43 by Marrvel
[˶²©¼ÒÔ°] ÕÐƸ²©Ê¿ +7 ´ó·¢²ÆÊ÷ 2024-12-18 8/400 2024-12-21 16:17 by yanjiaming
[½Ìʦ֮¼Ò] ½ñÄêµÄ¿ÆÑм¨Ð§Ö»½±ÀøQ1ÁË +12 holypower 2024-12-20 17/850 2024-12-21 16:13 by willbuilder
[½Ìʦ֮¼Ò] 40¶àËêµÄ½ÌʦΣ»ú¸ÐºÜÇ¿°¡ (½ð±Ò+5) +21 farmer1999 2024-12-16 28/1400 2024-12-21 16:07 by willbuilder
[½Ìʦ֮¼Ò] ѧУÅÅÃû¿¿Ç°·¢Õ¹ºÃ£¬×î´óµÄÊÜÒæÕßÊÇУÁìµ¼»¹ÊÇÆÕͨÀÏʦ£¿ +6 akslis2024 2024-12-17 7/350 2024-12-21 11:22 by Á賿һµã393
[½Ìʦ֮¼Ò] ÔÚѧУÊÇÌá°Î³É´¦³¤ÄѶȴó»¹ÊǽÌÊÚÄѶȴó +8 akslis2024 2024-12-17 11/550 2024-12-21 10:43 by 328838485
[˶²©¼ÒÔ°] ¶ÁÑÐÖ®ºó·¢ÏÖ: Ȧ×Ó±äµÃÔ½À´Ô½Ð¡ÁË... +12 ¶¡¿ÂÏèѼ 2024-12-19 16/800 2024-12-20 16:36 by sophiemyn
[ÂÛÎÄͶ¸å] Transportation Research Part C Ͷ¸åÄ£°å 5+3 Yetzirah 2024-12-20 4/200 2024-12-20 16:32 by ±±¾©À³ÒðÈóÉ«
[ÂÛÎÄͶ¸å] Molecular Crystals and Liquid CrystalsͶ¸å8¸öÔÂûÓÐÐÅÏ¢ +4 Êé½£Èç·ç 2024-12-17 12/600 2024-12-20 04:40 by ÅÖÅֵĴóº£
[»ù½ðÉêÇë] ³ýÁËÆÀÖ°³Æ£¬³ýÁË¿¼ÆÀ£¬Äã¶ÔÉç¿ÆÏîÄ¿ÊÇʲô̬¶È£¿ +9 xinrenxf 2024-12-16 15/750 2024-12-19 11:31 by cwwqt
[¿¼²©] Ãñ°ì¸ßУÕÐƸ +3 ´ó·¢²ÆÊ÷ 2024-12-18 3/150 2024-12-18 18:40 by xzxu2012
[¿¼²©] ÓÐδ¾ÍÒµµÄ²©Ê¿Âð +4 ´ó·¢²ÆÊ÷ 2024-12-17 4/200 2024-12-18 14:13 by ËýÔÚѧϰ
[¿¼²©] ÕÐÊÕ2025¼¶²©Ê¿ +3 cake1 2024-12-15 5/250 2024-12-18 10:59 by cake1
[½Ìʦ֮¼Ò] ÎҸоõѧÉúˮƽºÜ²î£¬ËæËæ±ã±ã¹¤×ÊÉÏÍò +19 guilin2018 2024-12-15 23/1150 2024-12-18 08:57 by zxf984
[¹«Åɳö¹ú] Òâ´óÀûÅÁ¶àÍß´óѧÕÐÊÕCSC²©Ê¿Éú--¹âµç´ß»¯²ÄÁÏÔÚÐÂÄÜÔ´¼°¿É³ÖÐøÂÌÉ«»¯Ñ§·½Ïò +3 huangyuxing2 2024-12-16 3/150 2024-12-17 18:25 by zhizhan127
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û