24小时热门版块排行榜    

查看: 3239  |  回复: 12
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

zzh19920530

新虫 (小有名气)

[求助] 给fluent换背景颜色,温度梯度值为什么不显示了 已有3人参与

给fluent换背景颜色,温度梯度值为什么不显示了,之前fluent的背景颜色是浅蓝色的,但是后来我把背景颜色换成了白色的,然后我温度云图里的温度梯度值就没了,如下图所示。还能把温度梯度值调回来吗?

给fluent换背景颜色,温度梯度值为什么不显示了
bai.png


给fluent换背景颜色,温度梯度值为什么不显示了-1
lan.png
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

1049484471

新虫 (初入文坛)

【答案】应助回帖

感谢参与,应助指数 +1
求助,下面的程序是什么意思?中间的数据我省略了,谢过!



/**************************************************************************************
   UDF: for specifying a time-dependent velocity profile boundary condition:
   u(t) - interpolated via cubic spine from measurements by Traykovski
                                            written by Houshuo Jiang on August 17, 2006
***************************************************************************************/

#include "udf.h"

DEFINE_PROFILE(unsteady_flow, thread, position)
{

  /* ttt[]: sampled times */
  /* u[]: sampled streamwise flow velocity */
  /* d2_u_dt2[]: calculated 2nd time derivative of u */
  /* start time =      0.12499359 , end time =    602.12499000 */

  static real ttt[4817]=
  {
0.00000000E+00, 0.12499430E+00, 0.24999865E+00, 0.37499294E+00, 0.49999729E+00,
0.62500164E+00, 0.74999593E+00, 0.87500029E+00, 0.99999461E+00, 0.11249989E+01,
0.12500033E+01, 0.13749976E+01, 0.14999919E+01, 0.16249962E+01, 0.17500006E+01,
0.18749949E+01, 0.19999992E+01, 0.21249935E+01, 0.22499978E+01,
};
static real u[4817]=
  {
0.29486706E+00, 0.25832370E+00, 0.22072441E+00, 0.18439429E+00, 0.14780788E+00,
0.11332307E+00, 0.80134080E-01, 0.49663854E-01, 0.21209121E-01,-0.60646123E-02,
-0.28923945E-01,-0.49841599E-01,-0.66707764E-01,-0.79936611E-01,-0.88913036E-01,
0.26710739E+00, 0.27723406E+00, 0.28560768E+00, 0.29210729E+00, 0.29621414E+00,
0.29912153E+00, 0.30260917E+00
  };

  static real d2_u_dt2[4817]=
  {
0.85972525E-01,-0.17194505E+00, 0.19746624E+00,-0.13169408E+00, 0.23201899E+00,
0.10576336E-01, 0.22222984E+00, 0.14550020E+00,-0.31192043E-01, 0.43361966E+00,
-0.82670364E-02, 0.34437811E+00, 0.18666827E+00, 0.30615838E+00, 0.22151801E+00,
0.29484003E+00, 0.38174390E+00, 0.11195380E+00, 0.17885390E+00, 0.26852023E+00,
0.21346864E+00, 0.30599166E-01, 0.10479063E+00, 0.10472997E+00,-0.22994860E-01,
0.16925363E-01,-0.11893041E+00,-0.12963144E+00,-0.57996749E-01,-0.38344444E-01,
-0.23898451E+00,-0.79638780E-01,-0.11563157E+00,-0.17745479E+00,-0.93369114E-01,
0.90338604E-01,-0.45169302E-01
  };

  int n=4817;

  /* variables for the cubic spline algorithm */
  int klo,khi,k;
  real h,a,b;

  /* variables for printing out messages */

  /* variables for the FLUENT UDF settings */
  face_t ft;
  real t, xvelocity;
  t = CURRENT_TIME;

  /* By means of bisection to locate the right place for t in the table */
  klo=1;
  khi=n;
  while (khi-klo > 1)
  {
     k=(khi+klo) >> 1;
     if (ttt[k-1] > t) khi=k;
     else klo=k;
  }
  /* klo and khi now bracket the input value of t. */

  /* Transfer from unit-offset to zero-offset. */
  klo=klo-1;
  khi=khi-1;
  
  h=ttt[khi]-ttt[klo];
  a=(ttt[khi]-t)/h;
  b=(t-ttt[klo])/h;

  /* Cubic spline polynomial is now evaluated to obtain the velocity at time t. */
  xvelocity = a*u[klo]+b*u[khi]+((a*a*a-a)*d2_u_dt2[klo]+(b*b*b-b)*d2_u_dt2[khi])*(h*h)/6.0;
  
  Message("current time = %15.8e s, u = %15.8e m/s\n", t, xvelocity);  /* \n denotes a new line */

  begin_f_loop(ft, thread)
  {
    F_PROFILE(ft, thread, position) = xvelocity;
  }
  end_f_loop(ft, thread)
}


/*****************************************************************
UDF for volume-integrating k and epsilon, for calculating the total
volume, and for writing them into a file.

Exporting U,W at a cell about 50cm above the ripple crest to a
file.
                      written by Houshuo Jiang on August 25, 2006.
******************************************************************/

DEFINE_ON_DEMAND(tke_epsilon_pointuw)
{
   real sum_tke=0.0, sum_epsilon=0.0, sum_volume=0.0;
   real flowtime, xx[ND_ND];
   real x0_ripple=-0.39102757, x1_ripple=0.37087719;  /* define the two sides of the ripple interested */
   real cellx0=0.0450395, cellx1=0.05541;             /* define the streamwise bound of the cell */
   real cellz0=-0.2933, cellz1=-0.2639;               /* define the vertical bound of the cell */
   real cellu=0.0,cellw=0.0,cellcentroidx=0.0,cellcentroidz=0.0;
   
   Domain *d;  /* declare domain pointer since it is not passed as an argument to the DEFINE macro */
   Thread *t;
   cell_t c;

   FILE *fp1, *fp2;

   d = Get_Domain(1);  /* returns fluid domain pointer */

   flowtime = CURRENT_TIME;

   /* Integrate TKE, epsilon, and export the cell variables */
   thread_loop_c(t,d)
   {
     begin_c_loop(c,t)
        C_CENTROID(xx,c,t)
        if ((xx[0]>x0_ripple) && (xx[0]<x1_ripple))
        {
           sum_tke += C_K(c,t)*C_VOLUME(c,t);
           sum_epsilon += C_MU_EFF(c,t)/C_R(c,t)*C_STRAIN_RATE_MAG(c,t)*C_STRAIN_RATE_MAG(c,t)*C_VOLUME(c,t);
           sum_volume += C_VOLUME(c,t);
        }

        if ( ( (xx[0]>cellx0) && (xx[0]<cellx1) ) && ( (xx[1]>cellz0) && (xx[1]<cellz1) ) )  
        {
           cellu = C_U(c,t);
           cellw = C_V(c,t);
           cellcentroidx = xx[0];
           cellcentroidz = xx[1];
        }
     end_c_loop(c,t)
   }

   fp1 = fopen("TKE_epsilon_vs_t.dat","a";   /* open a file named TKE_epsilon_vs_t.dat in append mode and assign it to fp1 */
   fprintf(fp1,"%15.8e %15.8e %15.8e %15.8e\n", flowtime,sum_volume,sum_tke,sum_epsilon);
   fclose(fp1);

   fp2 = fopen("pointUW_vs_t.dat","a";   /* open a file named pointUW_vs_t.dat in append mode and assign it to fp2 */
   fprintf(fp2,"%15.8e %15.8e %15.8e %15.8e %15.8e\n", flowtime,cellu,cellw,cellcentroidx,cellcentroidz);
   fclose(fp2);

   Message(" Success!";
}
3楼2015-03-28 20:04:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 13 个回答

1049484471

新虫 (初入文坛)

fluent里边怎么变换背景啊?
2楼2015-03-28 19:58:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

1049484471

新虫 (初入文坛)

【答案】应助回帖

求助:
怎样将UDF文件导入到fluent中运行调用啊?
4楼2015-03-28 20:05:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

luogangv

木虫 (小有名气)

【答案】应助回帖

感谢参与,应助指数 +1
你是不是把温度值也设置成白色了?
5楼2015-03-29 09:36:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[博后之家] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 gy1nBQXYQJqL 2026-08-29 5/250 2026-08-29 21:22 by 4qO8zhfjr2AX
[论文投稿] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +3 gy1nBQXYQJqL 2026-08-29 4/200 2026-08-29 18:15 by 4FFAWE8HcgUD
[博后之家] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +6 ASdOkHsho7FD 2026-08-28 7/350 2026-08-29 17:31 by 4FFAWE8HcgUD
[考博] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +5 ASdOkHsho7FD 2026-08-28 8/400 2026-08-29 17:22 by 4FFAWE8HcgUD
[硕博家园] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +5 ASdOkHsho7FD 2026-08-28 9/450 2026-08-29 14:03 by jCd0dEvKHShX
[公派出国] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 ASdOkHsho7FD 2026-08-28 4/200 2026-08-29 14:02 by jCd0dEvKHShX
[找工作] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 ASdOkHsho7FD 2026-08-28 6/300 2026-08-29 11:51 by jCd0dEvKHShX
[教师之家] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +4 ASdOkHsho7FD 2026-08-28 5/250 2026-08-29 11:49 by jCd0dEvKHShX
[考研] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +4 ASdOkHsho7FD 2026-08-28 6/300 2026-08-29 11:40 by jCd0dEvKHShX
[找工作] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +4 ASdOkHsho7FD 2026-08-28 6/300 2026-08-29 11:29 by jCd0dEvKHShX
[基金申请] 中青基了要发朋友圈吗? +3 349506619 2026-08-28 3/150 2026-08-29 10:49 by 木风9012
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[教师之家] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +4 ASdOkHsho7FD 2026-08-28 7/350 2026-08-29 09:26 by G6APbkg8SA6w
[基金申请] 基金系统什么内容也没有 30+4 winsaint 2026-08-27 9/450 2026-08-28 11:06 by maolC
[文学芳草园] 梦想 +3 myrtle 2026-08-26 3/150 2026-08-27 10:01 by angelyueyi
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 10+3 majunge000 2026-08-26 11/550 2026-08-27 08:42 by 北京莱茵编辑
[基金申请] 2026年8月25日国自然放榜前突然收到列入评审专家邮件,有关系吗? +25 木水思豆 2026-08-25 28/1400 2026-08-26 14:53 by draco1987
[基金申请] 明天应该可查了!? +6 chengyan1220 2026-08-23 6/300 2026-08-25 19:45 by zfd97
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
[基金申请] 如果此刻你正在为国基感到焦虑,不妨来听听这首《基金之外》 +8 scalable 2026-08-24 8/400 2026-08-25 12:52 by jnhyjjm
信息提示
请填处理意见