Fundamental investigation of gas adsorption in micro- and mesoporous carbons