A barnyard or farmyard is an enclosed or open yard adjoining a barn,[1] and, typically, related farm buildings, including a farmhouse.
On small farms, pasture animals such as milk goats or a dairy cow may stay in the barnyard when not in the fields.
In modern times, a trough may be hand-filled with a hose, or an automatic water fountain designed for livestock may be installed in one or more locations.
In some barns, the loft has a series of openings in the floor just above the stalls to send hay into the mangers below.
Feed storage, however, is also a boon to mice and rats, so farmers often keep barn cats to control vermin.