initial version of code for c-foam measurements