Theoretical investigations into thermal and electrocatalytic conversion of carbon dioxide