CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Functions to import non grid associated experimental data (http://www.cfd-online.com/Forums/openfoam/77640-functions-import-non-grid-associated-experimental-data.html)

benk June 29, 2010 12:04

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?

l_r_mcglashan June 30, 2010 05:11

1 Attachment(s)
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 23:56.