Thermodynamic potential

Carnot engine diagram (modern) - where an amount of heat QH flows from a high temperature TH furnace through the fluid of the "working body" (working substance) and the remaining heat QC flows into the cold sink TC, thus forcing the working substance to do mechanical work W on the surroundings, via cycles of contractions and expansions.
Introduction:
A description of any thermodynamic system employs the four laws of thermodynamics that form an axiomatic basis.
The first law specifies that energy can be transferred between physical systems as heat, as work, and with transfer of matter.[5]
The second law defines the existence of a quantity called entropy, that describes the direction, thermodynamically, that a system can evolve and quantifies the state of order of a system and that can be used to quantify the useful work that can be extracted from the system.[6]
In thermodynamics, interactions between large ensembles of objects are studied and categorized.
Central to this are the concepts of the thermodynamic system and its surroundings.
A system is composed of particles, whose average motions define its properties, and those properties are in turn related to one another through equations of state.
Properties can be combined to express internal energy and thermodynamic potentials, which are useful for determining conditions for equilibrium and spontaneous processes.
With these tools, thermodynamics can be used to describe how systems respond to changes in their environment.
This can be applied to a wide variety of topics in science and engineering, such as engines, phase transitions, chemical reactions, transport phenomena, and even black holes.
The results of thermodynamics are essential for other fields of physics and for chemistry, chemical engineering, corrosion engineering, aerospace engineering, mechanical engineering, cell biology, biomedical engineering, materials science, and economics, to name a few.[7][8]
This article is focused mainly on classical thermodynamics which primarily studies systems in thermodynamic equilibrium.
Non-equilibrium thermodynamics is often treated as an extension of the classical treatment, but statistical mechanics has brought many advances to that field.
The third law of thermodynamics states that a system's entropy approaches a constant value as the temperature approaches absolute zero.
With the exception of non-crystalline solids (glasses), the entropy of a system at absolute zero is typically close to zero.[2]
The first and second laws prohibit two kinds of perpetual motion machines, respectively: the perpetual motion machine of the first kind which produces work with no energy input, and the perpetual motion machine of the second kind which spontaneously converts thermal energy into mechanical work.