Except for cases where nuclear reactions are involved mass in conserved; meaning that it cannot be destroyed nor created. Of course a particular object might loose mass, but whatever is lost can be found elsewhere given enough care. For Stirling engines that means that the mass of gas inside the engine remains constant over time as long as there are no leaks. The mass of gas found in one section of the engine may i vary over time but if it increases in one section another section(s) has to loose mass an equal amount of mass. In terms of a mathematical equation we say that the sum of all masses in the individual sections of an engine is equal to the total mass, the latter being constant.
(1) mc + mk + mr + mh + me = mtot = constant
mc = mass inside compression space
There is an alternative form in which the law of conservation of mass can be written. It is cast in terms of changes of mass. Let dmc be the change of mass of the compression space with a positive value if mass is added and negative when mass leaves. Using identical definition for the other spaces inside a Stirling engine we write :
(2) dmc + dmk + dmr + dmh + dme = 0
Mass is measured in kilogram [kg] or pounds [lbm] or any sub-unit thereof like gram or ounce. Mass is a property of all materials and is proportional to the number of molecules your object consists of. As such, it is independent of location.
Opposite to that is the weight of an object which we obtain by putting an object on a scale. But a scale, of whatever variety, measures only the force the object exerts onto it. In metric system scales show weight (the force) in terms of Newtons [N] and in english system in terms of pounds [lbf].
Of course the force an object exerts onto a scale is equal to the force gravity exerts on your object and as gravity changes from location to location so does the weight of an object. Here on earth gravity is about 0.5% higher at the poles than at the equator ( not including effects of centripetal acceleration) and even more due to elevation. If you could go to the moon you would see a reduction of weight by a factor of 6 and on mars by a factor 2.66.
Confusion between weight and mass arises for historical reasons and imprecision in the usage of language in daily life. In daily usage - including on the internet - we rarely distinguish between the force-pound (lbf) and the mass-pound (lbm) leaving out the subscripts all together. This conundrum is compounded by the fact that here on earth an object of 1 mass-pound will show up as 1 force-pound on a scale. In metric system 1 kg of mass would show 9.81 N on a metric-based scale but in daily live you never would see such a scale. Instead if you go into a store and buy 1 kg of sugar then putting it onto a scale in the grocery store it would show 1 which in itself is OK. But then people say your object "weighs" so-and-so many kilograms or pounds instead of saying it "has a mass" of 1 kg. But, on the positive side, torque (like that of car engines) is presented now consistently in N*m in daily life and, similarily, the power of a car engine is measured in kiloWatt ( 1 kW = 1000 N*m/s ).
Density and specific volumeInstead of only measuring the mass of an object one can consult the density of the kind of material the mass consists of. Or if you want to determine the density (greek symbol ρ (rho) is most often used) of an unknown substance you can measure the total mass, m [kg], and volumei, V [m³], and devide :
ρ = m/V [kg/m³]
The inverse of the density is call specific volume v [m³/kg] which in many instances is easier to use :
v = V/m = 1/ρ [m³/kg]