CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Loading V from different directory

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

LinkBack Thread Tools Display Modes
Old   November 25, 2015, 12:33
Default Loading V from different directory
New Member
Join Date: Feb 2014
Posts: 20
Rep Power: 5
yeharav is on a distinguished road
Hi All,

I am trying to load the velocity field from a different directory.
I wrote :
volVectorField U1
otherpath + runTime.timeName(),

Where otherpath is "../../blahblah/".

This worked for a while but now I get error

word::stripInvalid() called for word ....blahblah
For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)

For one server with OF-2.2.2.
(I have it installed on 3 different servers, and on the other two it worked, so far).

I also tried to write :

word path = "../../blah";

in the code, but I get the same error.

Any thoughts?

yeharav is offline   Reply With Quote

Old   November 29, 2015, 03:54
New Member
Join Date: Feb 2014
Posts: 20
Rep Power: 5
yeharav is on a distinguished road
I still don't know why it suddenly happened but I found a work around.

fileName fullfilename = word(basepath+runTime.timeName(),false);
volVectorField tmpU(IOobject("U","", fullfilename, mesh,IOobject::MUST_READ), mesh);
yeharav is offline   Reply With Quote


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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 101 February 3, 2017 00:36
Swak4Foam funkyDoCalc with OF2.3 massflow NiFl OpenFOAM 11 November 1, 2016 07:43
Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 225 August 25, 2015 19:43
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01

All times are GMT -4. The time now is 17:47.