| 1 | 1/1 | 返回列表 |
| 查看: 521 | 回復(fù): 0 | ||
記得舊時(shí)好新蟲 (初入文壇)
|
[求助]
Fluent UDF 求助
|
|
目的:將計(jì)算的每一個(gè)迭代步的流量導(dǎo)出,并利用歐拉插值得到壓力值,并賦回給Fluent作為邊界條件,進(jìn)行下一個(gè)迭代步的計(jì)算,一直到計(jì)算收斂,該時(shí)間步結(jié)束。 問題:僅僅在第一個(gè)時(shí)間步的時(shí)候發(fā)現(xiàn)壓力利用歐拉迭代產(chǎn)生了變化,在之后的計(jì)算中壓力始終等于我賦的初值。求大牛解答這是為什么。 代碼如下: DEFINE_PROFILE(DFA_outlet,thread,position) { real NV_VEC(A),NV_VEC(FaceVel); double Q; face_t f; int i; real t=RP_Get_Real("flow-time" ;real tt; // define the time in one cycle real w=0.8; // period of a cycle real p1[100]; // define the pressure after R1 double R1,R2,C; // define electric modulus int TTS; // total time steps int h,TS; // time interval and time step R1=9.717571*pow(10,8),R2=3.849843*pow(10,9),C=3.712461*pow(10,-10); // set the values of electric modulus TTS=100; // total time steps begin_f_loop(f,thread) { NV_D(FaceVel,=,F_U(f,thread),F_V(f,thread),F_W(f,thread)); F_AREA(A,f,thread); Q=NV_DOT(FaceVel,A); //compute the pressure using the explicit Euler method h=w/TTS; tt=t-floor(t/w)*w; TS=floor(tt/h); p1[0]=12102.65-Q*R1; if(TS=0) F_PROFILE(f,thread,position)=p1[0]+Q*R1; else for(i=1;i<=TS;i++) { p1[TS]=p1[TS-1]+h*(Q-(p1[TS-1]-1333.22)/R2)/C; } F_PROFILE(f,thread,position)=p1[TS]+Q*R1; } end_f_loop(f,thread) } @月只藍(lán) @beefly 發(fā)自小木蟲Android客戶端 |
| 1 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 招調(diào)劑 +5 | 帆船哥 2026-03-04 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 302材料工程求調(diào)劑 +7 | Doleres 2026-03-01 | 8/400 |
|
|
[考研] 281電子信息求調(diào)劑 +5 | jhtfeybgj 2026-03-02 | 9/450 |
|
|
[考研] 070300化學(xué) 280 一志愿太原理工 求調(diào)劑 +8 | 拾玖壹 2026-03-04 | 8/400 |
|
|
[考研] 316求調(diào)劑 +3 | 林小星發(fā)大財(cái) 2026-03-04 | 3/150 |
|
|
[考研] 求調(diào)劑院校 +6 | 云朵452 2026-03-02 | 12/600 |
|
|
[考研] 312求調(diào)劑 +8 | 醋精華了一下發(fā)?/a> 2026-03-03 | 10/500 |
|
|
[考研] 材料專碩290求調(diào)劑 +3 | 杰尼龜aaa 2026-03-04 | 3/150 |
|
|
[考研] 085601 材料305分求助 +4 | 泡泡郵件 2026-03-03 | 6/300 |
|
|
[考研] 281求調(diào)劑 +3 | Y?l?h 2026-03-04 | 3/150 |
|
|
[考研]
|
旅行中的紫葡萄 2026-03-03 | 4/200 |
|
|
[考研] 291求調(diào)劑 +4 | Afy123456 2026-03-03 | 7/350 |
|
|
[考博] 26申博 求博導(dǎo) +3 | 愛讀書的小帥 2026-02-28 | 5/250 |
|
|
[碩博家園] 2025屆雙非化工碩士畢業(yè),申博 +4 | 更多的是 2026-02-27 | 5/250 |
|
|
[考研]
|
好好好1233 2026-02-28 | 16/800 |
|
|
[考研] 272求調(diào)劑 +9 | 材紫有化 2026-02-28 | 9/450 |
|
|
[考研] 0856求調(diào)劑285 +11 | 呂仔龍 2026-02-28 | 11/550 |
|
|
[考研] 303求調(diào)劑 +5 | 今夏不夏 2026-03-01 | 5/250 |
|
|
[考研] 272求調(diào)劑 +6 | 田智友 2026-02-28 | 6/300 |
|
|
[考博] 26申博 +4 | 想申博! 2026-02-26 | 6/300 |
|