Hamiltonian formulation and IDA-PBC control of non isothermal continuous stirred tank reactors