From OpenFOAMWiki

This pages answers a few questions about swak4Foam that pop up frequently on the message board

Is it possible to have lookup-tables with more than one independent variable?

tl;dr: No, it isn't.

swak4Foam offers one-dimensional lookup-tables where you can lookup 1-dimensional functions from tabulated data f(x). An often requested feature is to have multi-dimensional lookup tables g(x,t) or h(x,y,z). These are not present in swak for a number of reasons:

  • In most applications where this is requested it is usually possible to separate the function into two independent functions f(x,y)=g(x)*h(y) (or similar)
  • Another batch of applications can be handled by the built-in timeVaryingMappedFixedValue
  • There is no applicable multi-dimensional interpolation of data in OpenFOAM and the implementation is not that trivial (handling of invalid data, handling outside of range requests etc)
  • There is no generally accepted data-format for the multidimensional data (I often requested people to specify what they would see as a common data format for this but nobody cared to answer)

This feature may be implemented in the future but there are no concrete plans for this (of course if somebody wants to implement it and contribute the patches ...)