CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Suppress interpolationTable overflow messages (https://www.cfd-online.com/Forums/openfoam/86436-suppress-interpolationtable-overflow-messages.html)

mturcios777 March 22, 2011 16:01

Suppress interpolationTable overflow messages
 
I'm using an interpolation table and the values in my simulation run beyond the maximum value of the table. I'd still like to run the simulation until I can compile a new table; is there a way of supressing the message, preferably without recompiling the libraries (I only want this temporarily for select cases).

Thanks in advance!

mturcios777 March 23, 2011 13:04

Ugh, I hate it when some simple digging will find the answer. Now I have to come here, post the answer and look silly :o

I was originally creating the interpolationTable by referencing the filename directly, with the constructor:

Code:

interpolationTable <scalar> myTable(fileName)
I found there to be several different constructors, including one where you can specify the outOfBounds behavior to warn, clamp, repeat

Since I do a lot of changes at run time, I found it best to use a dictionary that contains the file name and the outOfBounds behavior:

in createFields.H
Code:

interpolationTable<scalar> myTable(myDict)
in constant/myDict
Code:

fileName        "path/to/my/file.dat";
outOfBounds        clamp;


JuRe09 April 6, 2022 09:52

Problem in defining outOfBounds w. interpolation2DTable
 
Quote:

Originally Posted by mturcios777 (Post 300757)
Ugh, I hate it when some simple digging will find the answer. Now I have to come here, post the answer and look silly :o

I was originally creating the interpolationTable by referencing the filename directly, with the constructor:

Code:

interpolationTable <scalar> myTable(fileName)
I found there to be several different constructors, including one where you can specify the outOfBounds behavior to warn, clamp, repeat

Since I do a lot of changes at run time, I found it best to use a dictionary that contains the file name and the outOfBounds behavior:

in createFields.H
Code:

interpolationTable<scalar> myTable(myDict)
in constant/myDict
Code:

fileName        "path/to/my/file.dat";
outOfBounds        clamp;



Basically I have the same problem! I get the Warn message that an value is out of bounds which is true. My definition (construc using dict) is as follows:
Code:

myTable = interpolation2DTable<scalar>("constant/myDict");
and in constant/myDict:
Code:

fileName "constant/myTable";
 outOfBounds clamp;

I get the following error:
1] --> FOAM FATAL IO ERROR:
[1] Expected a '(' while reading Tuple2, found on line 1: word 'fileName'
[1]
[1] file: constant/myDict at line 1.
[1]
[1] From function Foam::Istream& Foam::Istream::readBegin(const char*)
[1] in file db/IOstreams/IOstreams/Istream.C at line 92.
[1]
FOAM parallel run exiting


Note: When i use the constructor just using fName = "constant/myTable" it works fine expect the bounds handling....


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