Modeling and Simulation of Photonic Devices and Circuits I