CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   reading timeseries into the solver-Problem with using dataEntry (https://www.cfd-online.com/Forums/openfoam-solving/168189-reading-timeseries-into-solver-problem-using-dataentry.html)

sina.s March 17, 2016 04:30

reading timeseries into the solver-Problem with using dataEntry
 
Dear all,

I am trying to use dataEntry for reading text file timeseries into my solver.
Following what is written in the code and looking into similar applications, I have managed to almost make it work...
My only remaining problem, which I couldnt find a solution for, is:

I have several variables which should be read from the text files, which I define them in constant/dataEntryProperties, as you see below.
However, when there are more than one entry in my dataEntryProperties, it tends always to go and read the file in the last entry no matter what!
I guess there is something wrong in the way I have written the dataEntryProperties, maybe missing some ";" or "(" somewhere?

I woul be glad if someone can give me some hints on this, as I couldnt find any such examples anywhere else...

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dataEntryProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



Qs_spill tableFile;
tableFileCoeffs
{
dimensions [ 0 3 -1 0 0 0 0 ]; // optional dimensions
fileName "Qs_spill"; // name of data file
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation method

};

Xb_t tableFile;
tableFileCoeffs
{
dimensions [ 0 1 0 0 0 0 0 ]; // optional dimensions
fileName "x_coordinate.txt"; // name of data file
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation method

};

U_timeseries tableFile;
tableFileCoeffs
{
dimensions [ 0 1 -1 0 0 0 0 ]; // optional dimensions
fileName "currentVectors.txt"; // name of data file
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation method

};

Yb_t tableFile;
tableFileCoeffs
{
dimensions [ 0 1 0 0 0 0 0 ]; // optional dimensions
fileName "y_coordinate.txt"; // name of data file
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation method
};




// ************************************************** *********************** //


All times are GMT -4. The time now is 00:33.