-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel.js
148 lines (120 loc) · 5.2 KB
/
model.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// schemas of all inputs/output/equipment configurations
var logic = require("./logic.js");
module.exports = {
//// EQUIPMENT CONFIGURATION WITH DEFAULT VALUES (CAN BE OVERWRITTEN)
//// TO BE USED WITH FUNCTION set_equipment
// default brew equipment properties
equipment : {
name: "8 liter equipment", // unique name of equipment configuration
mash_max_volume : 12.0, // volume of mash tun in l
mash_efficiency_weight : 0.72, // average mash efficiency in function of malt weight
mash_false_bottom_volume: 2.0, // volume of wort below the faucet in l
mash_loss : 1.0, // loss of wort after lautering in l
sparge_max_volume : 8.0, // volume of lauter tun in l
boil_max_volume : 15.0, // volume of boil kettle in l
boil_evaporation_rate : 2.3, // evaporation rate of kettle in l/h
boil_loss : 0.5, // loss of wort after boiling in l
whirlpool_loss : 0.0, // loss of wort in whirlpool
fermentation_max_volume: 12.0, // volume of fermentor in l
fermentation_loss: 0.5, // beer lost in fermentor in l
bottling_loss: 0.0, // loss of beer during bottling in l
},
//// AUXILIARY DATA STRUCTURES
//// NOT BE BE USED DIRECTLY BY USER
// structure of liquid flows between brew activities (water, wort, beer)
flow : {
vol : 0.0, // volume in liters
og : 1.0, // original specific gravity in kg/l
fg : 1.0, // final specific gravity in kg/l
abv : 0.0, // alcohol by volume in %
ebc : 0.0, // European beer color
ibu : 0.0, // international bitter units
co2 : 0.0 // CO2 content in g/l
},
// structure of malt additions
malt : {
name : '', // unique name of malt variety
form : "grain" | "dry extract" | "liquid extract", // form of delivery // NOT YET TAKEN INTO ACCOUNT
weight : 0.0, // weight in kg
ebc : 0.0 // EBC of malt
},
// structure of hop additions
hop : {
name : '', // unique name of hop variety
form : 'pellet', // allowed values: 'pellets' | 'cones' | 'cryo'
weight : 0.0, // weight in g
alpha : 0.0, // alpha acid content in %
time : 0, // time of contact with wort
usage: '' // allowed values: 'forward' | 'after hot break' | 'whirlpool'
},
// structure of yeast additions
yeast : {
name: '', // unique name of yeast strain
type : '', // possible values: 'liquid' | 'dry' | 'slurry'
attenuation : 0.0 // attenation in % (typically between 70-85%)
},
//// ACTIVITIES SUPPORTED BY SUITABLE BREWING FUNCTIONS
//// TO BE USED WITH FUNCTION add TO CONSTRUCT BREW PORCESS MODEL
// configuration of mash step
mash : {
name : "Mash", // name of activity
run : logic.mash, // name of function implementing activity
malts : [], // list of malts to be mashed, see internal model below
water : 0.0, // sparge water in l
},
// configuration of boil step
boil : {
name : "Boil",
run : logic.boil,
time : 0.0, // boil time in minutes
whirlpool : 0.0, // whirlpool time in minutes
hops : [], // hop list with elements as defined below
water : 0.0, // water added during boiling in l
sucrose : 0.0, // sucrose (table sugar) additions during boiling in kg
dextrose : 0.0, // dextrose addition in kg
dry_malt : 0.0, // dry malt addition in kg
speise : 0.0, // volume of speise used for priming
},
// configuration of fermentation step
ferment : {
name : "Ferment",
run : logic.ferment,
temp : 0.0, // primary fermentation temperature in °C
max_temp : 0.0, // maximum fermentation temperature in °C
yeast : { name: '', // unique name of yeast strain
type : '', // possible values: 'liquid' | 'dry' | 'slurry'
attenuation : 0.0}, // attenation in % (typically between 70-85%)
water : 0.0, // water added during boiling in liters
sucrose : 0.0, // sugar addition during boiling in kg
dextrose : 0.0, // dextrose addition in kg
dry_malt : 0.0, // dry malt addition in kg
hops : [], // dry hop list with elements as defined above
},
// configuration of priming and bottling step
bottle : {
name : "Bottle",
run : logic.bottle,
water : 0.0, // water added before bottling
loss : 0.0, // loss of beer during bottling
sucrose : 0.0, // sugar addition for priming in g/l
dextrose : 0.0, // dextrose addition for priming in g/l
dry_malt : 0.0, // sugar additions for priming in g/l
speise : 0.0, // speise (wort) addition for priming in l
},
//// FLOW MANAGEMENT ACTIVITIES: SPLIT AND MERGE
//// AUTOMATICALLY ADDED TO MODEL BY split/merge FUNCTIONS
// configuration of wort split activities
split : {
name : "Split",
run : logic.split,
target_recipe : {}, // target recipe of split (for source recipe)
source_split : {}, // source split of split action (for target recipe)
vol : 0.0 // volume in l transferred from source to target
},
// configuration of wort merge activities
merge : {
name : "Merge",
run : logic.merge,
merge_flow : {}, // source flow to be merged
},
};