Functions to import non grid associated experimental data
I have some experimental data for a diffusion coefficient that depends on temperature and concentration. It's difficult to fit this data to polynomial functions and so what I want to do is import this data into my solver and then along with calculated concentration/temperatures, populate a volScalarField using the data along with an interpolation routine.
Has anybody done this and/or are there built-in functions in OpenFOAM to do this?
Maybe someone can highlight how to use foam's interpolation routines, but I had to do something similar and just used the STL. I've attached a linear interpolator with a driver routine, let me know if there are problems. I guess for your case you'll have to just call the interpolator twice, once against temperature and then against concentration.
|All times are GMT -4. The time now is 05:28.|