Simulation of diatomic gas-wall interaction and accommodation coefficients for negative ion sources and accelerators