Deadspace gas mixing with stimulation of respiratory ventilation through cardiogenic oscillations is an important physiological mechanism during apnea. In this study, a novel method is proposed to investigate the effect of these mechanisms in silico. We extended an existing computational model of cardio-pulmonary physiology to include the apneic state, cardiogenic oscillations, gas mixing within the anatomical deadspace and insufflation into the trachea. The new model was validated against data published in an experimental animal study. Computational simulations confirmed that the model accurately reproduce the experimental data. This new model can be used to investigate the physiological mechanisms underlying clearance of carbon dioxide during apnea, and hence to develop more effective ventilation strategies for apneic patients.