A Thermodynamic System is that part of the universe that is under consideration. A real or imaginary boundary separates the system from the rest of the universe, which is referred to as the environment or surroundings (sometimes called a reservoir.) A useful classification of thermodynamic systems is based on the nature of the boundary and the flows quantities through it as matter, energy, work, heat, and entropy. A system can be anything, for example a piston, a solution in a test tube, a living organism, or a planet.

Interaction with surroundings
Thermodynamics is basically concerned with the flow and balance of energy and matter in a thermodynamic system. Three types of thermodynamic systems are distinguished depending on the kinds of interaction and energy exchange taking place between the system and its surrounding environment:
- Isolated systems are completely isolated in every way from their environment. They do not exchange heat, work or matter with their environment. An example of an isolated system would be an insulated rigid container, such as an insulated gas cylinder.
- Closed systems are able to exchange energy (heat and work) but not matter with their environment. A greenhouse is an example of a closed system exchanging heat but not work with its environment. Whether a system exchanges heat, work or both is usually thought of as a property of its boundary.
- open systems: exchanging energy (heat and work) and matter with their environment. A boundary allowing matter exchange is called permeable. The ocean would be an example of an open system.
In reality, a system can never be absolutely isolated from its environment, because there is always at least some slight coupling, even if only via minimal gravitational attraction. In analyzing a system in steady-state, the energy into the system is equal to the energy leaving the system. [1]
Systems in equilibrium
It is a fact that, for closed systems, as time goes by, internal differences in the system tend to even out. Pressures and temperatures tend to equalize, as do density differences. A system in which all these equalizing processes have gone practically to completion, is considered to be in a state of thermodynamic equilibrium. Its thermodynamic properties are, by definition, unchanging in time. Systems in equilibrium are much simpler and easier to understand than systems which are not in equilibrium. Often, when analysing an thermodynamic process, it can be assumed that each intermediate state in the process is at equilibrium. This will also considerably simplify the situation. Thermodynamic processes which develop so slowly as to allow each intermediate step to be an equilibrium state are said to be reversible processes.
Explanation
Thermodynamics is conducted under a system-centered view of the universe. All quantities (such as pressure or mechanical work) in an equation refer to the system unless labeled otherwise. For example, the equation w = 152 J means that 152 joules of work were done on the system.
Types of system
Systems are divided into three types:
- An isolated system can exchange neither energy nor matter with its surroundings.
- A closed system can exchange energy but not matter with its surroundings.
- An open system can exchange both matter and energy with its surroundings. All real systems are open, though they can sometimes be theoretically approximated as closed or isolated.
For instance, consider the system of hot liquid water and solid table salt in a sealed, insulated test tube held in a vacuum (the surroundings). The test tube constantly loses heat (in the form of black-body radiation), but the heat loss progresses very slowly. If there is another process going on in the test tube, for example the dissolution of the salt crystals, it will probably occur so quickly that any heat lost to the test tube during that time can be neglected. (Thermodynamics does not measure time, but it does sometimes accept limitations on the timeframe of a process.)
Likewise, the system loses matter to its surroundings. The materials that the test tube and insulation are made of will gradually dissolve in the air. This process, too, can usually be neglected.