|
[Sponsors] |
April 21, 2014, 07:59 |
How to Start ANSYS CFD-POST from MATLAB?
|
#1 |
Member
Join Date: Apr 2012
Location: Mainz, Germany
Posts: 60
Rep Power: 14 |
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. |
|
April 22, 2014, 07:06 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
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.
|
|
April 22, 2014, 08:43 |
|
#3 | |
Member
Join Date: Apr 2012
Location: Mainz, Germany
Posts: 60
Rep Power: 14 |
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. |
||
April 22, 2014, 09:43 |
|
#4 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
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 |
|
April 23, 2014, 12:00 |
|
#5 | |
Member
Join Date: Apr 2012
Location: Mainz, Germany
Posts: 60
Rep Power: 14 |
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. |
||
July 12, 2014, 10:01 |
|
#6 |
New Member
Jacob
Join Date: Apr 2014
Posts: 23
Rep Power: 12 |
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?
|
|
May 14, 2015, 10:25 |
|
#7 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
@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 |
|
May 15, 2015, 07:57 |
|
#8 | |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
Quote:
The above commands(syntax) is working for me on Linux but not on Windows. Any suggestions how I can implement it on windows? |
||
May 15, 2015, 08:02 |
|
#9 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Didn't I just answer this question on your other thread? http://www.cfd-online.com/Forums/cfx...ows-linux.html
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Learn ANSYS ICEM CFD | easy_astronaut | ANSYS | 2 | December 15, 2013 16:34 |
Parallel process & CFD POST | jypark | FLUENT | 2 | August 15, 2013 00:49 |
Using ICEM CFD to repair/edit ANSYS Meshing | Kaaji1359 | ANSYS | 2 | July 30, 2013 11:28 |
Difference between ANSYS CFD & CFD | solamy | ANSYS | 3 | October 21, 2010 17:06 |
Free UK seminars: ANSYS CFD software | Gavin Butcher | CFX | 0 | November 23, 2004 10:13 |