A dimensional model for the calculation of thermodynamic properties of gaseous molecules and ions