| 3 | 1/1 | 返回列表 |
| 查看: 1044 | 回復(fù): 2 | ||
akqinmian金蟲 (小有名氣)
|
[求助]
fluent單機(jī)多核并行版本變化物性參數(shù)UDF求助
|
|
求教各位大俠,小弟寫的隨溫度變化的材料參數(shù)和發(fā)熱源項(xiàng)的UDF ,由于遠(yuǎn)程使用別人的工作站(沒(méi)有裝VC),單機(jī)單核用解釋的方式導(dǎo)入沒(méi)有問(wèn)題,單機(jī)多核情況下總是報(bào)錯(cuò),要不就是迭代開始就卡死,沒(méi)反應(yīng)。 求教各位,如果如何改寫為并行版本? 小弟計(jì)算機(jī)底子不行,用戶說(shuō)明關(guān)于這部分的內(nèi)容反復(fù)讀也不太理解,幫助里也沒(méi)有這樣的例子。 #include "udf.h" DEFINE_PROPERTY(vis, cell, thread) { real temperature, nd; temperature = C_T(cell, thread); { if (temperature >=553.15 && temperature<=618.15) nd=-0.0000000000116472*pow(temperature,3)+0.0000000203453*pow(temperature,2)-0.0000122063*temperature+0.00259719; else if (temperature >618.15 && temperature<=632.15) nd=-0.000000000069519*pow(temperature,3)+0.000000127294*pow(temperature,2)-0.0000780956*temperature+0.0161298; else if (temperature >632.15 && temperature<=648.15) nd=-0.000000000454378*pow(temperature,3)+0.000000861208*pow(temperature,2)-0.00054462*temperature+0.114982; else if (temperature>648.15 && temperature<=656.55) nd=-0.0000000130651*pow(temperature,3)+0.0000254502*pow(temperature,2)-0.0165263*temperature+3.57745; else if (temperature>656.55 && temperature<=662.55) nd=-0.0000000110287*pow(temperature,3)+0.0000221444*pow(temperature,2)-0.01482*temperature+3.30587; else if (temperature>662.55 && temperature<=667.95) nd=-0.0000000039237*pow(temperature,3)+0.00000786908*pow(temperature,2)-0.00526079*temperature+1.17243; else if (temperature>667.95 && temperature<=674.35) nd=-0.000000000571417*pow(temperature,3)+0.00000116031*pow(temperature,2)-0.000785453*temperature+0.177281; else if (temperature>674.35 && temperature<=683.15) nd=-0.000000000132212*pow(temperature,3)+0.0000002727*pow(temperature,2)-0.000187513*temperature+0.0430127; else if (temperature>683.15 && temperature<=693.15) nd=-0.0000000000362821*pow(temperature,3)+0.0000000763507*pow(temperature,2)-0.0000535492*temperature+0.0125458; else if (temperature>693.15 && temperature<=765.15) nd=-0.00000000000256198*pow(temperature,3)+0.00000000579822*pow(temperature,2)-0.00000433921*temperature+0.00110355; else if (temperature>765.15 && temperature<=823.15) nd=-0.000000000000214632*pow(temperature,3)+0.000000000530378*pow(temperature,2)-0.000000398162*temperature+0.000120633; else nd=0.0; } return nd; #include "udf.h" DEFINE_SOURCE(cell_y_source1,c, t, dS, eqn) { real source; real x[ND_ND]; real z; C_CENTROID(x, c, t); z=x[2]; if(z>=0 && z<0.08) source = 1.96617E+08; else if(z>=0.08 && z<0.24) source = 1.94500E+08; else if(z>=0.24 && z<0.40) source = 1.89151E+08; else if(z>=0.40 && z<0.56) source = 2.10398E+08; else if(z>=0.56 && z<0.72) source = 2.43178E+08; else if(z>=0.72 && z<0.88) source = 3.19465E+08; else if(z>=0.88 && z<1.04) source = 3.93218E+08; else if(z>=1.04 && z<1.20) source = 4.65868E+08; else if(z>=1.20 && z<1.36) source = 5.30883E+08; else if(z>=1.36 && z<1.52) source = 5.63514E+08; else if(z>=1.52 && z<1.68) source = 5.75473E+08; else if(z>=1.68 && z<1.84) source = 5.54165E+08; else if(z>=1.84 && z<2.00) source = 5.08562E+08; else if(z>=2.00 && z<2.16) source = 4.70529E+08; else if(z>=2.16 && z<2.32) source = 4.20242E+08; else if(z>=2.32 && z<2.48) source = 3.56882E+08; else if(z>=2.48 && z<2.64) source = 3.11648E+08; else if(z>=2.64 && z<2.80) source = 2.77573E+08; else if(z>=2.80 && z<2.96) source = 2.51141E+08; else if(z>=2.96 && z<3.12) source = 2.29009E+08; else if(z>=3.12 && z<3.28) source = 2.16346E+08; else if(z>=3.28 && z<3.44) source = 2.07810E+08; else if(z>=3.44 && z<3.60) source = 2.13757E+08; else if(z>=3.60 && z<3.68) source = 2.23299E+08; else source =0.0; dS[eqn] = 0.0; return source; } |
| 3 | 1/1 | 返回列表 |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
百度網(wǎng)盤 |
360云盤 |
千易網(wǎng)盤 |
華為網(wǎng)盤
在新窗口頁(yè)面中打開自己喜歡的網(wǎng)盤網(wǎng)站,將文件上傳后,然后將下載鏈接復(fù)制到帖子內(nèi)容中就可以了。 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0703化學(xué)調(diào)劑 ,六級(jí)已過(guò),有科研經(jīng)歷 +14 | 曦熙兮 2026-03-15 | 14/700 |
|
|---|---|---|---|---|
|
[考研] 本人考085602 化學(xué)工程 專碩 +20 | 不知道叫什么! 2026-03-15 | 22/1100 |
|
|
[考研] 0805 316求調(diào)劑 +3 | 大雪深藏 2026-03-18 | 3/150 |
|
|
[考研] 求調(diào)劑 +5 | 十三加油 2026-03-21 | 5/250 |
|
|
[考研] 一志愿南大,0703化學(xué),分?jǐn)?shù)336,求調(diào)劑 +3 | 收到VS 2026-03-21 | 3/150 |
|
|
[考研] 材料 271求調(diào)劑 +5 | 展信悅_ 2026-03-21 | 5/250 |
|
|
[考研] 求調(diào)劑 +6 | Mqqqqqq 2026-03-19 | 6/300 |
|
|
[考研] 316求調(diào)劑 +6 | 梁茜雯 2026-03-19 | 6/300 |
|
|
[考研] 070300化學(xué)319求調(diào)劑 +7 | 錦鯉0909 2026-03-17 | 7/350 |
|
|
[考研] 材料工程(專)一志愿985 初試335求調(diào)劑 +3 | hiloiy 2026-03-17 | 4/200 |
|
|
[考研] 求調(diào)劑 +3 | Ma_xt 2026-03-17 | 3/150 |
|
|
[考研] 311求調(diào)劑 +5 | 冬十三 2026-03-18 | 5/250 |
|
|
[考研] 274求調(diào)劑 +10 | S.H1 2026-03-18 | 10/500 |
|
|
[考研] 考研調(diào)劑求學(xué)校推薦 +3 | 伯樂(lè)29 2026-03-18 | 5/250 |
|
|
[考研] 288求調(diào)劑 +16 | 于海海海海 2026-03-19 | 16/800 |
|
|
[考研] 260求調(diào)劑 +3 | 朱芷琳 2026-03-20 | 3/150 |
|
|
[考研] 廣西大學(xué)家禽遺傳育種課題組2026年碩士招生(接收計(jì)算機(jī)專業(yè)調(diào)劑) +3 | 123阿標(biāo) 2026-03-17 | 3/150 |
|
|
[考研] 085410人工智能專碩317求調(diào)劑(0854都可以) +4 | xbxudjdn 2026-03-18 | 4/200 |
|
|
[考研]
|
胡辣湯放糖 2026-03-15 | 6/300 |
|
|
[考研] 生物學(xué)071000 329分求調(diào)劑 +3 | 我愛(ài)生物生物愛(ài)?/a> 2026-03-17 | 3/150 |
|