24小时热门版块排行榜    

查看: 1483  |  回复: 2
【悬赏金币】回答本帖问题,作者Kellyshuo将赠送您 35 个金币

Kellyshuo

新虫 (初入文坛)

[求助] fluent UDF源项编译通过后,初始化闪退,求大佬指点一二 已有1人参与

源项文件编译通过后,fluent初始化闪退代码见下:
#include "udf.h"
#include "math.h"
#define pre_exp 1.12e-05
#define active 29.16e+03
#define r 8.314
#define l 30e-06
#define mh2 2
define_source(h2_membrane_mass,c,t,ds,eqn)
{
        real a[nd_nd];
        real source;
        real pr,pm,t;
        real vol0,area0;
        real vol1,area1;
        face_t f;
        real id = 3.0 ;
        domain *d = get_domain(1);
        thread *thread_mem_f = lookup_thread(d,id);

                cell_t c0 = f_c0(f,thread_mem_f);
                cell_t c1 = f_c1(f,thread_mem_f);
                thread *tc0 = thread_t0(thread_mem_f);
                thread *tc1 = thread_t1(thread_mem_f);
                vol0 = c_volume(c0,tc0);
                f_area(a,f,tc0);
                area0 = nv_mag(a);
                t = c_t(c0,tc0);
                pr = c_p(c0,tc0) + 101325;
                pm = c_p(c1,tc1) + 101325;
                source = - area0*mh2*pre_exp*exp(-active/t)/(vol0*l)*(sqrt(pr)-sqrt(pm));
                return source;

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

lbj007

新虫 (小有名气)

【答案】应助回帖

这个ID值只能为整数吧,为啥赋予real类型
2楼2021-06-19 18:39:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

Kellyshuo

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by lbj007 at 2021-06-19 18:39:17
这个ID值只能为整数吧,为啥赋予real类型

int我也试过 还是一样的问题
3楼2021-06-21 11:58:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 Kellyshuo 的主题更新
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 085600材料与化工 求调剂 +9 enenenhui 2026-03-13 10/500 2026-03-14 18:24 by 2652041609
[考研] 297一志愿上交085600求调剂 +5 指尖八千里 2026-03-14 5/250 2026-03-14 17:26 by a不易
[考研] 【0703化学调剂】-一志愿华中师范大学-六级475 +5 Becho359 2026-03-11 5/250 2026-03-14 11:35 by 哦哦123
[考研] 材料调剂 +5 xxxcm 2026-03-08 8/400 2026-03-14 03:33 by JourneyLucky
[考研] 一志愿天大化工专调剂总分338 +3 蔡大美女 2026-03-08 3/150 2026-03-14 03:12 by JourneyLucky
[考研] 一志愿天津大学,英一数二305分求调剂,四六级已过 +8 小小番的茄 2026-03-09 8/400 2026-03-14 01:53 by JourneyLucky
[考研] 307求调剂 +7 超级伊昂大王 2026-03-10 7/350 2026-03-14 00:49 by JourneyLucky
[考研] 311求调剂 +8 zchqwer 2026-03-10 8/400 2026-03-14 00:01 by JourneyLucky
[考研] 332求调剂 +3 zjy101327 2026-03-11 6/300 2026-03-13 22:48 by JourneyLucky
[考研] 材料与化工求调剂一志愿 985 总分 295 +8 dream…… 2026-03-12 8/400 2026-03-13 22:17 by 星空星月
[考研] 一志愿中科大材料与化工。353分能调剂到哪? +5 MayUxw1 2026-03-08 11/550 2026-03-13 19:20 by MayUxw1
[考研] 314求调剂 +7 无懈可击的巨人 2026-03-12 7/350 2026-03-13 15:40 by JourneyLucky
[考研] 26考研求调剂 +5 丶宏Sir 2026-03-13 5/250 2026-03-13 13:05 by JourneyLucky
[考研] 304求调剂(085602一志愿985) +12 化工人999 2026-03-09 12/600 2026-03-13 12:02 by JourneyLucky
[考研] 282分材料专业求调剂院校 +18 枫桥ZL 2026-03-09 25/1250 2026-03-13 10:47 by 白夜悠长
[考研] 0856化工原理 +6 z2839474511 2026-03-10 6/300 2026-03-13 10:41 by houyaoxu
[考研] 274求调剂0856材料化工 +12 z2839474511 2026-03-11 13/650 2026-03-13 10:39 by peike
[考研] 085600 材料与化工 295 求调剂 +10 dream…… 2026-03-10 12/600 2026-03-12 13:46 by dream……
[考研] 调剂 +5 呵唔哦豁 2026-03-10 5/250 2026-03-10 22:00 by 28375m
[考研] 0817一志愿苏州大学280复试调剂 +9 kk扛 2026-03-07 9/450 2026-03-10 14:20 by peike
信息提示
请填处理意见