CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

OpenFOAM: read time-very inlet velocity from input file

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By LuckyTran
  • 1 Post By chakalakov

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2023, 17:29
Default OpenFOAM: read time-very inlet velocity from input file
  #1
New Member
 
Join Date: Jun 2017
Posts: 15
Rep Power: 9
Simone81 is on a distinguished road
Hello,

I need to read a time-very inlet velocity from input file, but apparently the option
Code:
type csvFile;
is no longer available in openFOAMv10. So I am using this option
Code:
  inlet
  {
      type         uniformFixedValue;
      uniformValue
      {
          type             tableFile;
          file             "inputFile.txt";
      }
  }
Where the inputFile has the following format
Code:
(       
( 0.1 0)       
(100 10.0)       
)
The first column should be the time and the second one should be the velocity magnitude. However, when I run setField I get the following error:
Code:
-> FOAM FATAL IO ERROR: 
Expected a '(' while reading VectorSpace<Form, Cmpt, Ncmpts>, found on line 28 the label 0

file: /home/foamCase/0/hU/boundaryField/inlet/uniformValue at line 28.

    From function Foam::Istream& Foam::Istream::readBegin(const char*)
    in file db/IOstreams/IOstreams/Istream.C at line 92.

FOAM exiting
I cannot find the what's wrong here! Anyone?
Thank you!
Simone81 is offline   Reply With Quote

Old   May 26, 2023, 18:38
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,743
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
uniformValue values are in () not {}

The hint was
Code:
Expected a ( on line 28


+1 to the counter of OpenFOAM error messages actually indicating what is the error
Simone81 and AtoHM like this.
LuckyTran is offline   Reply With Quote

Old   May 30, 2023, 17:43
Default
  #3
New Member
 
Adam
Join Date: May 2023
Posts: 1
Rep Power: 0
chakalakov is on a distinguished road
The error suggests that there's an issue with the syntax or formatting of your file or boundary condition definition.

In your inputFile.txt, the correct format should be time first and then the value (velocity magnitude in this case) for each line. However, it also should be a list with the outer brackets.
Simone81 likes this.
__________________
Etsy to WooCommerce
chakalakov is offline   Reply With Quote

Reply

Tags
openfoam 10, tablefile


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
[openSmoke] LaminarSMOKE compilation error mdhfiz OpenFOAM Community Contributions 8 July 2, 2024 10:32
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 03:50
Postprocess: sampleDict works but creates no output folder shock77 OpenFOAM Post-Processing 14 November 15, 2021 08:27
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53


All times are GMT -4. The time now is 23:43.