We model the freezing process of densely packed vials in a mechanistic way and take into account number and arrangement of the vials, heat transfer, and ice nucleation and growth. A lumped capacitance approach is used, where each vial corresponds to a homogeneous lump characterized by its mean temperature and ice mass. The formulation within the vials experiences both a cooling phase and an ice growth phase during freezing. Ice nucleation is the process that drives the vial's state from the liquid to the partially frozen state. It is described as an inhomogeneous Poisson process following existing literature on both ice nucleation and primary nucleation of solutes from solution, and is simulated using a Monte Carlo approach.