Granular medium is ubiquitous in nature, and is an important issue in many infrastructural construction projects. In particular, the gravity discharge of fine particles from a silo constitutes an important problem of research, because of its many industrial applications. However, the physical mechanism of this system remains unclear. In this work, we study the discharge of silo from the bottom or lateral orifice, by performing pseudo-three-dimensional (3D) continuum simulations based on the local constitutive theory. The simulation is two-dimensional (2D), in order to study the 3D silo, we add the lateral frictional force in the averaged momentum equation. For a rectangular silo with an orifice of height
$D$
and the silo thickness
$W$
, we study the influence of the orifice size (
$W$
and
$D$
) on the granular pressure and velocity. The force analysis and simulation results reveal that for the relation between the granular pressure and the orifice size, there exist two regimes: when
$D/W$
is small enough, the pressure near the orifice varies only with
$D$
; when
$D/W$
is large enough, the pressure varies only with
$W$
. These scaling laws are the same for both bottom and lateral orifice. Somewhat surprisingly, the simulation results also show that when the orifice is at the bottom, the scaling law of the vertical velocity is different from that of the pressure; when it is on the lateral side, the scaling law of the horizontal velocity is consistent with that of the pressure. This observation contradicts a hypothesis that the flow rate of discharge is controlled by the granular pressure near the orifice, and validates the recent experimental results reported in the literature. Furthermore, the relationship between the vertical velocity and the orifice size reveals that when the orifice is at the bottom, the critical value of
$D/W$
for the transition of regime is much larger than the lateral orifice case, the flow rate will depend only on
$W$
when
$D/W\gg50$
. This condition is hardly satisfied in practice, so the new scaling law has not yet been observed for the bottom orifice case in the literature. Furthermore, this work demonstrates that the stagnant zone has an important effect on the discharge of silo, especially for the lateral orifice case. Since a non-local constitutive law can well describe the quasi-static flow, it will be interesting to modify the local constitutive model into a non-local constitutive model, and to compare the results from the two models.