CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

File Creation Problem in Windows

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By arjun
  • 1 Post By MauricioAguilar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2016, 07:32
Default File Creation Problem in Windows
  #1
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
Hello Foamers,

I'm having trouble running the chtmultiRegionSimpleFoam/multiRegionHeaterradiation tutorial because Windows doesn't allow certain characters in files. So the simulation can't create a file with a ":".

I get the following error:

--> FOAM FATAL ERROR:
Couldn't create directory "/home/ofuser/workingDir/Desktop/heatTransfer/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/300/coarse:bottomAir"

From function bool Foam::mkDir(const Foam::fileName&, mode_t)
in file POSIX.C at line 579.

FOAM exiting

Does anyone know how to get around this?
I tried creating the file manually in windows and in the Linux environment and its puts up a protocol error. Even creating the file in the Linux directory and then copying to windows in not allowed.

kind regards,

Mauricio
MauricioAguilar is offline   Reply With Quote

Old   July 27, 2016, 07:47
Default
  #2
New Member
 
Join Date: Oct 2014
Posts: 26
Rep Power: 11
teuk is on a distinguished road
Hi MauricioAguilar,

this is a OS restriction. Why don't you use something like "_" instead of ":".

Why is it necessary to have a ":" in the filename?


regards,
teuk
teuk is offline   Reply With Quote

Old   July 27, 2016, 07:48
Default
  #3
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
Hi teuk,

I'm not setting the name file my self, its generated from the FOAM code.
I'm not sure where to change this so it uses some other character, us just plain avoid using any special character
MauricioAguilar is offline   Reply With Quote

Old   July 27, 2016, 08:00
Default
  #4
New Member
 
Join Date: Oct 2014
Posts: 26
Rep Power: 11
teuk is on a distinguished road
Hi MauricioAguilar,

Okay now I get it.

But the name must be derived from some names you used to setup your case. Is mayby one of your regions or boundarys called coarse:bottomAir?

The name (coarse:bottomAir) is related to your case.


regards,
teuk
teuk is offline   Reply With Quote

Old   July 27, 2016, 08:21
Default
  #5
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
I couldn't find such a name explicitly stated in any of the files. I'll keep looking but I get the impression that its related with the Radiation View Factors.
Perhaps it calculates a rough/coarse view factor list and stores is in a file aptly named coarse:bottomAir.
If you figure it our please let me know.
Thanks.
MauricioAguilar is offline   Reply With Quote

Old   July 29, 2016, 12:45
Default File name with colons ":" invalid on Windows OS
  #6
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
Dear Foamers,

I can't run the simulation because the chtMultiRegionSimpleFoam will attempt to create a file with colons ":" in the title.
In Linux this would be fine but Windows is making a fuzz about this. I tried scanning through foam code to see if I could easily fix this but I couldn't find how this pathName is set.

The error I get is :

FOAM FATAL ERROR:
Couldn't create directory "/home/ofuser/workingDir/Desktop/OFbox1/box1/50/coarse:Air"

From function bool Foam::mkDir(const Foam::fileName&, mode_t)
in file POSIX.C at line 579.

FOAM exiting


I couldn't find in POSIX.C where this is set, but I think its set as a reference to fileName and previously to Name
---line 429, 444.

I'm possitive this coarse:Name file comes from the Radiation coupling because other solvers haven't created this kind of pathName.

This can be replicated by running the tutorial in heattrasnfer>chtMultiRegionSimpleFoam > multiRegionHeaterRadiation

I would greatly appreciate any suggestions as this has prevented me from even running my simulation, even less checking if its properly set up.

regards,

Mauricio
MauricioAguilar is offline   Reply With Quote

Old   August 1, 2016, 10:32
Default
  #7
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
Update on the subject:

This invalid pathName is generated by calling the radiation model : viewFactor.

I still have not found a solution but changing the model to "none" allows to run the simulation.

I will continue to investigate this and post updates.

EDIT: also needed to change the coupling interface to turbulentTemperatureCoupledBaffleMixed; so afterall it may not be just due to the radiation model.
MauricioAguilar is offline   Reply With Quote

Old   September 16, 2016, 09:12
Default
  #8
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
I had forgotten to update this thread.
The problem originated from using the OpenFoam windows version which uses a linux kernel on VM.
Long story short, I set up Fedora on Vbox and I was able to simulate. The simulations never resulted in any filenames with ":" so I assume its a temporary storage solution from viewFactorGen that clashes with windows character restrictions.
For anyone having the same issue I recommend to avoid using the windows adaptation of OF.

EDIT: I just noticed that viewFactor.C has the "coarse:"mesh_.name() part of the code in lines 242 and 302 that was giving me problems in windows. If your adamant in using that OF version you could recompile with a different concatenation...perhaps "coarse-"mesh.name()

My advice: go Linux

Last edited by wyldckat; September 18, 2016 at 18:12. Reason: merged posts from 2 threads on the same topic
MauricioAguilar is offline   Reply With Quote

Old   September 18, 2016, 18:05
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Mauricio,

Yes, unfortunately on Windows we have three major problems with file names and paths, which on Linux we don't:
  1. Files with colons ":" cannot be used on Windows, because this is the character used for establishing the drive letter, e.g. "C:".
  2. Files with upper and lower case names, such as "K" and "k", which can also happen with the chtMultiRegion*Foam solvers.
  3. File paths that are longer than 260 characters, which is mostly a problem when it comes to build OpenFOAM from source code directly on Windows, not for running the cases.
For the ports of OpenFOAM that I work on, namely the ones under the blueCFD-Core project, we are aware of this problem and have a bug report open for the problems 1 and 2 that I listed: https://github.com/blueCFD/Core/issues/1

I'm still not 100% certain of which is the best naming convention we should use on Windows, given that the colons separator is akin to the "namespace" separator that is used on C++, namely "::".


Either way, Mauricio, it would be useful to know which OpenFOAM version, port or variant that you're using, so that the respective project can be warned about this problem as well.

Telling this to the people on the OpenFOAM Foundation might not be worth while, given that Windows and Mac OS X are not supported at all, precisely due to issues like these... namely where the operating system is standing in the way and there is no clean solution for this, given that the limitation is on the operating system itself.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 18, 2016, 22:06
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Greetings Mauricio,

Yes, unfortunately on Windows we have three major problems with file names and paths, which on Linux we don't:
  1. Files with colons ":" cannot be used on Windows, because this is the character used for establishing the drive letter, e.g. "C:".
  2. Files with upper and lower case names, such as "K" and "k", which can also happen with the chtMultiRegion*Foam solvers.
  3. File paths that are longer than 260 characters, which is mostly a problem when it comes to build OpenFOAM from source code directly on Windows, not for running the cases.
For the ports of OpenFOAM that I work on, namely the ones under the blueCFD-Core project, we are aware of this problem and have a bug report open for the problems 1 and 2 that I listed: https://github.com/blueCFD/Core/issues/1

I'm still not 100% certain of which is the best naming convention we should use on Windows, given that the colons separator is akin to the "namespace" separator that is used on C++, namely "::".


Either way, Mauricio, it would be useful to know which OpenFOAM version, port or variant that you're using, so that the respective project can be warned about this problem as well.

Telling this to the people on the OpenFOAM Foundation might not be worth while, given that Windows and Mac OS X are not supported at all, precisely due to issues like these... namely where the operating system is standing in the way and there is no clean solution for this, given that the limitation is on the operating system itself.

Best regards,
Bruno

I use dot ( "." ) in personal code and it shall be fine on both windows and linux.
wyldckat likes this.
arjun is offline   Reply With Quote

Old   September 19, 2016, 06:53
Default
  #11
New Member
 
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 9
MauricioAguilar is on a distinguished road
Bruno,

Thanks for the update.

I was using the latest version available for download... I believe it is v1606, running within Windows 7 64bit on VirtualBox with Linux Kernel 2.6.

However, as soon as I encountered those errors I installed OF in Fedora and it has been running smooth ever since.

Using "." as Arjun suggests may be the best solution for Windows.

kind regards,

M
wyldckat likes this.
MauricioAguilar is offline   Reply With Quote

Reply

Tags
file name, foam::mkdir, windows


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08


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