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

tableFile usage for flowRateInletVelocity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Dr T

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2022, 13:08
Default tableFile usage for flowRateInletVelocity
  #1
New Member
 
T
Join Date: Jul 2022
Posts: 3
Rep Power: 4
Dr T is on a distinguished road
I am trying to use flow rates from an external file however OF keeps complaining about "values" keyword missing. The template according the documentation is
Code:
 <entryName> tableFile;  
   <entryName>Coeffs 

    { 
      dimensions          [0 0 1 0 0]; // optional dimensions        
     fileName            dataFile;    // name of data file         
     outOfBounds         clamp;       // optional out-of-bounds handling
     interpolationScheme linear;      // optional interpolation method  
     }
My usage:

Code:
 inlet
     {
        type                flowRateInletVelocity;
        volumetricFlowRate  tableFile;
        Coeffs
        {
            // dimensions          [0 0 1 0 0]; // optional dimensions
            fileName            dataFile;    // name of data file
            outOfBounds         clamp;       // optional out-of-bounds handling
            interpolationScheme linear;      // optional interpolation method

         }
The dataFile above contains time and flow rates in the following format
Code:
(
(0.0    0.005)
.
.
(0.5   0.02)
);
When I run with the above setup I get the "values" entry missing error.
Code:
keyword values is undefined in dictionary "foam/tableFile_test/0/U/boundaryField/inlet/volumetricFlowRateCoeffs"
However, I was able to run by using "table" instead of a "tableFile" which is of course quite ugly/inconvenient when pasting thousands of lines in the U bc file. I was also able to run with values pasted within U file with the tableFile entry but just not able to read the values from an external file. Also, renaming the "Coeffs" to "values" directly looks for integers within braces and still doesnt look for an external file. Looks like a possible bug. Appreciate any thoughts.
Dr T is offline   Reply With Quote

Old   October 5, 2022, 13:44
Default
  #2
New Member
 
T
Join Date: Jul 2022
Posts: 3
Rep Power: 4
Dr T is on a distinguished road
ok, looks like I found the solution, and here is the modified version that works:


Code:
    inlet
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  tableFile;
        volumetricFlowRateCoeffs
        {
            // dimensions          [0 0 1 0 0]; // optional dimensions
            file            "$FOAM_CASE/0/inflow";    // name of data file
           // fileName            "$FOAM_CASE/0/inflow";    // name of data file
            outOfBounds         clamp;       // optional out-of-bounds handling
            interpolationScheme linear;      // optional interpolation method

        }
           
    }
Not sure if this is a bug, but the TableFileReader.C is looking for a "file" entry whereas the docs mention it as "fileName". This is also crazy because the openfoam.org (V2112) requires a "file" entry and is exactly the same as above. Whereas openfoam.com(10) requires "fileName" but works with "file"!
caduqued and Michael@UW like this.
Dr T is offline   Reply With Quote

Reply

Tags
flowrateinletvelocity, 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
Large memory usage for steady simulation Wenqiang SU2 2 May 15, 2020 14:40
How to use 2 tableFile? IgnacioSarmientoINH OpenFOAM Pre-Processing 1 August 23, 2018 08:23
New workstation for different usage scenarios - CPU and RAM natem Hardware 6 August 7, 2013 03:47
Boosting CPU usage earlybird FLUENT 2 November 2, 2012 11:32
OpenFOAM Solver/BC usage description murrayjc OpenFOAM 3 August 25, 2009 05:48


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