最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

你可以定制自己的Fluent界面!

2023-08-27 12:41 作者:Dearanwen  | 我要投稿


Fluent可以實現(xiàn)界面定制




使用scheme語言可以之間對Fluent界面進行修改定制,同時這種語言還可以鏈接到UDF中,和UDF進行交互



使用方法:

1. 新建txt文檔,寫好scheme語言的腳本,將后綴名更改為.scm格式




2. 打開Fluent,點擊左上角file-read-Scheme




3. 讀取Scheme文件,然后會在界面顯示代碼定制的內(nèi)容。

比如y+計算器就可以直接在Fluent界面顯示




和之前文章四十五、壁面函數(shù)理論及y+的確定小程序結果對比,基本相同




下面是這個Y+計算器的代碼:


代碼經(jīng)過復制粘貼之后格式好像就變了,我試了一下,復制到txt文檔,不能正常使用,這里還是貼出來給大家參考。


代碼源文件我會放在文章末尾的鏈接中,也會放在群文件,供大家使用




(define apply-cb #t)

(define update-cb #f)


;事件函數(shù)


(define (apply-cb . args)

? ?(display "")

)


(define (update-cb . args)

? (cx-set-real-entry real1 1.0);默認主流速度

? (cx-set-real-entry real2 1.215);密度

? (cx-set-real-entry real3 1.8e-5);粘度

? (cx-set-real-entry real4 0.5);特征長度

? (cx-set-real-entry real5 1.0);y+


)


(define (click . args)

? ?(define density (cx-show-real-entry real2))

? ?(define velocity (cx-show-real-entry real1))

? ?(define mu (cx-show-real-entry real3))

? ?(define length (cx-show-real-entry real4))

? ?(define ypl (cx-show-real-entry real5))


? ?(define re ( / ( * length ( * density velocity)) mu))

? ?(define cf (/ 0.026 (expt re (/ 1 7))))

? ?(define iwall (* 0.5 (* velocity (* velocity (* cf density)))))

? ?(define ufric (sqrt (/ iwall density)))

? ?(define DeltaS (* 2 (/ (/ (* ypl mu) ufric ) density )))

? ?(cx-set-real-entry real6 DeltaS)

? ?(cx-set-real-entry real7 re)

)





;界面布局

(define yplus (cx-create-panel "y+計算器" apply-cb update-cb))

(define table1 (cx-create-table yplus "Data Inputs"))

(define real1 (cx-create-real-entry table1 "Velocity(m/s):" 'row 0))

(define real2 (cx-create-real-entry table1 "Density(kg/m3):" 'row 1))

(define real3 (cx-create-real-entry table1 "Viscosity(Pa*s):" 'row 2))

(define real4 (cx-create-real-entry table1 "Length(m):" 'row 3))

(define real5 (cx-create-real-entry table1 "YPlus:" 'row 4))



(define button1 (cx-create-button yplus "Calculate" 'activate-callback click 'row 1))


(define table2 (cx-create-table yplus "Data Outputs") 'row 2)

(define real6 (cx-create-real-entry table2 "DeltaS(m):" 'row 1))

(define real7 (cx-create-real-entry table2 "Re:" 'row 2))



(cx-show-panel yplus)





https://pan.baidu.com/s/19LUcQJSPzGvuFWCbV4Q5Eg?pwd=b3s3?

提取碼:b3s3



公眾號:Fluent學習筆記。為了方便大家學習交流,我創(chuàng)建了QQ群:863690217,大家可以在其中討論相關的問題,同時我會將所有文章的源文件都放到QQ群中,還會放一些其它的學習文件。歡迎大家加入。


你可以定制自己的Fluent界面!的評論 (共 條)

分享到微博請遵守國家法律
房产| 昌吉市| 通海县| 招远市| 崇阳县| 横峰县| 河南省| 崇仁县| 大庆市| 饶阳县| 博野县| 马公市| 聂荣县| 庆城县| 高陵县| 商城县| 天镇县| 涪陵区| 名山县| 夏邑县| 余庆县| 东海县| 屯门区| 沅江市| 孝义市| 福泉市| 蚌埠市| 吴旗县| 五河县| 利辛县| 贵溪市| 佛坪县| 安庆市| 峨眉山市| 卢氏县| 广平县| 广饶县| 察隅县| 乌兰浩特市| 墨玉县| 苏州市|