New treatments of the subsonic constant flow rate boundary and porous outlet boundary used for the direct simulation Monte Carlo (DSMC) method are proposed. For the constant flow rate boundary, the total number of molecules inserted is calculated using the number of molecules that flow out of the boundary at previous time step, and the molecules inserted over the boundary are distributed according to the local mean flow velocity and number density. For the porous outlet, it is used to simulate the vacuum pump, and the deleting probability is calculated using the number of molecules that impinge on the boundary, the local pressure and the pump speed. Except for the constant flow inlet and porous outlet, the pressure inlet/outlet and the outgassing wall boundaries are implemented in dsmcFoam and verified. The results of different treatments of the boundary are compared with each other, it shows that the new treatment of the constant flow rate boundary can achieve a more accurate flow rate, and the non-uniform distribution of the inserted molecules can decrease the averaging effect at the inlet; the porous outlet can achieve the desired pressure at the outlet when just giving the pump speed, but there is an averaging effect compared with the pressure outlet due to the uniform deleting probability. The results are also compared with that of DS2V when the boundary conditions are available, it shows that the constant pressure boundary can achieve a more accurate pressure in dsmcFoam than in DS2V, and the results of the outgassing wall are almost the same with both solvers. (C) 2017 Elsevier Ltd. All rights reserved.