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

Loading V from different directory

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2015, 12:33
Default Loading V from different directory
  #1
Member
 
Join Date: Feb 2014
Posts: 32
Rep Power: 12
yeharav is on a distinguished road
Hi All,

I am trying to load the velocity field from a different directory.
I wrote :
volVectorField U1
(
IOobject
(
"U",
otherpath + runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);

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?

Thanks.
yeharav is offline   Reply With Quote

Old   November 29, 2015, 03:54
Default
  #2
Member
 
Join Date: Feb 2014
Posts: 32
Rep Power: 12
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

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 104 February 16, 2021 09:46
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 16:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 04:01


All times are GMT -4. The time now is 02:53.