Modeling of a negative ion source. II. Plasma-gas coupling in the extraction region