 During three years there Foster became familiar with the student assisted research undertaken at the natural philosophy laboratory run by William Thomson at Glasgow University.He met Mary Ann Frances Muir of Greenock, whom he married in 1868; his happy marriage produced four sons and four daughters, all of whom survived him, the partnership ending with his wife's death in 1917.University College, London, appointed Foster as professor of experimental physics (physics from 1867) in August 1865; there he became a much respected if not especially effective lecturer.