CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Difference in Session file on Windows and Linux

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 14, 2015, 17:57
Default Difference in Session file on Windows and Linux
  #1
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 429
Rep Power: 12
cfd seeker is on a distinguished road
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
cfd seeker is offline   Reply With Quote

Old   May 15, 2015, 04:33
Default
  #2
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 602
Rep Power: 13
Lance is on a distinguished road
Sounds more like a matlab problem than a cfx problem. The session files should be the same for both Linux and Windows.
Lance is offline   Reply With Quote

Old   May 15, 2015, 05:01
Default
  #3
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,832
Rep Power: 100
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Old   May 15, 2015, 05:05
Default
  #4
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 429
Rep Power: 12
cfd seeker is on a distinguished road
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 is offline   Reply With Quote

Old   May 15, 2015, 05:12
Default
  #5
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 429
Rep Power: 12
cfd seeker is on a distinguished road
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.
cfd seeker is offline   Reply With Quote

Old   May 15, 2015, 05:32
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,832
Rep Power: 100
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Old   May 15, 2015, 05:50
Default
  #7
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 429
Rep Power: 12
cfd seeker is on a distinguished road
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?
cfd seeker is offline   Reply With Quote

Old   May 15, 2015, 06:03
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,832
Rep Power: 100
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Old   May 15, 2015, 07:13
Default
  #9
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 429
Rep Power: 12
cfd seeker is on a distinguished road
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.
cfd seeker is offline   Reply With Quote

Old   May 15, 2015, 07:42
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,832
Rep Power: 100
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 16: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 05:31
read unformatted file in windows and linux autofly Main CFD Forum 7 August 11, 2004 03:24


All times are GMT -4. The time now is 01:40.