Coupled fluid-thermal analysis of low-pressure sublimation and condensation with application to freeze-drying