CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   SKA.C reads fileName read from dynamicMeshDict without expanding it (

mwild July 28, 2010 15:37

SKA.C reads fileName read from dynamicMeshDict without expanding it
1 Attachment(s)
src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C loads a fileName read from dynamicMeshDict without calling the fileName::expand() function. Thus one can't use e.g. $FOAM_CASE in the dictionary, making it impossible to run e.g. the sloshingTank3D6DoF case from outside the case directory without hard-coding the absolute path in the dictionary.

Attached patch fixes both SKA.C and sloshingTank3D6DoF/constant/dynamicMeshDict.

henry July 29, 2010 06:16

I have added this enhancement and pushed it into 1.7.x


mwild July 30, 2010 04:22

Did you forget to "git push"? :D

wyldckat August 3, 2010 06:50

Greetings to all!

This is only slightly off-topic, but also related to the fix made for SKA.C...
I've got a request to the developers: a method like "fileName::isPathAbsolute()" would be really helpful. Why? Two reasons:
  1. These four files (the only ones I found so far) rely on finding the first character to be '/', in order to assume it's an absolute path:


    This isn't the only possible absolute path type, since it could start with "C:" (Windows, Amiga OS, RISC OS, etc...) or even be a URL address "http:" (in case you want to add web capabilities to OpenFOAM later on).
  2. SKA.C could probably take advantage of allowing relative path definition, in the same way it's done in chemkinReader.C! So, if the method isPathAbsolute already existed, "allowing for relative path" in SKA.C might have not been forgotten...

Best regards,

All times are GMT -4. The time now is 09:50.