|
[Sponsors] |
Difference in Session file on Windows and Linux |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 14, 2015, 18:57 |
Difference in Session file on Windows and Linux
|
#1 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
Hi everyone
I have recorded a session file on Linux PC in CFD Post. Now I am trying to change this session file through a MATLAB code which automatically reads .res file, appends session file according to new .res file and write a new session file in the directory. This new session file will then be loaded in the CFD Post(through the same MATLAB code) and post processing will be done for the new case(.res file). This procedure seems to work fine on the Linux system but when I am trying to do this on Windows PC, its not working. Apparently dlmcell used in the code to convert cell array to text file(new session file of new case) is not able to write the new session file correctly. But I don't know clearly what's wrong here. Is it due to the fact that the I am trying to use session file created on Linux platform on Windows platform? Is there any difference between the session files created on Linux and Windows? Anybody has any idea about it? Thanks in advance. Best Regards |
|
May 15, 2015, 05:33 |
|
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
Sounds more like a matlab problem than a cfx problem. The session files should be the same for both Linux and Windows.
|
|
May 15, 2015, 06:01 |
|
#3 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
The only difference I am aware of in session files between windows and linux is the file paths. Other than that they should be the same.
I presume dlmcell is a matlab thing as I have never heard of it before. In that case I suspect Lance is right, sounds like a matlab problem. |
|
May 15, 2015, 06:05 |
|
#4 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
Thanks Lance and ghorrocks for your reply.
@ghorrocks Can you please explain a bit what do you mean by "file paths" ? Do I need to append the file path inside the session file(created on Linux) if I have to use it on Windows? |
|
May 15, 2015, 06:12 |
|
#5 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
Also when I am trying to access CFD Post through MATLAB on Windows PC using the following commands:
status=system('C:\Program Files\ANSYS Inc\v145\CFD-Post\bin'); status=system('&cfdpost -session Session_file.cse'); MATLAB is giving me an error: The "C: \ Program" command is either misspelled or could not be found. "&" cannot be syntactically processed at this point. Any idea what's wrong here? Although this syntax is working fine on Linux. |
|
May 15, 2015, 06:32 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
File path is C:\Program Files\etc on windows and /bin/whatever in linux.
Your second post is suggesting matlab is interpreting the "\" as a special character. Have a look in the matlob doco about how to handle this. |
|
May 15, 2015, 06:50 |
|
#7 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
Thnaks for your reply.
But I think MATLAB is not intrpreting "\" as special character because I have input the system command as arguments. Also when I am trying to do like this: status=system('C:\Program Files\ANSYS Inc\v145\CFD-Post\bin\cfdpost'); status=system('session Session_final_output.cse'); I mean taking cfdpost command in upper line, this is starting cfdpost but then nothing happens and cfdpost is not loading the session file..any further ideas from anybody? |
|
May 15, 2015, 07:03 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
You need to put the command line in quotes because it has spaces in it.
To find the correct syntax, go to the command line and type C:\proga and hit tab (for file completion). Then continue to generate the full path - and it will show you the correct syntax for referring to file paths with spaces in them. |
|
May 15, 2015, 08:13 |
|
#9 |
Senior Member
Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 20 |
can you explain what do you mean by command line in quotes?
and well the status=system('session Session_final_output.cse'); the syntax(with spaces) working fine on Linux. |
|
May 15, 2015, 08:42 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Open up a windows command line. Type:
c:\Program Files\ANSYS Inc\v145\CFD-Post\bin\cfdpost.exe It will fail with the same error message you reported before. Now put it in quotes: "c:\Program Files\ANSYS Inc\v140\CFD-Post\bin\cfdpost.exe" And it will work. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dual Boot Windows and Linux and Go Open Source | andyj | Main CFD Forum | 2 | October 21, 2010 17:49 |
Installation of OpenFOAM-1.6 on Ubuntu 9.10 | marval | OpenFOAM Installation | 2 | March 17, 2010 09:33 |
Windows EXE file and Linux | MING | Main CFD Forum | 4 | October 22, 2004 06:31 |
read unformatted file in windows and linux | autofly | Main CFD Forum | 7 | August 11, 2004 04:24 |