|
[Sponsors] |
July 27, 2016, 08:32 |
File Creation Problem in Windows
|
#1 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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 |
|
July 27, 2016, 08:47 |
|
#2 |
New Member
Join Date: Oct 2014
Posts: 26
Rep Power: 12 |
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 |
|
July 27, 2016, 08:48 |
|
#3 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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 |
|
July 27, 2016, 09:00 |
|
#4 |
New Member
Join Date: Oct 2014
Posts: 26
Rep Power: 12 |
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 |
|
July 27, 2016, 09:21 |
|
#5 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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. |
|
July 29, 2016, 13:45 |
File name with colons ":" invalid on Windows OS
|
#6 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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 |
|
August 1, 2016, 11:32 |
|
#7 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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. |
|
September 16, 2016, 10:12 |
|
#8 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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 19:12. Reason: merged posts from 2 threads on the same topic |
|
September 18, 2016, 19:05 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Mauricio,
Yes, unfortunately on Windows we have three major problems with file names and paths, which on Linux we don't:
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
__________________
|
|
September 18, 2016, 23:06 |
|
#10 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,289
Rep Power: 34 |
Quote:
I use dot ( "." ) in personal code and it shall be fine on both windows and linux. |
||
September 19, 2016, 07:53 |
|
#11 |
New Member
Mauricio Aguilar
Join Date: Jul 2016
Posts: 15
Rep Power: 10 |
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 |
|
Tags |
file name, foam::mkdir, windows |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 11:03 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |