Exploring the electron density in plasma induced by EUV radiation: II. Numerical studies in argon and hydrogen