Pith, or medullary, rays function to transport sap through wood. They are a key component to tylosis, a psysiological process by which wooded plants heal injury.
Pith rays consist primarily of parenchyma cells, a type of thin walled cell that typically makes up non-woody tissue. These cells allow for easy transfer of sap through the woody plant, making them essential to much of the woody plant's functions. Sap is made up of water and various dissolved substances that the tree needs to survive.
Tylosis allows a tree to wall off areas where it has been injured, protecting the tree from pathogens like fungi, bacteria and insect larvae. In order to produce these "walls," the tree must transport groups of volatile organic compounds known as terpenes to the area of injury. The terpenes are produced by the cambium, a tissue layer that produces undifferentiated cells that enable new tissues to form. Terpenes are then transported by the parenchyma cells that make up the medullary rays. Over time, these parenchyma cells die, spilling their contents into already dead xylem vessels.
The areas walled off by tylosis appear as darker, circular balloons in the wood. These "knots" are indicative that the process has occurred.