Windows 下 Fluent gambit脚本.doc_第1页
Windows 下 Fluent gambit脚本.doc_第2页
Windows 下 Fluent gambit脚本.doc_第3页
Windows 下 Fluent gambit脚本.doc_第4页
Windows 下 Fluent gambit脚本.doc_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Windows 下 Fluent 启动脚本 收藏 Windows 下 Fluent 启动脚本,直接启动实际的程。现在的问题是 license 无法使用,不知道启动管理程序做了什么手脚。暂时先保留现有的脚本代码。 目前的脚本代码:echo offset FLUENT_INC=D:GSFluent.Incset FLUENT_ARCH=ntx86set FLUENT_REVISION=26set SEEMPATH=%FLUENT_INC%ntbinntx86;%FLUENT_INC%fluent6.3.26lib;%FLUENT_INC%fluent6.3.26clientlib;%FLUENT_INC%fluent6.3.26cortexlibset USER_LOCAL=u:set FLUENT_HELP=%FLUENT_INC%nthelpmain.hlpset PATH=%FLUENT_INC%ntbinntx86;%FLUENT_INC%ntbinntx86opengl;%FLUENT_INC%fluent6.3.26vkintx86;%FLUENT_INC%licensentx86;%PATH%set FLUENT_PROD=fluentset FLUENT_PROD_DIR=%FLUENT_INC%fluent6.3.26set FLUENT_ADDONS=%FLUENT_INC%addonsREM cd %FLUENT_INC%ntbinntx86set LM_LICENSE_FILE=%FLUENT_INC%licenselicense.dat%FLUENT_INC%fluent6.3.26ntx863dfl6326s.exe pause 错误信息:No such feature existsFeature: flLicense path: D:GSFluent.Inclicenselicense.datFLEXlm error: -5,357For further information, refer to the FLEXlm End User Manual,available at .Hit return to exit. 错误原因:PROD 拼写错误,修正即可 错误信息:Error: wta(1st) to string_appendError Object: ()Error: wta(1st) to string_appendError Object: () 现象:程序菜单加载错误,无法确定版本(如 2d) 此时的问题是无法使用 fluent 的模型,但是 scheme 解释器还能用,以后可以用来调试一些与模型无关的脚本。Windows 下 Gambit 启动脚本 收藏 Windows 默认的启动程序是 %FLUENT_INC%ntbinntx86gambit.exe ,但这只是一个启动管理器,不是实际的 gambit 的程序。真正的 gambit 程序位于 %FLUENT_INC%gambit2.3.16ntx86gambit.exe ,现在需要做的是试着直接启动这个程序。 启动前需要完成的工作:1 设置一些环境变量,包括 Fluent 目录,Exceed 路径等。2 启动 Exceed3 启动 Gambit下面给出调试过程的错误信息:gambit.exe -new -id 333set PATH=%PATH;D:GSFluent.Incgambit2.3.16ntx86xdllgambit.exe -new -id 333* FLUENT_INC not defined, cannot continue.FATAL ERROR: Could not obtain valid license authorization.Total of 0.00 cpu second(s), 101720 maximum memory.Received exception: SIGSEGV (segmentation violation)Please send the GAMBIT.2156/jou and GAMBIT.2156/trn files to your localFluent office or distributor. Also send a message including anyrelevant errors or warnings you see above in this window. You maywish to delete the temporary directory GAMBIT.2156 after sending theabove files.ERROR: Please retain a copy of the GAMBIT.2156/jou, GAMBIT.2156/trn, andGAMBIT.2156/*.dbs files, any imported geometry and any relevanterrors or warnings you see above in this window and contactsupport at your local Fluent office or distributor.This application has requested the Runtime to terminate it in an unusual way.Please contact the applications support team for more information.set FLUENT_INC=D:GSFluent.Incgambit.exe -new -id 333* FLUENT_ARCH not defined, cannot continue.FATAL ERROR: Could not obtain valid license authorization.Total of 0.01 cpu second(s), 101720 maximum memory.Received exception: SIGSEGV (segmentation violation)Please send the GAMBIT.2820/jou and GAMBIT.2820/trn files to your localFluent office or distributor. Also send a message including anyrelevant errors or warnings you see above in this window. You maywish to delete the temporary directory GAMBIT.2820 after sending theabove files.ERROR: Please retain a copy of the GAMBIT.2820/jou, GAMBIT.2820/trn, andGAMBIT.2820/*.dbs files, any imported geometry and any relevanterrors or warnings you see above in this window and contactsupport at your local Fluent office or distributor.This application has requested the Runtime to terminate it in an unusual way.Please contact the applications support team for more information. set DISPLAY=localpcgambit.exe -new -id hello -dev OPENGambit build SP2006032921.Unable to open display set DISPLAY=localpc:2gambit.exe -new -id hello -dev OPENGambit build SP2006032921.Cannot open connect stream.TRANS(SocketINETGetAddr): tnamebysocket() failedTRANS(SocketINETConnect): TRANS(SocketINETGetAddr) () failedTRANS(Open): transport open failed for tcp/localpc:2Unable to open display set DISPLAY=hu-7dc9623579ca:0.0gambit.exe -new -id hello -dev OPENGambit build SP2006032921.Warning : The current transport does not permit the attempted TCPIP connection.TRANS(SocketINETGetAddr): tnamebysocket() failedTRANS(SocketINETConnect): TRANS(SocketINETGetAddr) () failedTRANS(Open): transport open failed for tcp/hu-7dc9623579ca:0Unable to open display 解决诸多的问题之后,获得需要的启动脚本。Fluent Scheme 脚本收集 收藏 1 添加菜单项 (Text Mode)(define ti-flab-iterate (lambda () (display Hello World!) )(define flowlab-menu (make-menu flowlab (iterate #t ti-flab-iterate Iterate.) )(define add-menu (lambda (name menu test value help) (ti-menu-insert-item! menu (make-menu-item name test value help) ) #t )(add-menu flowlab/ main-menu #t flowlab-menu ) 2 输出当前的迭代次数和参数(define (export-niters fname parameter) (let ( (niter (%iterate 0) (out-port (open-file fname w) ) (if (not out-port) (cx-error-dialog unable to open output file for exporting niters) ) (format out-port $a = a% parameter niter) (flush-output-port out-port) ) ) 3 字符串处理;takes any string as argument str, breaks it on the basis of blank-space or;newline character into multiple strings. These multiple strings are returned;as a list. (define (tokenizer str) (let ( (l (string-list str) (result () (delimitters (list #space #newline #) #() (started? #f) (temp () ) (for-each (lambda (c) (if started? (if (not (memv c delimitters) (set! temp (append temp (list c) (begin (set! result (append result (list (list-string temp) (set! temp () (set! started? #f) ) ) (if (not (memv c delimitters) (begin (set! temp (append temp (list c) (set! started? #t) ) ) ) ) l ) (if started? (set! result (append result (list (list-string temp) ) ) result ) 4 自动保存,记录输出信息的迭代脚本; iterate.scm;(define casename coal_inj_00)(define iternum 500);(define hy-start-transcript (lambda (filename) (if (file-exists? filename) (remove-file filename) #t ) (ti-start-transcript filename #t) #t );(define (hy-stop-transcript) (if transcript-open? (stop-transcript #t) #t ) #t);(define (log-exec-proc exec-proc trn-file) (begin (hy-start-transcript trn-file) (exec-proc) (newline) (hy-stop-transcript) );(define my-iterate (lambda (num) (if (number? num) (begin (read-case-data casename) (iterate num) (write-case-data (format #f a-ia casename num) #t ) #f ) );(log-exec-proc (lambda () (my-iterate iternum) (string-append casename .trn) 5 读取 report 文件中的数值; ; ;(define (hy-read-rp-file filename) (let (p (open-input-file (format #f a filename) (do (x (read p) (read p) ( (or (number? x) (eof-object? x) (close-input-port p) (if (number? x) x #f) ) ) ) 6 读取数据到 list 中(define hy-read-data-to-list (lambda (fname) (let (p (open-input-file (format #f a fname) (let f (x (read p) (l () (if (or (eof? p) (eof-object? x) (begin (close-input-port p) l ) (begin (display x) (newline) (if (number? x) (set! l (append l (list x) ) (f (read p) l) ) ) ) ) ) 7 导出 bc 信息(define (hy-export-bc-names) (for-each (lambda (name) (display (format #f a, a, a,n (zone-name-id name) name (zone-type (get-zone name) ) ) ) (inquire-zone-names) ) 8 显示 list 内容;(define hy-display-list (lambda (l) (do (i 0 (+ i 1) (= i (length l) (display (format #f a - an i (list-ref l i) ) ) 9 非稳态计算时自动保存脚本; Scheme file to autosave files at a particular time interval, ;(modify by LiuGuoqing ,email=/email) ;original: FLUENT Online Technical Support Solution 656 :Autosave at specified time intervals ; Usage: ; To use the scheme file to save files at a given time interval, ; 0. Read case and data files, then read autosave.scm through File Read Scheme ; 1. Open the Execute Commands panel in the GUI (SolveExecute Commands) ; 2. Increase the number of Defined Commands by ; 3. Click ON next to the most recent command and select Time Step ; next to the drop down arrow under When ; 4. Enter the following text in the field under Command: ; (autowrite wcd autoname- 0.2) ; 5. Enter the compression status below. Change only the text between the quotation marks. ; For compressed files use .gz ; For uncompressed files use (define g_zip ) ; ; The value of 0.2 should be replaced with the desired interval for the current case ; The value of wcd should be replaced with ; wd for data files only ; wcd for case and data files ; The value of autoname- should be replaced with the actual pathname+filename : ; if it is written in current directory,pathname can be omitted. ;default setting (define g_filename auto-) (define g_wcom wd) (define (writefiles current-time) (let* (time-string) (writecommand) (rpsetvar autowrite/last-file-time current-time) (set! writecommand (string-append g_wcom g_filename g_zip) (ti-menu-load-string writecommand) ) ) (define (au

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论