24小时热门版块排行榜    

查看: 2790  |  回复: 5

barcezp

新虫 (初入文坛)

[求助] 编写流量入口随时间变化的UDF 已有1人参与

定义的是流量入口,在稳态模拟后,想定义入口流量速度从 4kg/s降到0之后保持不变。。。初学者,看了几天也没摸着门道。
回复此楼

» 猜你喜欢

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

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

dayu7973

铁虫 (初入文坛)

【答案】应助回帖

感谢参与,应助指数 +1
DEFINE_PROFILE(mass_inlet,t,i)
{
face_t f;
real current_time, mass, total_time;
current_time = CURRENT_TIME;
total_time=xx;
if (current_time<total_time)
{
    mass=4*(1-current_time/total_time);
}
else
{
    mass=0;
}
F_PROFILE(f,t,position) = mass;
}

大致就这么个样子,我没调试,你可以编译调试一下试试
2楼2015-04-06 23:20:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dayu7973

铁虫 (初入文坛)

最后一行 F_PROFILE(f,t,position) = mass; 改为F_PROFILE(f,t,i) = mass;
3楼2015-04-06 23:22:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaobu178

铁虫 (初入文坛)

引用回帖:
2楼: Originally posted by dayu7973 at 2015-04-06 23:20:19
DEFINE_PROFILE(mass_inlet,t,i)
{
face_t f;
real current_time, mass, total_time;
current_time = CURRENT_TIME;
total_time=xx;
if (current_time<total_time)
{
    mass=4*(1-current_time/total ...

请问楼主解决这个问题了吗
4楼2015-09-28 15:52:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaobu178

铁虫 (初入文坛)

引用回帖:
2楼: Originally posted by dayu7973 at 2015-04-06 23:20:19
DEFINE_PROFILE(mass_inlet,t,i)
{
face_t f;
real current_time, mass, total_time;
current_time = CURRENT_TIME;
total_time=xx;
if (current_time<total_time)
{
    mass=4*(1-current_time/total ...

请问楼主解决这个问题了吗
5楼2015-09-28 15:52:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaobu178

铁虫 (初入文坛)

引用回帖:
3楼: Originally posted by dayu7973 at 2015-04-06 23:22:09
最后一行 F_PROFILE(f,t,position) = mass; 改为F_PROFILE(f,t,i) = mass;

请问CURRENT TIME代表的是什么时间啊
6楼2015-09-28 15:53:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 barcezp 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 307求调剂 +5 wyyyqx 2026-03-01 5/250 2026-03-01 15:21 by Fff-1
[考研] 材料学硕318求调剂 +5 February_Feb 2026-03-01 7/350 2026-03-01 15:21 by jxstnuZYX
[考研] 303求调剂 +4 今夏不夏 2026-03-01 4/200 2026-03-01 14:46 by 嘟嘟小浣熊
[考研] 课题组接收材料类调剂研究生 +3 gaoxiaoniuma 2026-02-28 4/200 2026-03-01 14:30 by jjj三跨
[考研] 295复试调剂 +3 简木ChuFront 2026-03-01 3/150 2026-03-01 14:27 by zzxw520th
[考研] 材料学调剂 +8 提神豆沙包 2026-02-28 10/500 2026-03-01 14:14 by peike
[考研] 0856化工专硕求调剂 +6 董boxing 2026-03-01 6/300 2026-03-01 12:45 by houyaoxu
[考研] 0856材料专业298分有科研经历 硕士研究生调剂自荐信 +6 zyf上岸 2026-03-01 6/300 2026-03-01 12:43 by liqiongjy
[考研] 调剂 +3 简木ChuFront 2026-02-28 3/150 2026-03-01 11:46 by 王伟要上岸啊
[考研] 材料类求调剂 +8 wana_kiko 2026-02-28 8/400 2026-03-01 11:44 by 王伟要上岸啊
[考研] 高分子化学与物理调剂 +5 好好好1233 2026-02-28 9/450 2026-03-01 10:59 by fengyu211
[考研] 311求调剂 +9 南迦720 2026-02-28 10/500 2026-03-01 10:55 by sunny81
[考研] 0856求调剂285 +6 吕仔龙 2026-02-28 6/300 2026-03-01 10:03 by wang_dand
[考研] 298求调剂 +5 axyz3 2026-02-28 5/250 2026-03-01 06:45 by 刘兵
[考研] 307求调剂 +4 73372112 2026-02-28 6/300 2026-03-01 00:04 by ll247
[考研] 292求调剂 +3 yhk_819 2026-02-28 3/150 2026-02-28 21:57 by gaoxiaoniuma
[考博] 26申博 +4 想申博! 2026-02-26 4/200 2026-02-28 21:37 by limorning
[考研] 085600材料工程一志愿中科大总分312求调剂 +8 吃宵夜1 2026-02-28 10/500 2026-02-28 20:27 by L135790
[高分子] 求环氧树脂研发1名 +3 孙xc 2026-02-25 11/550 2026-02-28 16:57 by ichall
[硕博家园] 【博士招生】太原理工大学2026化工博士 +4 N1ce_try 2026-02-24 8/400 2026-02-26 08:40 by N1ce_try
信息提示
请填处理意见