# A Multi-Level Approach for Simulation of Storage and Respiration of Produce
## 2 Digital Characterization of Produce Shape
In general, produce is stored in crates/boxes that contain a small quantity such that the produce itself is not damaged under the weight of the stack. Figure 1: Depiction of the different cross sections for tomatoes (left) and avocadoes (right) showing the spline representations of the outer edges. Figure 2: Digital representations for five of the profiles of tomatoes and avocadoes that were produced using the templates given in Figure 1 and SolidworksTM. To account for this packing arrangement and to facilitate development of an accurate produce REV, a generic box of 40 \(\times\) 30 \(\times\) 18 cm\({}^{3}\) with a design that is of widespread use in grocery stores in Ontario, Canada, has been selected in the present work (see Figure 3). Note that the process given below could be used for any size or style of box/crate; however, since this article focuses mainly on the approach, a suitable generic box was considered. Further to this, there is no specific number of produce pieces that are contained in a box, as this is generally dictated by box size and weight. Thus, for the purpose of this study, we simply choose that a box of this size contains 50 pieces of either tomatoes or avocadoes. The box is approximated digitally so that when stacked it forms a repeating pattern that is representative of a stack of produce boxes, and can be extended to a porous-continuum of stacked produce. Referring to Figure 3, the box has circular openings for ventilation positioned such that the domain boundaries in all three principal directions are translationally periodic. The long sides of the box contain three holes, 10 cm apart, while the smaller sides contain two holes, each located 7.5 cm from the edge. All side-holes are placed at mid-height. Six other holes are positioned in the base 10 cm apart and 7.5 cm from the shorter side edges. All the holes are 2.5 cm in diameter. Rectangular slots for ventilation are also added at the top part of the box, positioned directly above the centers of the closest hole to the sides. These slots are 18 mm in height. The thickness of the card box is taken as 7 mm. Finally, in the simulation, the base of the box was repeated as a box top to facilitate translational periodicity in the vertical direction. To generate the produce REV, we first ignore all but the overall dimensions of the box. Thus, in this first step, we consider the space occupied by the generic box and generate a packing of 50 individual pieces of the produce shown above in Figure 2, which we then add to the box in a subsequent step. The following procedure is used to generate the packing:  
1. Fifty digital pieces of fruit are generated by randomly selecting from the set of templates, and pairing them with a suitable size. For simplicity, the shape of each piece of fruit was fixed, and only the scale (in all directions) was adjusted to match the desired size. The size of each piece of fruit was selected from a uniform distribution with upper and lower bounds chosen from a suitable reference. The USDA size standards for tomatoes (_Solanum lycopersicum_ L.) [31] were utilized where the dimension range was 5.4-7 cm. For avocadoes, based on an Ontario grocery store purchase of Hass avocadoes, the larger dimension was 7-12 cm in size and the smaller size was 5-7 cm in size. Figure 3: Illustration of the generic box geometry used to define the spatial extent of the representative elemental volume (REV) of produce. All units are in centimeters (cm). Fifty pieces of produce are packed inside the box to develop the REV. Using the Discrete Element Method (DEM) open source tool YADE [12], each piece of fruit was modelled as a rigid clump (union) of spheres. The spheres in each clump were placed near the nodes of the surface mesh, such that the surface of the clump yields a visually acceptable approximation of the surface mesh. Refer to Figure 4 for a depiction of the clump-of-spheres approximation of the fruits, and an illustration of the surface mesh used to smooth the shapes. 3.