SG and Temperature Compensation

The forum for discussing all kinds of brewing paraphernalia.
Post Reply
User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

SG and Temperature Compensation

Post by PeeBee » Tue Jan 09, 2024 7:17 pm

Specific Gravity (SG)? It has always puzzled me what it means. Google's no help. But I've been playing around with "SG" and "Relative Density" (which is in some way interlinked) for a while now, and it has suddenly clicked.

"Specific Gravity" means "this is the gravity", just like an English dictionary would describe. From Merriam-Webster's on-line dictionary:

specific [spɪˈsɪfɪk] adjective
1. clearly defined or identified. ...

The "Gravity" (or "Density", the two are used interchangeably in a brewing situation) is the weight divided by volume. That figure dances about a bit due to changes in temperature and pressure, so, to make the value "specific" the figure references a substance held in the same conditions; the substance is usually water (or is it always water? Doesn't have to be but I've never come across anything else). By making such a pairing, "SG" becomes a ratio, which means no units ... it's just a number; and the SG of water is one (any number "referenced", or divided, by itself is one). And, most importantly: The value is automatically compensated for differences in temperature and pressure (within limits; freezing, boiling and outer space will provide some obstacles!).

Sounds ideal? But there were drawbacks: Weighing stuff to the necessary accuracy for brewing was tricky, hence "Brewers' Pounds" used the volume of "barrels" (36 imperial gallons!). Most brewers didn't bother. By the last quarter of the 18th C., brewers started to use new-fangled "Saccharometers" (hydrometers). They were cheap and easy to use. The problem with them is they didn't measure "density" directly (they do not deal with weights and fixed volumes, they are measuring "buoyancy") and therefore, lost the automatic temperature compensation. Still, thermometers were becoming common instruments and density readings could be manually compensated. It must have been advantageous for "SG" to continue to be used with these new instruments.

And after two centuries hydrometers, and "SG", are still used for brewing. A rather minor hiccup recently is that "SI units" introduced "grams per milliliter" (g/ml) which looks identical to a "SG" (but it's not!) and water at its densest (4°C) is almost exactly one, like the SG of water is one, but really water is not quite 1.000g/ml and then only at that temperature (the SG of water is always exactly one whatever the temperature).



That's enough for now. I think a number of people can see where I'm going to with this (and yes, I am!).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Wed Jan 10, 2024 1:27 pm

A few years ago, I had an accident. Knocked my eyes out of kilter, took five eye "squint" operations to make them approximately right but I still need prism glasses so as to correct the remaining double vision over most of my sight. I'm also ageing and need ever stronger reading glasses. On top of that the accident triggered something called "saccadic intrusions" ... I find it difficult to fixate my vision on something to see it clearly (and no glasses can fix that, it's in my head). Oh aye, my hand tremors like a mad thing.

A fragile glass instrument covered in closely set parallel lines (a hydrometer) is a nightmare!

A refractometer can be used to gain a closely approximate reading of "SG" and are easier to read than hydrometers. Not ideal but an improvement (and you look cool peering through one in the light).

But it seems my "conditions" coincided with fairly accurate weighing scales becoming substantially cheaper! This fortunate coincidence not only meant I could continue brewing with an alternative to a "hydrometer", but also have a substantially better instrument for the job. How long before everyone is using an alternative for hydrometers?

Image

A "Pyknometer"! This one is a big one (100ml). I'd normally use 25ml bottles. These scales have been tricked into displaying the "SG" of the sample directly ... SG 1.0217 (move decimal point back two). But that's for later: For now, the total weight was 137.36g and the temperature just short of 20°C (19.8°C) ...
Last edited by PeeBee on Sat Jan 13, 2024 2:28 pm, edited 1 time in total.
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Wed Jan 10, 2024 3:32 pm

... A pyknometer does need a little maths to make it work. They are not setup for brewers to use off-the-shelf just yet. But I've created a couple of spreadsheets to do that for you (This thread was created to make those spreadsheets readily available). The "Lite" version is attached to this post ("Lite" in that it doesn't do all the fancy "stand-alone" stuff).
Pyknometer Calculations (LITE).jpg
Pyknometer Calculations (LITE).jpg (52.79 KiB) Viewed 787 times
The bottle is weighed, and the temperature of the sample taken. These two values are plugged into the spreadsheet and out pops the answer ... SG 1.0215.

Hang on! I said temperature compensation is automatic! Well, it is, but thermometers are so cheap and easy to use, it's just quicker to take the temperature. The spreadsheet uses this to lookup the density of water at that temperature and use that as the S.G. reference. The temperature doesn't need to be crazy accurate; it only applies to the S.G. water reference, not the sample (that is already effectively "compensated").
20240110_134624_WEB.jpg
20240110_134624_WEB.jpg (69.01 KiB) Viewed 787 times

[EDIT: I've sorted access to the spreadsheet now, via a public share on my Google drive. I forgot we're limited to the files we can share on the forum. Download the file from the options (it's the "Lite" version); if you open the file on the Google drive it will open in Google "Sheets" which might not be what you want - you cannot save changes from there! The spreadsheet is created in Excel, and only tested (briefly) in Google Sheets (Google "Sheets" does not respect cell protection setting so it is up to you to edit only the few Amber coloured boxes or else trash your copy of the spreadsheet).

Also at that location is the "Full" version but I haven't introduced that in this forum thread yet. The "Lite" version may be changed shortly to include a "Density Only" option (currently SG only), because you can do that with pyknometers and it can be handy at times.

The spreadsheets have no passwords set.]

Pyknometer Calculations (downloads)
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Thu Jan 11, 2024 3:29 pm

The "Full" version has the "standalone" capacity ... the spreadsheet is only used to calibrate and after that the SG can be read directly from the weighing scales. It only works with 100ml pyknometer bottles (it may work with 10ml bottles, but you will need very accurate, and expensive, weighing scales ... good to three decimal places of a gram, perhaps four!).

The first step is like the "Lite" version: On the "Calibration page fill in the actual (ambient) temperature that the pyknometer bottle and the sample (water) have been standing around in, then fill in the weights of the dry bottle followed by the water filled bottle.
Pyknometer Calculations (FULL) i.jpg
Pyknometer Calculations (FULL) i.jpg (44.04 KiB) Viewed 746 times
And on the same page the details that will be used to create Tare weights.
Pyknometer Calculations (FULL) ii.jpg
Pyknometer Calculations (FULL) ii.jpg (102.83 KiB) Viewed 746 times
(There are some unusual parameters in this section: There were two ways of dealing with parameters for pyknometers, and I was using a "virtually adapt the bottle" method to start and switched to "actual weights" later. This section wasn't changed from "virtual" 'cos it worked, and I couldn't be bothered changing it: So, it's a bit kooky? ... Put up with it!).

[continued...] What we are doing here is undoing any advantage the pyknometer has over a hydrometer and force it to operate at certain fixed temperatures. So, first off, we pick three temperatures to represent the temperature range we want to work over. Nothing too extreme, although some pyknometers are made from borosilicate glass (same as used by Pyrex), not for resistance to heat shock but to make the pyknometer dimensionally stable for very precise work (not determining the gravity of beer!). But all the same, I'm not comfortable with putting very hot water in a pyknometer bottle. For this tutorial I've picked 13.5°C, 20.0°C and 26.5°C (20.0°C would be the same temperature as a "standard" hydrometer used in much of the rest of the world).

Each temperature "configuration" has three parameters to control the error displayed in the simulation: A "zero" gravity where there would be no error (SG 1.040 is a good choice), how far either side of that point the error should be calculated (±0.060 seems good) and a minimum gravity to display an error to (1.000?). All temperature configurations may have the same error configuration, or each a different one as you please.

The result is effectively three hydrometers from the same pyknometer ... four if you count the "normal" pyknometer configuration. The spreadsheet works out the Tare weights for each, which we'll deal with next.



As a brief side-line to all this forcing pyknometers to work at specific temperatures: If a pyknometer determines the "specific gravity" of a wort to be 1.065 at 20°C, what will it be at 30°C?

This is a question that still messes with my head even though I do loads of theoretical work with pyknometers. So, I thought I'd let it mess with some of your heads too!

Answer: The same (1.065).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sat Jan 13, 2024 12:53 am

The "Simulation" page of the "Full" version allows situations to be tested. It is not required for real time operation as that is all carried out on the weighing scales. But the page does detail the size of "Tare Weights" that will be required. Instructions for building the weights follow later.

The example illustrates testing with an imaginary "SG 1.075" wort. The "blue" tare weight (35.30g) is selected as being configured for a temperature closest to the imagined environment. It would induce a negligible 1/10th of a gravity point error in this example.
Pyknometer Calculations (FULL) iii.jpg
Pyknometer Calculations (FULL) iii.jpg (77.71 KiB) Viewed 696 times
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sat Jan 13, 2024 1:41 am

The "LITE" version got an update to allow it to work with Density as well as Specific Gravity.
Pyknometer Calculations (LITE) ii.jpg
Pyknometer Calculations (LITE) ii.jpg (57.2 KiB) Viewed 696 times
This is using the three-year-old earlier demo using isopropyl alcohol. The Density of 0.786 g/ml confirmed what I had was 99% alcohol. Remember that when working with Density (g/ml) the temperature of the sample is important (no temperature compensation like built into S.G.).

I prefer the Lite version but created the stand-alone "Full" version because people are likely to prefer its stand-alone and with "hydrometer" like workings.

(Google Sheets does not support those Radio Buttons, so in "Sheets" it looks as if nothing has been done!).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sat Jan 13, 2024 6:31 pm

Another side-line! ("Mashbag" may approve of this bit!).

If you haven't a hydrometer or pyknometer even! You could try this (which might not be particularly accurate!). It's a demonstration of how simple pyknometers are using "Specific Gravity", and questions why we bother with hydrometers these days.

Have some water kept near the wort sample for an hour or two (so the temperature of the two liquids is about the same). Take a one litre PET bottle and fill it to the brim. Carefully replace the cap. Do not hold the bottle while doing this, have it free-standing on a flat surface. Weigh the bottle. Rinse out the bottle and repeat with the wort sample. The weighing scales can be ordinary kitchen scales capable of weighing grams, of tenths of grams would be better. The scales don't have to be too accurate a gram or two out is fine, but they should be consistent! (Mine aren't, in the following example the wort sample weighed between 1,096grams and 1,101grams!). For sharper accuracy delete the weight of the empty bottle for both the sample weights (37g in my example).
20240113_152724.jpg
20240113_152724.jpg (29.96 KiB) Viewed 637 times
...
20240113_144234.jpg
20240113_144234.jpg (34.13 KiB) Viewed 637 times
Easy maths: WEIGHT OF WORT / WEIGHT OF WATER ... 1,059 / 1,027 = SG 1.039

Note no temperature, or even bottle volume! Those values would just cancel out in the maths.


Just for interest, let me see what the pyknometer makes of it (this is a classy 100ml pyknometer ... very flashy):
Pyknometer Calculations (LITE) iii.jpg
Pyknometer Calculations (LITE) iii.jpg (62.59 KiB) Viewed 637 times
Oooo! That were jammy! This method with PET bottles is a bit crude ... don't expect results quite as good usually (especially if using some naff kitchen scales like mine).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sun Jan 21, 2024 3:35 pm

I'm forgetting, I'm missing a great big chunk of explaining in what I'm recording here. So, for this topic I'll reverse the translating from here to the "HBT" forum and copy from the HBT forum to here ...

[continued] ... Using the "Full" version of my spreadsheet I got the details to create three "taring" weights configured for 13.5°C (blue), 20.0°C (green) and 26.5°C (red).

At this point I realise that this idea is a non-starter! Anyone who is happy enough to create these "Taring weights" will be quite happy using the pyknometer normally and wouldn't give a fig about reading the S.G. directly off the weighing scales! And I guess I'm one of them. Still, I've gone this far ...
Pyknometer Calculations (FULL) weights.jpg
Pyknometer Calculations (FULL) weights.jpg (71.16 KiB) Viewed 462 times

The difference between the lightest (blue) weight and heaviest (red) weight is a massive ... 0.29 grams! Guess it's a good test of how okayish your weighing scales are. And your patience. Made from small glass vials, stainless steel ball-bearings, and coloured plastercine (top & bottom) to identify the weight, tune the weight, and stop the balls rattling about. You will need a partial lobotomy to attempt making them. I've had mine!

Now something to try it on ...
Pyknometer Calculations (FULL) sample.jpg
Pyknometer Calculations (FULL) sample.jpg (72.98 KiB) Viewed 462 times
(Just to check the sample I'm going to use). Run it through the "Lite" spreadsheet, I've already taken the temperature:
Pyknometer Calculations (LITE) sample.jpg
Pyknometer Calculations (LITE) sample.jpg (61.62 KiB) Viewed 462 times
S.G. is 1.040, the virtual water reference temperature was 16.6°C (61.9°F) ... [to be continued]
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sun Jan 21, 2024 3:50 pm

[continued] ... Pick a "taring weight": With it at 16.6°C it's half-way 'tween the blue and green weights; I'll go for blue (13.5°C). This is the same as picking a 13.5°C configured hydrometer:
Pyknometer Calculations (FULL) test.jpg
Pyknometer Calculations (FULL) test.jpg (79.08 KiB) Viewed 461 times
Hit the Tare button (display zeroes) and replace weight with the sample in the pyknometer:
Pyknometer Calculations (FULL) testi.jpg
Pyknometer Calculations (FULL) testi.jpg (75.1 KiB) Viewed 461 times
Gaww, I'm a lucky so-so! That says S.G. is 1.040 (shift decimal point left two). One-tenth of a gravity point difference from a true pyknometer reading (recorded in my last post). But before I crow about it too much (it's the first time I've tried it properly) the result should have been about midway 'tween the simulated "blue" output and the simulated "green" output ('cos the actual temperature was between that configured for blue and green). Say 1.0404. Still, I'm not hunting for a two-tenths gravity point error.


Anyway. Back to earth. This is a barmy impractical trick which I've already given up on. You've got the calculations (spreadsheet), so do with it whatever you want! (If you can make money from it, please mention my name as the loony who created it).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
PeeBee
Under the Table
Posts: 1579
Joined: Thu Jan 21, 2016 2:50 pm
Location: North Wales

Re: SG and Temperature Compensation

Post by PeeBee » Sun Jan 21, 2024 4:27 pm

I also did this little illustration: How many think the S.G. of water is "one" because the gravity of water is "one"? You wouldn't be alone if you did, I did once, and so did the guy who wrote this in a very authoritative manner ...

This from a rather well-known Web-site (okay, Wikipedia then). It's probably just badly written and putting across the wrong idea, the rest of the article is okay. But it also possibly comes from the academic world and they should have been more careful:
Wikipedia Clip.jpg
Wikipedia Clip.jpg (102.65 KiB) Viewed 459 times
"S.G. for liquids is nearly always measured with respect to water at its densest (at 4°C or 39.2°F); ... ". What's water at its densest got to do with it? It would only make sense if the sample was at 4°C too. That's the sort of nonsense I'd like anyone to be able to identify and ignore. Along with "why do I need to worry about temperature and measuring density", "why do hydrometers measure values (S.G.) if it's quite inappropriate to a hydrometer", and the like.

Just to prove that:

Density of water at 4°C ... 0.999973g/ml (Source: https://www.simetric.co.uk/si_water.htm)

Density of water sample at 20°C ... 0.998203g/ml

Therefore: S.G. of water ... 0.998203 / 0.999973 = 0.998229 ... (S.G. = 0.998)

Yeah! :pink: ... Hang on? Isn't the S.G. of water One?

Tiny differences in the numbers, but that's what it's all about! This would be the output of a "density hydrometer" or an SI standard hydrometer (configured as "20°C/4°C"). If the hydrometer was an "ordinary" one, configured as 20°C/20°C (normal for most of the world) the result would have been One! (Because any positive number divided by itself is "one"!).
Cask-conditioned style ale out of a keg/Cornie (the "treatise"): https://drive.google.com/file/d/0BwzEv5 ... rDKRMjcO1g
Water report demystified (the "Defuddler"; removes the nonsense!): https://drive.google.com/drive/folders/ ... sp=sharing

Post Reply