A computer-implemented method for determining an optimized purge gas flow in a semi-conductor inspection metrology or lithography apparatus, comprising receiving a permissible contaminant mole fraction, a contaminant outgassing flow rate associated with a contaminant, a contaminant mass diffusivity, an outgassing surface length, a pressure, a temperature, a channel height, and a molecular weight of a purge gas, calculating a flow factor based on the permissible contaminant mole fraction, the contaminant outgassing flow rate, the channel height, and the outgassing surface length, comparing the flow factor to a predefined maximum flow factor value, calculating a minimum purge gas velocity and a purge gas mass flow rate from the flow factor, the contaminant mass diffusivity, the pressure, the temperature, and the molecular weight of the purge gas, and introducing the purge gas into the semi-conductor inspection metrology or lithography apparatus with the minimum purge gas velocity and the purge gas flow rate.
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT
 This invention was developed with Government support under Contract No. DE-AC04-94AL85000 between Sandia Corporation and the U.S. Department of Energy. The U.S. Government has certain rights in this invention.