scheme language in fluent

scheme language in fluent

ID:14428308

大小:937.00 KB

页数:34页

时间:2018-07-28

scheme language in fluent_第1页
scheme language in fluent_第2页
scheme language in fluent_第3页
scheme language in fluent_第4页
scheme language in fluent_第5页
资源描述:

《scheme language in fluent》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、PERAGlobal,ShanghaiProgramminginFLUENTwithSchemeLanguageAboutSchemeAdialectofLISP,averyoldprogramminglanguage.Itsgrammarisverysimpleanditscommandshaveageneralformlike:(CommandName,argument1,argument2….).TheSchemeCommandinFLUENT:1)Runsimulationprocessesa

2、utomatically(Journalfile) 2)ExtendtheInterfaceofFluent.BasicGrammarofScheme1.ArithmeticFunctions+-*/,entsprichtUPN,mehrals2Argumentemöglich:>(+245)11>(/63)2>(/2);;similarto(/12)0.5(absx),(sqrtx),(exptxy)[=xy],(expx)[=ex],(logx)[=lnx],(sinx),(cosx),(atan

3、x),(atanxy)[=arctan(x/y)],…Integer(!)-Functions:>(remainder456)3>(modulo52)1(truncatex),(roundx),(ceilingx),(floorx),...(maxxy...),(minxy...)>(applymax'(15834));;findthemaximuminalist8BasicGrammarofScheme2.GlobalandLocalVariablesGlobalvariabledefintion:

4、>(definex3)>(+x1)4Nodifferenceinvariabletypes(integer,real,string)..Changingvariablevaluesisnotpossibleinfunctions,whichonlylocalvarialbesarevalid:(set!x1)tochangevariablevalues(displayx)or(writex)tooutputvariablevaluesInteger(2),Float(2.5),Boolean(#tfü

5、rtrue,#ffalse)Strings("thisisatextstring")andSymbols:'symbol,forexample.:(definex'this-is-a-symbol)Globalvariablesandself-definedfunctionsarevaliduntiltheendofFluent.LokaleScheme-VariablenLocalvarabledefinition:(let((var1value1)(var2value2)...);;variabl

6、esarevalidonlyinthisscope )BasicGrammarofScheme3.“Format“command>(format#f"formatvar1andvarlikeprintfinC,..."var1var2...)Tilde(~)isusedinsteadof%:~ageneralformat(Stringswithout"")~dInteger~04dalways4digitswithenough0before(5wirdzu0005)~ffloatingnumber~4

7、.2f1.2->1.20~sStringwith""(format#f"string:~s!""text")becomesstring:"text"!UsingSchemeinFLUENTThereareafewofwaystocallschemeinFLUENT.1.InputthecommandinthetextinterfaceUsingSchemeinFLUENTThereareafewofwaystocallschemeinFLUENT.Theschemecommandcanbealsoin

8、putinmenu“Solve/Execute-Commands”,whichwillbeexecutedbyeachiterationortimestep.UsingSchemeinFLUENTThereareafewofwaystocallschemeinFLUENT.CallinFLUENTmenuusing“File/Read/Scheme”toreada.scmfile.Iftheschemefileissavedas.fluentandint

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。