CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Scalar equation and a table from a file (https://www.cfd-online.com/Forums/openfoam/87445-scalar-equation-table-file.html)

alessio.nz April 20, 2011 09:01

Scalar equation and a table from a file
 
Hello, I have to solve the following problem: I have a scalar transport equation of a variable Y with a source term called Y'.
Imagine that I have values of Y in a discrete way, included in the range [0:1] and Y' values different and dependent on the Y ones (for each Y I have a Y'). Let's pretend that I want to evaluate the values of Y' from a value of Y not included in the discrete table (for instance Y = 0.005) simply making a linear interpolation.

Y - Y'
0 - 10
0,1 - 12
0,2 - 56
0,3 - 78
0,4 - 98
0,5 - 99
0,6 - 56
0,7 - 21
0,8 - 12
0,9 - 11
1,0 - 5
the first question is: how to upload the table in the memory of the scalar equation I have? second: which tools are better to be used for linear interpolation? regards, alex


All times are GMT -4. The time now is 06:51.