Using Formulas

Formulas enable you to combine variables with numeric or string constants, functions (such as LOG, SIN, or SQRT), and keywords. By using variables and formulas together you can represent process values in terms that are natural for your industry.

IMPORTANT: In formulas, you must include a space following a variable name. The space separates the variable name from whatever follows it. The following example shows the correct syntax. In this example, there is a space between #Lbs_Per_Barrel and the multiplication sign.

For example, in the sample recipe you could create a variable called #Yeast to represent the amount of yeast needed during fermentation. You can represent this amount with the following formula:

#Lbs_Per_Barrel * #STD_BATCH

where #Lbs_Per_Barrel is the amount of yeast needed for every barrel of beer produced and #STD_BATCH is a keyword for the standard batch size. From the information in the section Fermenting Beer, you can learn:

  • Every barrel of beer requires 1.5 pounds of yeast.
  • The standard batch size is 100 barrels of beer.

This yields the following formula:

1.5*100

While you could assign this mathematical expression to the variable #Yeast, you may want to create a variable for the yeast per barrel value so that you can adjust it as process conditions change. The resulting recipe is shown in the following figure:

Adding Formulas and Variables to the Sample Recipe

For more information about using formulas in your recipes, refer to the chapter Working with Formulas.

See Also