Secondary organic aerosols (SOA) are major components of atmospheric fine particulate matter, affecting climate and air quality. Mounting evidence exists that SOA can adopt glassy and viscous semisolid states, impacting formation and partitioning of SOA. In this study, we conduct explicit modeling of isoprene photooxidation and α-pinene ozonolysis and subsequent SOA formation using the GECKO-A (Generator of Explicit Chemistry and Kinetics of Organics in the Atmosphere) model. Our recently-developed parameterizations to predict glass transition temperature of organic compounds are implemented into a box model with explicit gas-phase chemical mechanisms to simulate viscosity of SOA. The effects of chemical composition, relative humidity, mass loadings and mass accommodation on particle viscosity are investigated in comparison with measurements of SOA viscosity. The simulated viscosity of isoprene SOA agrees well with viscosity measurements as a function of relative humidity, while the model underestimates viscosity of α-pinene SOA by a few orders of magnitude. This difference may be due to missing processes in the model including gas-phase dimerization and particle-phase reactions leading to the formation of high molar mass compounds that would increase particle viscosity. Additional simulations imply that kinetic limitations of bulk diffusion and reduction in mass accommodation coefficient may also play a role in enhancing particle viscosity by suppressing condensation of semi-volatile compounds. The developed model is a useful tool for analysis and investigation of the interplay among gas-phase reactions, particle chemical composition and SOA phase state.