The study presented here is focused on the seismic analysis of moment-resisting steelrnframes accounting for imperfections. Geometrical and material nonlinear effects arernconsidered in the modeling of steel frames. The objectives of this research are to identifyrnthe main parameters affecting the response of moment-resisting steel frames under seismicrnactions. The effects of modeling problems and their accuracy in analyzing isolatedrnimperfect columns and a simple imperfect steel portal frame were also examined byrnvarying the number of elements per member. rnTwo types of seismic analyses have been carried out by OpenSees for the steel framesrnconsidered in this research, these are nonlinear static and nonlinear dynamic analysis.rnForce-based distributed plasticity approaches were used for modeling of beam-columnrnelements and fiber sections were assumed for modeling steel sections. Initial swayrnimperfections, residual stresses, and geometric nonlinear effects were considered for thernglobal analysis of frames. rnThe effects of lateral load distributions on the results of nonlinear static analysis have alsornbeen investigated by considering three different patterns of lateral load distribution: linear,rnmodal and triangular. rnThe results of the pushover analysis for the frames under consideration show that thernlateral load distribution patterns have a greater effect than the magnitude of the loadsrnapplied to the structure. The effects of imperfections for moment-resisting sway framesrnare less than that of the second-order effects. rnThree verification examples are performed to demonstrate the capability of the OpenSeesrnprogram in solving nonlinear problems in comparison with experimental results. Thesernexamples were analyzed by both OpenSees and SeismoStruct and the results werernpresented against experimental results. rnThe second-order elastic analysis results for isolated columns show that the number ofrnelements needed per member to model the cantilever column is lower than the pin ended rncolumn. A simple portal frame analyzed by modeling imperfections directly to the frame rngeometry and by replacing imperfections to equivalent lateral loads has no considerablerndifference between the results from these types of modeling imperfections.