In this article numerical methods used to model photonic devices are presented. In particular, the governing equations describing the problem, the coupling between electrical and optical fields, and the numerical algorithms used for computing solutions are discussed. As a computational example, we present the modeling of a semi-conductor optical amplifier employed as an all-optical demultiplexer.