| 查看: 1426 | 回复: 16 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
新手求教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) } |
» 本帖@通知
» 猜你喜欢
寻求一种能扛住强氧化性腐蚀性的容器密封件
已经有7人回复
到新单位后,换了新的研究方向,没有团队,持续积累2区以上论文,能申请到面上吗
已经有8人回复
申请2026年博士
已经有6人回复
请问哪里可以有青B申请的本子可以借鉴一下。
已经有5人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有5人回复
2025冷门绝学什么时候出结果
已经有7人回复
请问有评职称,把科研教学业绩算分排序的高校吗
已经有6人回复
Bioresource Technology期刊,第一次返修的时候被退回好几次了
已经有7人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
UDF载入fluent之后出错,求指点!
已经有7人回复
UDF遇到的问题求解
已经有8人回复
向大虾求教,这个UDF怎么了
已经有8人回复
求助:UDF模型的编译问题
已经有15人回复
【求助】UDF编译出现的问题
已经有6人回复
【求助】udf读取混合物密度失败、及平均流速读取?
已经有8人回复
【求助】单机多核fluent并行udf
已经有13人回复
【求助】求UDF高手帮忙看看我的问题
已经有18人回复
【求助】Warning: incorrect cg motion UDF value on zone 35
已经有5人回复
【求助】udf出错
已经有13人回复
【答案】应助回帖
★ ★
感谢参与,应助指数 +1
xiegangmai(金币+2): 谢谢应助! 2012-01-08 22:58:47
感谢参与,应助指数 +1
xiegangmai(金币+2): 谢谢应助! 2012-01-08 22:58:47
|
可能你想法错了。边界条件部分不应该跟累加传热量的循环放在一起,这样的实际效果跟你想的是不一样的。 还有边界条件设定时应该用begin-f-loop 建议修改成如下形式试试 #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*/ 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}; thread_loop_c(t,d) /*Compute Q */ /*Loop over all cells */ begin_c_loop(c,t) { 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; } end_c_loop(c,t) } begine_f_loop(c,t,) { if (Q_tot<= Heat ) F_PROFILE(c,t,position)=60; else F_PROFILE(c,t,position)=0; } end_f_loop |
11楼2012-01-08 21:11:19
13楼2012-01-09 10:42:57
14楼2012-01-09 10:45:24
16楼2012-01-09 19:16:54













;
回复此楼