Volatile resistive switching memory (RRAM) is raising strong interest as potential selector device in crosspoint memory and short-term synapse in neuromorphic computing. To enable the design and simulation of memory and computing circuits with volatile RRAM, compact models are essential. To fill this gap, we present here a novel physics-based analytical model for volatile RRAM based on a detailed study of the switching process by molecular dynamics (MD) and finite-difference method (FDM). The analytical model captures all essential phenomena of volatile RRAM, e.g., threshold/holding voltages, on-off ratio, and size-dependent retention. The model is validated by extensive comparison with data from Ag/SiOx), RRAM. To support the circuit-level capability of the model, we show simulations of crosspoint arrays and neuromorphic time-correlated learning.