Nucleus accumbens is part of the neural structures required for reward based learning and cognitive processing of motivation. Understanding its cellular dynamics and its role in basal ganglia circuits is important not only in diagnosing behavioral disorders and psychiatric problems as addiction and depression but also for developing therapeutic treatments for them. Building a computational model would expand our comprehension of nucleus accumbens. In this work, we are focusing on establishing a model of nucleus accumbens which has not been considered as much as dorsal striatum in computational neuroscience. We will begin by modeling the behavior of single cells and then build a holistic model of nucleus accumbens considering the effect of synaptic currents. We will verify the validity of the model by showing the consistency of simulation results with the empirical data. Furthermore, the simulation results reveal the joint effect of cortical stimulation and dopaminergic modulation on the activity of medium spiny neurons. This effect differentiates with the type of dopamine receptors.