Modeling of nonlinear optical frequency comb generation