# Calculating Water Activity of Dry Food Mixtures

## Calculations Using Mathematica*

This Web page contains links to six Mathematica notebook ASCII text files each of which estimates the equilibrium water activity, awStar, of a dry multicomponent food mixture stored in a hermetically sealed container. In all cases it is assumed that the components do not interact chemically, that the temperature is constant and that the amount of moisture absorbed by or released to the atmosphere trapped in the container is negligible.

Newer versions of all six files compatible with Mathematica 7 were added August 17, 2009.

* Mathematica® is a registered trademark of Wolfram Research, Inc. You can get more information about Mathematica by visiting the Web site of Wolfram Research at: http://www.wolfram.com/

Mathematica may read the whole file into a single notebook cell. To correct this in Mathematica 5, delete the blank line(s) that are the first line(s) in the cell and save the file to the original file name ending with '.nb' using the 'Save As Special...->Text' item from the 'File' menu. When you reopen the file in Mathematica it will be read and translated correctly as described below.

## Explanation of the file names

All six files calculate the equilibrium water activity (aw) of a dry multicomponent food mixture. There are three different forms for the equations of the moisture sorption isotherms of the ingredients in the mixture. In the first case (Poly), every ingredient's isotherm is specified by a fourth-order polynomial equation. In the second case (Powr), every ingredient's isotherm is specified by a two-term power-law equation. In the third case (NEqn), every ingredient's isotherm is specified by a separate equation that may or may not be the same as the equation of another ingredient. For each of the above three cases, one file is provided where the initial moisture content and weight of each ingredient is entered by the user on a wet basis (WB) and another file is provided where that information is entered on a dry basis (DB). Entering data on a wet basis is best for results taken from experimental measurements while dry basis input is best for results taken from the published literature. In all cases, however, the output of the calculations is given on a dry basis.

## Instructions for running the files in Mathematica

The six available ASCII text files are Mathematica notebook files that are compatible with Mathematica version 5. We have verified that all the files run in version 5 of Mathematica in MacOS X and in version 5 in Windows 98. Results should be the same for comparable versions on other platforms. Different fonts are used for Mathematica notebook cells of different types, as follows: input commands (Courier 12 Bold), output results (Courier 12 Plain) and text comments (Times 12 Plain).

To apply the program to a food mixture of interest to you, enter the correct value for the number equations (nEqn) which is also the number of ingredients. If you change the number of ingredients, you MUST assign a value for each ingredient in all of the following array variables: the initial ingredient weights (initDryWt[] in DB files or initWetWt[] in WB files), the initial ingredient moistures (intiMoistDryB[] in DB files or initMoistWetB[] in WB files), the dashing size (dashSize[]) and RGB color (lineRGB[]) of each ingredient's moisture sorption isotherm curve line and the coefficients (c[] in Poly and Powr files) and powers (p[] in Powr files) or the mathematical expressions (mSIso[] in NEqn files) for the moisture sorption isotherm equations of each ingredient. You may also want to change the titles assigned for the moisture sorption isotherm (mSITitle[]) or initial & equilibrium point (initEqTitle[]) plots. Further explanation of each array variable can be found in the comments included in the program code. The maximum value labeled on the y-axis of all graphs is assigned by the following Mathematica statement: maxMoist=xxx. If the assigned value is not suitable, you should replace xxx with the value you wish to use. If you make changes to the file, remember to save it under a different name so that you may retrieve both the original and modified versions and run either again at a later time. To run a modified file, just reevaluate the notebook as described in the previous two paragraphs.

### Polynomial Model Option

Note: The polynomial model option is particularly suitable for experimental moisture sorption isotherms since determination of the equations' constants by generalized linear regression does not require initial guesses, as is the case with nonlinear regression.

All ingredients' moisture sorption isotherms are described by a fourth-order polynomial model equation. All moisture values (input, calculated and output) are expressed on a dry basis.

All ingredients' moisture sorption isotherms are described by a fourth-order polynomial model equation. Input moisture values should be entered on a wet basis and will be converted to a dry basis for calculation and output.

### Power-Law Model Option

Note: The power-law model option is suitable for experimental moisture sorption isotherms when nonlinear regression is conveniently available.

All ingredients' moisture sorption isotherms are described by a two-term power-law model equation. All moisture values (input, calculated and output) are expressed on a dry basis.

All ingredients' moisture sorption isotherms are described by a two-term power-law model equation. Input moisture values should be entered on a wet basis and will be converted to a dry basis for calculation and output.

### N-Equation Option

Note: The N-equation option is particularly suitable for moisture sorption isotherm equations taken from the published literature where each ingredient's equation may have a different mathematical structure.

Each of the N ingredient moisture sorption isotherms is described by a separate model equation. All moisture values (input, calculated and output) are expressed on a dry basis.

Each of the N ingredient moisture sorption isotherms is described by a separate model equation. Input moisture values should be entered on a wet basis and will be converted to a dry basis for calculation and output.

### References

• Peleg, M. and Normand, M. D. l992. Estimation of the water activity of multicomponent dry mixtures. Trends Food Sci. & Technol., 3:l57-l60.

• Peleg, M. l993. Assessment of a semi-empirical four parameter general model for sigmoid moisture sorption isotherms. J. Food Proc. Engng., l6:2l-37.

• This page has been visited times since September 29, 1998.

### University of Massachusetts at Amherst

Content last updated: August 17, 2009