Principles of general Thermodynamics