In recent times, pulmonary drug administration using an inhaler is a subject of interest. The efficient delivery of drug particles to the lungs requires a realistic model of flow patterns in the alveoli. Numerical simulation is a useful tool for studying this airflow. However, simultaneously dealing with alveolar expansion/contraction and the airflow caused by alveolar deformation has proved challenging, because the alveolar sac has a complicated structure. This study develops a model in which inflow into and outflow from the alveoli were modeled by introducing a mass source term into a mass conservation equation. Our model was first validated using a simple calculation area, i.e., the flow pattern calculated by our model was compared with that calculated using a moving boundary condition. The two models showed similar flow patterns. Furthermore, the flow in an alveolar model constructed from a CT image was calculated using our model. The results demonstrated vortexes in the alveolar sac when the flow shifted from inflow to outflow, which is consistent with previous studies.