Optimal conditions in converting methanol to dimethyl ether, methyl formate, and hydrogen utilizing a double membrane heat exchanger reactor