We have developed a computer code for the thermodynamic hierarchical equations of motion derived from a spin subsystem coupled to multiple Drude baths at different temperatures, which are connected to or disconnected from the subsystem as a function of time. The code can simulate the reduced dynamics of the subsystem under isothermal, isentropic, thermostatic, and entropic conditions. The extensive and intensive thermodynamic variables are calculated as physical observables, and Gibbs and Helmholtz energies are evaluated as intensive and extensive work. The energy contribution of the system-bath interaction is evaluated separately from the subsystem using the hierarchical elements of the hierarchical equations of motion. The accuracy of the calculated results for the equilibrium distribution and the two-body correlation functions is assessed by contrasting the results with those obtained from the time-convolution-less Redfield equation. It is shown that the Lindblad master equation is inappropriate for the thermodynamic description of a spin-boson system. Non-Markovian effects in thermostatic processes are investigated by sequentially turning on and off the baths at different temperatures with different switching times and system-bath coupling. In addition, the Carnot cycle is simulated under quasi-static conditions. To analyze the work performed for the subsystem in the cycle, thermodynamic work diagrams are plotted as functions of intensive and extensive variables. The C++ source codes are provided as supplementary material.
Read full abstract