Need help evaluating field by interpolation with a "lookup table"
I am attempting to create a solver which determines the internalField values of a certain scalar field (effectively a field of coefficients "C") based on interpolative evaluation of another scalar field's internal values.
Foe clarification, if I have a normally-generated (e.g. time-stepping, with boundary conditions, evaluated using .solve) scalar field "T," and a .csv file (or other format) of paired values "Cref" vs. "Tref" for the effective range of "T," I need to evaluate "C" at every cell where "T" is already available by interpolating the Cref/Tref data for every value of "T"s internal field, then storing the field "C" for the time step to later perform other calculations.
I have already explored using both Foam::interpolateXY and Foam:interpolationTable to attempt this task, but I've encountered a unique problem with each:
interpolateXY apparently operates only on "fields," whereas my data is in the form of "lists"; since the Cref/Tref data have no dependence (or information) regarding spatial position. As a result I believe I've failed to understand completely this function's intended use, and now suspect it has nothing to do with what I'm attempting.
Using interpolationTable instead yields me a new problem, in which I can't seem to manage accessing and writing to the internalField lists of either "T" or "C" directly.
For example, I would ideally have code similar to the following:
Even the following simple test:
error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
I would appreciate it if anyone could either alert me to my error, or suggest a better method for evaluating "C" using the interpolation data.
Additionally, I'm having some difficulty handling deconstruction of the "interpolationTable," but this is a secondary issue. Any help with the original problem would be greatly appreciated!
You need to put in brackets with no arguments to access the internal field function i.e.
|All times are GMT -4. The time now is 13:45.|