How to Start ANSYS CFD-POST from MATLAB?
Hello Guys,
I want to write a code in matlab which starts ansys cfd-post, loads the result file and then loads the session file. I will really appreciate any help from you guys. Steps: 1) Start CFD-Post 2) Load .res file 3) Load .cse file Thanks. |
Load up CFD-Post and record a session file. Do the actions you describe and the commands to do it get recorded in the session file. Then you have a text file for the session file you can edit to do whatever you want.
|
Quote:
I did the same. Now I a have a session file (say Session2.cse) which 1) loads the result file, 2) then performs all tasks (such as goemetry spilt-up and storing values in another .txt file) and 3) then quits CFX-Post. But my problem remains the same. I can use system() command in matlab to start CFX-POST. But then how do I load the Session2.cse file which performs the three steps. Is there a command I can give from matlab or run the .cse file or any command line that loads the session file in CFX-Post Thanking you in anticipation. |
cfdpost accepts the following arguments:
[-gui|-line|-batch <file>] [-report <option> [-outdir <dir>] [-name <name>]] [-graphics ogl|mesa] [-state <statefile>] [-session <sessionfile>] [-display <display>] [-multiconfig single|separate|last] [-help] [-v] so, Code:
cfdpost -session my_session_file.cse |
Quote:
Initially I wrote this code in Matlab: status=system('cd /ansys_inc/v145/CFD-Post/bin/'); status=system('&cfdpost -line); This opened a command promt of CFX in Matlab where again I had to type CFX< readsession filename=Session_final.cse I wanted to avoid this as it became manual entering of command. But then with your help I used the below code which worked perfectly fine. status=system('cd /ansys_inc/v145/CFD-Post/bin/'); status=system('cfdpost -session Session_final.cse'); This automatically does everything I wanted. Thanks for your help. |
I am trying to do the same as you, however my MATLAB won't connect the two system() commands. When I run them I get an error: cfdpost not valid command. As if it is trying to run cfdpost from a regular cmd that hasn't navigated to the cfdpost folder, even though I told it to on the line before. Any ideas?
|
@Lance @Juzer
Can you guys tell me if there is any difference between the session file created on Linux platform and Windows? do the session file created on Linux should work on Windows PC also? Best Regards |
Quote:
The above commands(syntax) is working for me on Linux but not on Windows. Any suggestions how I can implement it on windows? |
Didn't I just answer this question on your other thread? http://www.cfd-online.com/Forums/cfx...ows-linux.html
|
All times are GMT -4. The time now is 05:29. |