Thermodynamics is the study of the relationship between heat and mechanical energy along with other variations of work, through a mathmatical view. It allows us to understand the 'kinetics' of a reaction and can show whether not a reaction is actually feasible and where the position of an equilibrium will lie. Essentially it follows the transformation of energy, or the transfer of energy as work or heat (organised or disorganised work).
Work is said to be an orderly (or organised) form of motion. It is best understood through examples of systems producing work on its surroundings through pressure:

Heat is concerned as a more disorganised form of work. It discribes the transfer of energy resulting from a temperature difference between a choosen system and its surroundings, but note that this can also occur within the subject system/reaction.

In order to realise the path in which the energy takes in a certain process, We need to understand which part of the 'world' we are interested in. To remedy this, we simplfy into 2 main areas; The system and it's surroundings. The system is the part or volume of the world in which we have chosen to study. Therefore anything that is not part of this system is defined as its surroundings.

The system can take the form of various different criteria defined as:
1. An OPEN SYSTEM, which is where both energy and matter is aloud to interact with the surroundings (the energy and matter can swap between its systems and surroundings)
2. A CLOSED SYSTEM, is when the only interactions that exist between the system and its surroundings is energy transfer in the form of heat or work.
3. An ISOLATED SYSTEM, means that it is thermally and physically isolated from the surroundings, Neither energy or matter has any interaction with the surroundings within a perfectly isolated system.
4. An ADIABATIC SYSTEM, is where the system is only thermally isolated, therefore no heat transfer can not occur, although energy in the form of work can still be done on the system.
5. A DIATHERMIC SYSTEM, Is the same as an Adiabatic system, although heat transfer between the system and the surroundings can now take place.
CALCULATION AND MEASUREMENT OF WORK.
From the methods used in Physical science, the work is a product of the distance an object is moved and the force which opposes that motion. Taking the example of simply lifting an object, the distance moved would be related to the height that the object is raised. The opposing force would be the product of the mass of the object and the force that gravity exerts on that object. By multiplying these 2 values, the work that is done on the object is found.
Generally W=mgh (work=mass x gravity x height)
The units of this energy is expressed in joules.
If we choose for example to find the work done by a system on a bag of mass 3Kg which is raised to a height of 50cm then the workings involved in this operation become clear:-
W=-mgh (W is negative when h is positive)
W=-(3 x 9.81 x 0.5)
W=-14.715 j
This formula can be adapted so that Work can be calculated in much more complicated circumstances where other factors need to be taken into account. For example, When calculating the work done by an expanding gas on a moving piston of a known area. The same principles that the work done is the product of distance and its opposing force is applied, only that the opposing force is no longer the objects weight (mg) but the external pressure applied to the piston multiplied by its area. Therefore the general expression is adapted as:
W=-(Pex x h) (work done=external pressure x distance)
(W is negative as system looses energy when expanding)
Author: Jonathan Hopper (document modification date: 21st Jan 2002)