CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Difference in Session file on Windows and Linux (https://www.cfd-online.com/Forums/cfx/153009-difference-session-file-windows-linux.html)

cfd seeker May 14, 2015 17:57

Difference in Session file on Windows and Linux
 
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

Lance May 15, 2015 04:33

Sounds more like a matlab problem than a cfx problem. The session files should be the same for both Linux and Windows.

ghorrocks May 15, 2015 05:01

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.

cfd seeker May 15, 2015 05:05

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?

cfd seeker May 15, 2015 05:12

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.

ghorrocks May 15, 2015 05:32

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.

cfd seeker May 15, 2015 05:50

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?

ghorrocks May 15, 2015 06:03

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.

cfd seeker May 15, 2015 07:13

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.

ghorrocks May 15, 2015 07:42

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.


All times are GMT -4. The time now is 04:42.