Modelling the viscoelasticity and thermal fluctuations of fluids at the nanoscale