A Modelica library for the modeling and simulation of photobioreactors is presented. The modeling equations are based on first principles. The library is easy to use, fast and highly configurable. The library has been validated with real data. Its easy to interconnect other models or libraries to create more complex systems.