We develop a mathematical model for dynamical simulation of an alkaline electrolyzer plant. We model each component of the system with mass and energy balances. Our modeling strategy consists of a rigorous and systematic formulation using differential algebraic equations (DAE), along with a thermodynamic library that evaluates thermophysical properties. We show steady state diagrams for the electrolyzer stack, and perform dynamic simulations. Dynamic modelling of an electrolyzer enables simulation and model-based optimization and control for optimal hydrogen production under varying operating conditions.