**Sumerian Beer Ingredients and eTCL Slot Calculator Demo Example , numerical analysis** This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply understandably without some background of the correspondent. Thanks,[gold] ---- <> *** Introduction *** [gold] Here is some eTCL starter code for calculating beer ingredients from Sumerian brewery accounts. The impetus for these calculations was checking daily quotas as N1 silas of beer per day in the CDLI Equivalency list. Most of the testcases involve replicas or models, using assumptions and rules of thumb. *** Trial Calculations *** Lets make some trial calculations from beer ingredients and daily quotas, used in CDLI Equivalency list ( mostly Neo-Sumerian, 2300 BCE) . The calculations will keep extra significant figures for checking a future eTCL calculator, but the calculations are really order of magnitude. The key phrases are 1) kasz 2 ban2, 2) kasz 3 ban2, and 3) kasz 4 ban2, which relate the quality of beer or more properly ale to the volume unit (ban2). A ban is 10 sila units or 10 liters, so a paraphrased translation would be beer of 20 liters quality , beer of 30 liters quality, and beer of 40 liters quality. The ban, sila, and modern liter are volume quantities, which were used to measure beer, barley, wheat, malt, and other grain products. Most of the beer products, beer ingredients, and jars use volume units in the cuneiform texts. Necessarily. the calculations and rules of thumb will start out in volume units. All the philological problems have not been solved, but some trial calculations can be made based on beer quality in silas, various volumes of beer jars, and rules of thumb from modern amateur brewers. ***Rules of Thumb*** Rules of thumb can be developed from modern amateur brewers. The simplest product for study is cane sugar wine, which is based on 4 lbs or 1.8 kgs sugar to 4 quarts of water. For the first fermentation, one needs only half the sugar and water in a gallon jug. Add juice of two lemons to the sugar water and simmer for 2 minutes or until sugar is dissolved. Then let cool and add starter yeast with a fermentation lock. The volume ratio of sugar to original water would be {granulated sugar volume}/{water volume}, be (4*.453592*(1000 /850))/(4*.946326), decimal 0.5639, rounded 0.56 or fraction 34/60. For a short brew time of 24 hours, bread yeast or even wild yeast will produce an alcohol content of 10 to 14 percent. For a second fermentation with remaining sugar and longer brew time of 2 to 4 weeks, wine yeast will produce an alcohol content of 17 percent. The gist is that 10 kgs of sugar will turn into 3 to 3.5 liters of alcohol. If the brewing is incomplete or deliberately stopped (eg, boiling, freezing, or cooking), the sugar wine will have some residual sugar and taste sweet to some extent. Some portion of the original water volume (~1/5) is usually lost in evaporation, spillage, or boiling. For order of magnitude calculations, an open brewing vat should be about 2.5 times the original liquid volume. Similar rules of thumb can be developed for malt sugar (maltose) and spent malt in its various forms: damp, dried, and dried ground malt. The densities are maltose (481 to 561 kg/1000 liters), spent damp malt (1041 kg/1000 liters), spent dry malt (160 kg/1000 liters), and dried ground malt (320 kg/1000 liters). The volume ratio of maltose to original water would be {powered sugar volume}/{water volume}, be (4*.453592*(1000 /560 ))/(4*.946326), decimal 0.85592, rounded 0.85, or fraction 50/60. The volume ratio of dried ground malt to original water would be {dried ground malt volume}/{water volume}, be (4*.453592*(1000 /320 ))/(4*.946326), decimal 1.49787, rounded 1.5 or fraction 90/60. The ratio of dried malt over damp malt would be {dried malt}/ { damp malt }, 160/1041 kg, 0.153698, rounded 0.15, or fraction 1/6. The ratio of dried malt over damp malt would be { dried malt }/ {ground dried malt}, 160/320 kg, 0.5, or fraction 30/60. The various malt products can be expressed as fractions of the original barley grain volume from modern metric standards. One figure for kernel barley was 641 kg per 1000 liters. Depending on particle size, ground barley ranges from 400 kgs for cracked or groats barley to barley flour at 481 kgs per 1000 liters. The ratio of spent damp malt over barley grain would be { spent damp malt }/ {dry kernel barley }, 1041/641 kg, decimal 1.62402 , fraction 98/60, or rounded 3/2. The ratio of dried ground malt over barley grain would be { dried ground malt }/ {dry kernel barley }, 320/641 kg, decimal 0.4992 , or fraction 30/60. In most of the ancient texts on beer, it is difficult to determine absolutely that the original starting ingredient is kernel barley, coarse barley, or some malt stage. From the ranges of modern barley flour, the error in barley flour density could be as high {(481/400-1)}, decimal 0.20249, or 20 percent. Returning to the sugar wine calculations, the ground dried malt can be substituted for the cane sugar. The ground dried malt is between 57 to 66 percent sugar. The conversion would be (4 lb*100)/66, 6.06 lb, or 2.749 kg ground malt. The volume ratio of malt to original water would be {dried ground malt volume}/{water volume}, be {6.06*.453592*(1000 liters/320 kg)}/{4*.946326}, 2.2 . The beer qualities (20,30,40 sila) are thought consistent in adding malt ingredient to a certain size vat of water. The main candidates for vat size are 60 sila or 300 liters. In the CDLI Equivalency list, there is a dug lahtan (collector vat) of one gur size or 300 liters, which took the potter about 10 days to produce. ***Beer Qualities *** The beer qualities of 20,30,40 liters are thought to be stages of alcohol, possibly 0.5%,0.73%,1.0% from a 300 liter vat. The malt rules of thumb can be used to estimate the equivalent dried malt, malt sugar, and alcohol content. The malt for the 20 liters quality would be 20 liters*(320/1000), 6.4 kg malt or 4.2 kg maltose. The conversion to alcohol is 4.2 kg*(3.5/10), 1.47 liters alcohol. For a vat of 300 liters, 1.47/300 liter vat is 0.5 percent alcohol. The malt for the 30 liters quality would be 30*(320/1000), 9.6 kg malt or 6.3 maltose. The conversion to alcohol is 6.3 kg*(3.5/10), 2.205 liters alcohol. For a vat of 300 liters, 2.205/300 liter vat is 0.73 percent alcohol. The malt for the 40 liters quality would be 40*(320/1000), 12.8 kg malt or 8.5 kg maltose. The conversion to alcohol is 8.5 kg*(3.5/10), 2.975 liters alcohol. For a vat of 300 liters, 2.975/300 liter vat is 1.0 percent alcohol. Some of the accounts appear to add amounts of coarse ground barley or ground wheat as unmalted ingredients to the mix, which may have increased the alcoholic content and thickness of the brew. ***Grain budget *** The grain or grain flour solids that were lost in malting and fermenting were compensated by adding se_bappir (lit. grain for brewing) and se_bala (lit. grain lost or grain deficit). The se_bappir was an unmalted and cooked coarse barley flour mash, somewhat like a cold barley porridge or cold mush. Cooking a grain flour in water makes the starch more available to yeast and probably kills wild yeast. Some modern beers contain unmalted barley in levels of 10 to 50 percent mash, with the higher levels than 10/15 percent leading to a foamy opaque stout beer. The se_bala was a yeast dough with malt sweetner and spices, either baked or unbaked. The se_bala has the same term bala that used as loss, deficit, or crossing accounts on the Neo-Sumerian account books. From the account books, the Neo-Sumerians were keeping track of deliveries of beer ingredients, the product output, and daily quota of the brewers. Se_bala can be either a barley or wheat product using malt as a sweetener. The raw spice dough or baked sweet cake was added to the vat as barley based (1/3) or wheat based (1/6) times malt volume. A simple formula would be sumerian_beer = barley_malt (dried and ground malt) + (quality factors 2,3,4 liters )* se_bappir (unmalted cooked barley flour, mash) + (1/3 to 1/6 malt volume)* se_bala (balance of sweet cake or spice dough including agglutinised starch) + yeast + water. ***Yeast Spice Dough*** The impression is that se_bala was a yeast spice dough added last either as a yeast starter from a raw bread dough or as a second fermentation adjunct and finish to the beer. There appears room for both interpretations over the long eras of Sumerian beer. Spice dough appears in two forms: barley dough (se_bala) or wheat dough (imgaga). Both spice dough forms included malt enzymes in the raw dough and agglutinised starch in solubilization and gelatinization, easier for the malt enzymes to turn. The wheat dough or wheat ingredient was called imgaga (lit. oven_baked? dehusked? beer? beer? nominative?). Ga originally referred to sour milk or sour liquid and ga is reduplicated here, so imgaga as "oven_baked sour sour batter" is acceptable. A raw yeast dough of ground wheat might give extra body, foam, and possibly red or yellow colors. In other words, a wheat dough or batter adjunct would give a different beer finish than the straight barley dough adjunct. Some modern brewers use unmalted ground wheat as an 15 percent adjunct to increase body, foam retention, and retain clarity over straight barley. In some cases, the spice dough was baked, killing the inherent yeast, nulling malt enzymes, and toasting the grain somewhat. Toasting the barley dough in increasing degrees would give different flavors as roasted barley taste, caramel taste, dry burnt taste, or brown coloring to the beer. The spice dough process was somewhat similar to modern amateurs after the main fermentation in adding a sugar syrup for a primer or kicker, second fermentation for more alcohol, or ground wheat for extra body and foam. There has been some debate on whether the se_bala and the se_bappir was added before fermentation or after main fermentation. Not so much on philogical grounds, but it does make economic sense to add the extra expenses after the main fermentation is tested and sound (eg. not sour or vinegar). The origin of se_bala as sweet malt cake or spice dough was a sort of religious cake or cookie handed out in Mesopotamian temples. This spice cake or spice dough is sometimes translated to English as raisin cake or honey cake in the bible. Maybe false cognates, but the root word bal shows up from Latin, Greek, and Hebrew as balm (salve), balsam (sweet gum), or balmy (weather). There are analogies to spiced cakes and spiced dough in many cultures. *** Beer and Jar Types *** Vessel sizes of 1,5, and 30 liters have been associated with beer in the cuneiform texts. The 1-liter is both the size of a common grain ration and the common beer ration, although a beer ration of 2-liters is also cited in the texts. The 5 sila, 20, and 25 sila jars were the standard beer bottles or beer jars in modern terms. The 20 and 25 sila jars were used to deliver beer, but were also used as fermenting containers or mixing containers. What is sometimes called a storage jar of 30 silas was also used as a beer brewing vat or beer keg. Cane straws or drinking tubes were used to sip the beer. The potters made a sort of ceramic drinking tube. The ceramic tubes or cane straws are occasionally mentioned in the texts and illustrated on the clay seals. Note that the 30 sila or 30 liter capacity in beer would weigh 30 liters*1 spg. or 30 kilograms and match the full manload (60 manas). This brings us to Gold's correlary; any three items in a Sumerian trash bin will most likely be associated with beer. There is circumstantial evidence that the 60 and 300 liter size were used as fermentation vats, while not ruling out other sizes. The CDLI quota list has kasz du (sweet beer ) listed as 2 ban or 20 silas per day. Suggest that an open vat would have to be 2.0 to 2.5 times the initial liquid. The open vat could have been 2*20 to 2.5*20, ranging from 40 to 50 silas, which would fit inside the 60 sila size. Another beer quota called for kasz (no description) of 7.5 sila per day and 7.5 sila per day. The CDLI holdings of 42,80,57 spice bowls which might imply 42 to 80 batches a month at the brewery. The average would be (42+80+57)/3, 59.6, rounded up 60 batches a month. Trial calculation would be 12*60*300, 2.6E5 liters per year at the brewery. ***Old-Sumerian beer *** The Old-Sumerian beers are primarily known by color from the beer lexicon. Some of the colored beers used ether emmer wheat, ziz wheat, or imgaga (wheat product). *** Archaic Beers and Jars*** The earlier Jamdat Nasr vessel or dug(a) standard for archaic beer was checked or bounded by rules of thumb. A liter of grain needs 1.5 to 3 liters of water and cooking/agitation/kneading_dough for best starch gel for efficient malt action, according to modern brewers. Also, an open vat should be 2 times liquid mash. The archaic fine beer would need from (6 grain +6*(3/5))*1.5 to (6 grain +6*(3/5))*3, from 14.4 to 28.8 liters of water. Another text has archaic fine beer as 8 grain liters to ferment, which requires from 8 grain*1.5 to 8*3,12 to 24 liters of water. Using proportions of the later common beer, the archaic regular beer requires (1.66 grain *300 water)/20 grain, 24.99, rounding 25 liters of water (Neo-Sumerian, 2300BCE). The later Neo-Sumerians counted one liter beer as equal to one liter grain. One liter grain was the ration of the common man and 30 liters was the ration of a 30 day month (2300 BCE). The Jamdat Nasr grain unit of 25 liters was considered a monthly ration in archaic times. Possibly, the Jamdat Nasr vessel was a monthly ration of regular beer at 25 liters, same equivalence as the JR. grain unit. Though not conclusive, the rules of thumb suggest the Jamdat Nasr vessel dug(a) was 20 to 25 liters and the Jamdat Nasr vessel fermenting vessel was at least 60 liters minimum. There is interest is rating the archaic beers on the Neo-Sumerian beer quality scale. The eTCL calculator was written for the Neo-Sumerian units of volume, but some archaic units or symbols in proto-cuneiform have not been confirmed. Defining the archaic beers in the eTCL calculator would help understanding of the archaic units. The archaic regular beer is scaled from the Neo-Sumerian regular beer at grain dilution or ratio of 20 grain liters to 300 liters volume, equally the volume of the 1) nominal vat size and 2) large grain unit called the gur. This tends to be a circular argument if one is not careful {A>B>C=?A, :. A}. In this report, the archaic beers have different grades, which are referenced to the grain equivalent of beer in an unknown size jar. The math problem is set so that the archaic grain ratios between the archaic beers are solved rather than the unconfirmed grain unit NX and unconfirmed beer jar volume. Converted to denominator 60 like base 60 fractions, the archaic beer grades are 20/60, 24/60, 72/60, and 84/60 in grain unit NX. The second archaic beer grade over the first grade is (24/60) over (20/60), reduction 24/20. Using ratios, the Neo-Sumerian regular beer over regular beer is 20/20, good beer over regular is 30/20, and the fine beer over regular is 40/20. We observe that the archaic beer grade ratio { 24/20 } does not equal ether the N.S. good beer ratio 30/20 or the N.S. fine beer ratio 40/20 from the Neo-Sumerian era. The archaic upper grades are factors 1.2, 3.6, and 4.2 times the nominal regular grade, whereas the Neo-Sumerian upper grades are 1.5 and 2 times the regular beer. However, the archaic beer 20/60 or reduction 1/3 in unknown units may be equivalent to the Neo-Sumerian kas 20 liters, the regular beer of the common man. The beer lexicon contains the term kas 1 taam (beer of 1 part its ), which refers to a beer of 1/3 fraction. Using proportions and assumptions, the archaic beer 24/60 converts to (24/60)*20/(20/60), kas 24 liters. The archaic beer ratios 20/60, 24/60, 72/60, and 84/60 referenced to unit NX convert to the Neo-Sumerian scale as kas 20, kas 24, kas 72, and kas 84 liters. *** Instant Beer, Just Add Water *** Some beer types or beverages were equivalents or beer concentrate with 1/3 water, ref. Peter Damerow in Sumerian Beer Technology. Perhaps this was an accounting ploy giving equivalencies of beverages, but it is an interesting idea or headline. The beer concentrate was called dida saga , { lit. small barley_flour? good}. The root word da is related to dabin, barley groats or barley flour. Similar beer and jar coproducts are found in the CDLI Equivalency list. A full 20-sila jar would weigh at least 20*1 spg or 20 kg, converting to 20/.4977, 40 manas. The 2/3 full jar would weigh 40*(2/3), 26.66 manas. Including the clay jar , the package of 2/3 full concentrate would weigh roughly 30 manas, the half manload in URIII (circa 2300 BCE). Its possible this dida saga beverage concentrate was shipped to a ration distribution site and diluted with local water. The procedure with the dida beverage may be similar to the much later Romans mixing wine with water (circa 40 BCE). ***Prices for Sumerian beer and dida beverages*** From the equivalencies list, the theoretical price of Sumerian beer and dida beverages can be estimated, but not as much confirmation in the texts. The price for regular beer (kasz du or 20 liter) was one silver piece for 300 liters (1:1 grain to beer liters). The price for good beer (kasz saga or 30 liter) was one silver piece for 200 liters ((300*20)/30). The price of fine beer (kasz 40 liter) was one silver piece for 150 liters ((300*20)/40). In alcoholic content, the dida du beverage was roughly equivalent to regular beer (kasz du) and the dida saga beverage was equivalent to the good beer (kasz saga or 30 liter). Here, alcoholic content is based on the efficiency of the dida malt in converting sugars vis added unmalted grain in the regular beers. The dida saga beverage was rated as kasz 15 liters in grain equivalents and that equivalent theoretical price was 400 liters for a silver piece ((300*20)/15). The dida du beverage was rated kasz 10 liters in grain equivalents and that equivalent theoretical price was 600 liters for a silver piece ((300*20)/10) and 2 for 1 with regular beer. Some trade listings show numbers of jars or pots of beer, which can be tricky conversions. For CDLI examples, 9(disz) dug dida du sze-bi 2(barig) 4(ban2), 9 jars dida du its grain 2*60 silas + 4*10 silas, converting 160 barley liters / 9 jars. The jars of dida du average 17.7 barley liters. If the jar has a 20 sila capacity, possibly the price comparison would be (180*300)/(9*20), 337.5 beer liters of dida du for one silver. Another example, 1(u) 2(disz) dug? dida du sze-bi 4(barig), 10 + 2 jars? dida du its grain 4*60, converting 240 barley liters /12 jars. The jars of dida du average 20 barley liters. Probably, the second trade assumes a 1:1 conversion for dida du like regular beer (kasz du). *** Uses of the eTCL calculator*** Model Problem. A trade agent has standard jars of 20 silas. After buying a 300 sila vat, bottling proceeds on beer brand "kasz saga " of 4 ban or 40 silas quality. Here the sila volume unit is counted as one modern liter. What is total price of wine and the price of the wine bottles on the books? Using the hand calculator, kasz 40 liter was one silver piece for 150 liters ((300*20)/40). Price of the vat would 300/150, 2 silver pieces. The vat will fill 300/20, 15 jars. Each 20-liter jar is 20*(1/150), 0.133 silver piece or (0.133*300), 40 liters of trade grain. Loading 300/1/40 into the eTCL calculator, the calculator estimated vat price as 2 silver pieces or 600 liters of trade grain. Loading bottle size 20/1/40 into the eTCL calculator, the calculator estimated price 20 liter bottle as 0.13 silver piece or 40.0 liters of trade grain. As check on eTCL calculator, look at jars of regular beer kasz du of 20 liters quality, which traded on 1:1, beer silas for grain silas. Loading 300/1/1, the calculator returns 300 liter vat of regular beer as worth 300 liters of trade grain. Loading 20/1/1, the eTCL calculator returns the 20 liter jar of regular beer as worth 0.066 silver piece or 20.0 liters of trade grain. *** Push Button Operation *** For the push buttons in the eTCL calculator, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console. For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers. The current result numbers will be cleared on the next solve button. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the functions (subroutines). ---- *** Neo-Sumerian Beer Quality Ratings*** %|table 1|printed in| tcl wiki format| | | |% &| Beer Type | English trans. & |Quality Rating liters| Theoretical price liters (1 silver buys)| tenative percent alcohol |comment |& &| dida du :| malt sweet| dida? 10? liter | 600 | 0.55 | Neo-Sumerian|& &| dida saga :| malt good | dida? 15? liter | 400 | 0.88 | Neo-Sumerian|& &| dida imgaga :| malt wheat | dida 20 liter | 200 | 1.8? | Neo-Sumerian, rare terms|& &| dida saga :| malt wheat | dida 30 liter | 150? | 2.4? | Neo-Sumerian, rare terms|& &| kasz du :| sweet beer | kasz 20 liter| 300 | .5 |Neo-Sumerian |& &| kasz saga :|good beer| kasz 30 liter | 200 | .73 | Neo-Sumerian|& &| kasz saga :| beer| kasz 40 liter | 150 | .9 |Neo-Sumerian |& *** Old-Sumerian beers by color *** %|Old-Sumerian beers by color, Archaic beers below | | |printed in| tcl wiki format|% &| beer type| English trans & | | | comment, if any|& &| kasz sig15: | beer golden? | uses imgaga | ass. with ziz sig15, golden wheat |& &| kasz ge15 | beer dark |uses titab | ass. with ziz sig15, golden wheat |& &| kasz ge6 du10-ga | beer dark sweet nominative? | |ass. with emmer wheat |& &| kasz sa4 | beer red? | uses imgaga | Akk. saamu from beer lexicon |& &| kasz sur-ra | beer strained | uses imgaga | |& &| >>>>>| >>>>| archaic pot/beer combos | archaic less known, tentative N.S.Q. quality rating |& &| dug(a) kas(a) | jar beer <20/60 regular>| N.S.Q. kas 20 liters |& &| dug(a) kas(a) e2 dub| jar beer house round <24/60 good?>| N.S.Q. kas 24 liters |& &| kas(a) | beer <72/60 fine?>| N.S.Q. kas 72 liters |& &| kas(a) | beer <84/60 fine?> | N.S.Q kas 84 liters |& *** Pseudocode and Equations *** ====== #pseudocode can be developed from rules of thumb. #pseudocode: some problems can be solved by proportions (rule of three), to some order of magnitude #pseudocode: enter quantity1, quantity2, quantity3 and expected output (quantity4) for testcases. #pseudocode: enter time in years, number of remaining items #pseudocode: output fraction of (remaining items) over (items at time zero) #pseudocode: ouput remaining items as fraction or percent #pseudocode: output fraction of (quantity4 ) over ( quantity1 at time zero) #pseudocode: output fraction of (quantity2) * (quantity3 ) over (quantity1 at time zero) #pseudocode: outputs should be in compatible units. #pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out. #pseudocode: need test cases > small,medium, giant #pseudocode: need testcases within range of expected operation. #pseudocode: are there any cases too small or large to be solved? ====== ---- ***Testcases Section*** **** Testcase 1 **** %|table 1|printed in| tcl wiki format|% &| quantity| value| comment, if any|& &| testcase number:|1 | |& &| 4.0 :|original water liters | |& &| 0.015 :|barley malt liters, munu & titab (optional) | |& &| 2.0 :|quality factor, add unmalted grain se_bappir (1,1.5,2,3,4 *10_liters)| |& &| 1.0 :|spice dough adjunct logical 0/1/>0 (optional)| |& &| 0.0 :|wheat adjunct logical 0/1 (optional, supersedes if not zero)| |& &| 8.0 :|vat volume liters (optional)| |& &| 300.0 :|liters for 1 silver, price from quality factor| |& &| 0.0133 :|fraction silver piece, vat or bottle price from original water| |& &| 4.0 :|silas grain price, vat or bottle price from original water| |& &| 0.5 :|percentage alcohol, tentative estimate from quality factor| |& &| 0.266 :| proportional grain per original water | |& &| 0.0333 :| liters malted barley per original water (munu, tibir) | |& &| 0.222 :| liters unmalted grain per original water (se_bappir) | |& &| 0.0111 :| liters barley spice dough per original water, loaded if logical > 0 (se_bala) | |& &| 0.00555 :| liters wheat (imgaga) adjunct per original water, loaded if logical 1 | |& &| 2.0 :|answers: quality factor or finish factor | |& &| 4.63696 :|beer volume liters | |& ---- **** Testcase 2 **** %|table 2|printed in| tcl wiki format|% &| quantity| value| comment, if any|& &| testcase number:|2 | |& &| 60.0 :|original water liters | |& &| 0.5 :|barley malt liters, munu & titab (optional) | |& &| 4.0 :|quality factor, add unmalted grain se_bappir (1,1.5,2,3,4 *10_liters)| |& &| 1.0 :|spice dough adjunct logical 0/1/>0 (optional)| |& &| 0.0 :|wheat adjunct logical 0/1 (optional, supersedes if not zero)| |& &| 120.0 :|vat volume liters (optional)| |& &| 150.0 :|liters for 1 silver, price from quality factor| |& &| 0.4 :|fraction silver piece, vat or bottle price from original water| |& &| 120.0 :|silas grain price, vat or bottle price from original water| |& &| 1.0 :|percentage alcohol, tentative estimate from quality factor| |& &| 8.0 :| proportional grain per original water | |& &| 1.0 :| liters malted barley per original water (munu, tibir) | |& &| 6.666 :| liters unmalted grain per original water (se_bappir) | |& &| 0.333 :| liters barley spice dough per original water, loaded if logical > 0 (se_bala) | |& &| 0.1666 :| liters wheat (imgaga) adjunct per original water, loaded if logical 1 | |& &| 4.0 :|answers: quality factor or finish factor | |& &| 87.5544 :|beer volume liters | |& ---- **** Testcase 3 **** %|table 3|printed in| tcl wiki format|% &| quantity| value| comment, if any|& &| testcase number:|3 | |& &| 300.0 :|original water liters | |& &| 1.25 :|barley malt liters, munu & titab (optional) | |& &| 2.0 :|quality factor, add unmalted grain se_bappir (1,1.5,2,3,4 *10_liters)| |& &| 1.0 :|spice dough adjunct logical 0/1/>0 (optional)| |& &| 0.0 :|wheat adjunct logical 0/1 (optional, supersedes if not zero)| |& &| 600.0 :|vat volume liters (optional)| |& &| 300.0 :|liters for 1 silver, price from quality factor| |& &| 1.0 :|fraction silver piece, vat or bottle price from original water| |& &| 300.0 :|silas grain price, vat or bottle price from original water| |& &| 0.5 :|percentage alcohol, tentative estimate from quality factor| |& &| 20.0 :| proportional grain per original water | |& &| 2.5 :| liters malted barley per original water (munu, tibir) | |& &| 16.666 :| liters unmalted grain per original water (se_bappir) | |& &| 0.833 :| liters barley spice dough per original water, loaded if logical > 0 (se_bala) | |& &| 0.416 :| liters wheat (imgaga) adjunct per original water, loaded if logical 1 | |& &| 2.0 :|answers: quality factor or finish factor | |& &| 347.772 :|beer volume liters | |& ---- ---- ***References:*** * Accounting in Proto-Cuneiform - Oxford Handbooks * Grain Accounting Practices in Archaic Mesopotamia,” in: J. Høyrup and Peter Damerow, eds., Changing Views on Ancient Near Eastern Mathematics (=BBVO 19; Berlin, 2001) 1-35 * Zarnkow et al. 2006, On beer brewing activities at Tall Bazi * CDLJ 2012002 Notes, Sumerian Beer: The Origins of Brewing Technology in Ancient Mesopotamia * Hartman, L. F. and Oppenheim, A. L., (1950) On Beer and Brewing Techniques in Ancient Mesopotamia. PDF (7.92 MB) Supplement to the Journal of the American Oriental Society, 10. Retrieved 2013-09-18. * Successful Winemaking at Home, H.E. Bravery,1961 * Mesopotamian civilization: the material foundations / D.T. Potts,. 1997 * Sumerian Beer: The Origins of Brewing Technology in Ancient Mesopotamia,Peter Damerow ,Max Planck Institute for the History , CDLI report 2012:002 * Equivalency values of the UR III period, Robert K. Englund, CDLI Library[http://www.cdli.ucla.edu/cdlisearch] * Equivalency values page & CDLI MySQL search engine , CDLI Library [http://www.cdli.ucla.edu/cdlisearch] ---- **Appendix Code** ***appendix TCL programs and scripts *** ====== # pretty print from autoindent and ased editor # Sumerian Beer Ingredients Calculator # written on Windows XP on eTCL # working under TCL version 8.6.x and eTCL 1.0.1 # gold on TCL WIKI, 10nov 2014 package require Tk namespace path {::tcl::mathop ::tcl::mathfunc} frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {original water liters:} } lappend names {dry barley malt liters, munu & titab (optional):} lappend names {quality factor , add unmalted grain se_bappir (1,1.5,2,3,4 *10_liters) :} lappend names {spice dough adjunct logical 0/1/>0 , add se_bala (optional):} lappend names {wheat adjunct logical 0/1 (optional, supersedes if not zero) :} lappend names {vat volume silas (optional) : } lappend names {answers: quality factor or finish factor : } lappend names {beer volume liters :} foreach i {1 2 3 4 5 6 7 8} { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Sumerian Beer Ingredients from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc break_flag_routine { } { global side1 side2 side3 side4 side5 global side6 side7 side8 global spares global testcase_number set t9 $testcase_number set product_entries [* $side1 $side2 $side3 $side4 $side5 $side6 $side7 $side8] if { $product_entries < 0.0 } { puts " warning flag! negative numbers detected in product entries ref. tc$t9" } foreach item { 1 2 3 4 5 6 7 8 9 10 } { set error$item 0 } if { $side1 < 0.0 } { set side1 .000001 ; set error1 1 } if { $side2 < 0.0 } { set side2 .000001 ; set error1 1 } if { $side3 < 0.0 } { set side3 .000001 ; set error1 1 } if { $side4 < 0.0 } { set side4 .000001 ; set error1 1 } if { $side5 < 0.0 } { set side5 .000001 ; set error1 1 } if { $side6 < 0.0 } { set side6 .000001 ; set error1 1 } if { $side7 < 0.0 } { set side7 .000001 ; set error1 1 } if { $side8 < 0.0 } { set side8 .000001 ; set error1 1 } if { $error1 == 1 } { puts " warning flag! negative numbers detected, defaulted to positive entries ref. tc$t9" } foreach item { 1 2 3 4 5 6 7 8 9 10 } { set error$item 0 } return 1 } proc calculate { } { global answer2 global side1 side2 side3 side4 side5 global side6 side7 side8 global proportional_grain proportional_malt residual_grain global price_conversion alcohol_percentage proportional_spice_dough global proportional_wheat_imgaga_adjunct global price_fraction_silver price_grain_silas global testcase_number incr testcase_number set side1 [* $side1 1. ] set side2 [* $side2 1. ] set side3 [* $side3 1. ] set side4 [* $side4 1. ] set side5 [* $side5 1. ] set side6 [* $side6 1. ] set side7 [* $side7 1. ] set side8 [* $side8 1. ] break_flag_routine set barley_density 0.62 set wheat_density 0.78 set grain_density $barley_density set conversion 0.0 set dried_ground_malt 1. set original_water 1. set unmalted_mash_se_bappir 1. set spice_dough 1. set beer_quality_factor 2.0 set spice_dough_factor 1.0 set original_water $side1 set beer_quality_factor $side3 set flour_mash_conversion 0.27 set spice_dough_mash_conversion 0.27 set sumerian_beer 4. set beer_kasz_volume 4. set price_fraction_silver 1. set price_grain_silas 1. #sumerian_beer = $dried_ground_malt + $unmalted_mash_se_bappir + (1/3)*($spice_dough) + $yeast + $water. set dried_ground_malt [* $original_water [/ 3. 2. ] ] set unmalted_mash_se_bappir [* $dried_ground_malt $beer_quality_factor 1. ] set spice_dough_factor [/ 1. 3. ] set wheat_dough_factor [/ 1. 6. ] set spice_dough [* $dried_ground_malt $spice_dough_factor ] set sumerian_beer [* [* [* $dried_ground_malt [/ 320. 1000. ]] .55 .1 ] [/ 3.5 10. ] ] set flour_mash_conversion [* $unmalted_mash_se_bappir .1 ] set spice_dough_mash_conversion [* $spice_dough .1 ] set sumerian_beer [+ $sumerian_beer $flour_mash_conversion $spice_dough_mash_conversion ] set sumerian_beer [+ $sumerian_beer [* $original_water [/ 4. 5. ] ] ] set beer_kasz_volume $sumerian_beer set price_conversion 1.0 set proportional_grain 1.0 set alcohol_percentage 1.0 set proportional_malt 1.0 set proportional_spice_dough 1.0 set proportional_wheat_imgaga_adjunct 0.0 set residual_grain 1.0 set proportional_spice_doughx 0.0 set spice_dough_logical 0.0 set spice_dough_logical $side4 set wheat 0.0 set wheat_logical 0.0 set wheat_logical $side5 set price_conversion [/ [* 20. 300. ] [* $beer_quality_factor 10. ] ] set price_fraction_silver [* $original_water [/ 1. $price_conversion ] ] set price_grain_silas [* $price_fraction_silver 300. ] set proportional_grain [* [/ [* $beer_quality_factor 10. ] 300.] $original_water ] set alcohol_percentage [* [/ [* [* $beer_quality_factor 10. ] 0.5 0.5 [/ 3.0 10.0 ] ] 300. ] 100. ] set proportional_malt [* [* [/ [* $beer_quality_factor 10. ] 300.] $original_water ] [/ 1. 8.] ] set proportional_spice_dough [* $proportional_malt [/ 1. 3.] ] if { $spice_dough_logical > 0. } { set proportional_spice_doughx $proportional_spice_dough } set proportional_wheat_imgaga_adjunct [* $proportional_malt [/ 1. 6.] ] if { $wheat_logical > 0. } { set wheat $proportional_wheat_imgaga_adjunct } set residual_grain [- $proportional_grain $proportional_malt $proportional_spice_doughx $wheat ] #set side7 [* [/ $side1 $side2 ] 18.] #set side8 [/ [* [* [/ $side1 $side2 ] 1.] $grain_density] 1. ] set side6 [* $original_water 2. ] set side7 $beer_quality_factor set side8 $beer_kasz_volume } proc fillup {aa bb cc dd ee ff gg hh} { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" .frame.entry6 insert 0 "$ff" .frame.entry7 insert 0 "$gg" .frame.entry8 insert 0 "$hh" } proc clearx {} { foreach i {1 2 3 4 5 6 7 8 } { .frame.entry$i delete 0 end } } proc reportx {} { global side1 side2 side3 side4 side5 global side6 side7 side8 global proportional_grain proportional_malt residual_grain global price_conversion alcohol_percentage proportional_spice_dough global proportional_wheat_imgaga_adjunct global price_fraction_silver price_grain_silas global testcase_number console show; puts "%|table $testcase_number|printed in| tcl wiki format|% " puts "&| quantity| value| comment, if any|& " puts "&| testcase number:|$testcase_number | |&" puts "&| $side1 :|original water liters | |&" puts "&| $side2 :|barley malt liters, munu & titab (optional) | |& " puts "&| $side3 :|quality factor, add unmalted grain se_bappir (1,1.5,2,3,4 *10_liters)| |& " puts "&| $side4 :|spice dough adjunct logical 0/1/>0 (optional)| |&" puts "&| $side5 :|wheat adjunct logical 0/1 (optional, supersedes if not zero)| |&" puts "&| $side6 :|vat volume liters (optional)| |&" puts "&| $price_conversion :|liters for 1 silver, price from quality factor| |&" puts "&| $price_fraction_silver :|fraction silver piece, vat or bottle price from original water| |&" puts "&| $price_grain_silas :|silas grain price, vat or bottle price from original water| |&" puts "&| $alcohol_percentage :|percentage alcohol, tentative estimate from quality factor| |&" puts "&| $proportional_grain :| proportional grain per original water | |&" puts "&| $proportional_malt :| liters malted barley per original water (munu, tibir) | |&" puts "&| $residual_grain :| liters unmalted grain per original water (se_bappir) | |&" puts "&| $proportional_spice_dough :| liters barley spice dough per original water, loaded if logical > 0 (se_bala) | |&" puts "&| $proportional_wheat_imgaga_adjunct :| liters wheat (imgaga) adjunct per original water, loaded if logical 1 | |&" puts "&| $side7 :|answers: quality factor or finish factor | |&" puts "&| $side8 :|beer volume liters | |&" } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 4.0 0.015 2.0 1.0 0.0 4.0 2.0 4.0} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 60.0 0.5 4.0 1.0 0.0 6.48 3.0 60.8 } ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 300.0 1.25 2.0 1.0 0.0 6.48 2.0 300.33 } ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command about ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Sumerian Beer Ingredients Calculator" ====== ---- [gold] This page is copyrighted under the TCL/TK license terms, [http://tcl.tk/software/tcltk/license.html%|%this license]. **Comments Section** <> Please place any comments here, Thanks. <> Numerical Analysis | Toys | Calculator | Mathematics| Example