My 'barnyard fence' setup is as follows. The purpose was multifold: provide a decent-sized contained area for my free-ranging hens, keep deer from eating my native plants around the barn, keep cows out of the barn/barnyard area when we have them on the property.
We used 5' no-climb horse fence because it was used for my horse's adjacent barn pasture, and because it is well-suited for my purposes listed above. It is more expensive than the 2"x4" 'field fence' (shown in your photo) because the strands are woven, not welded, and it can withstand large animals bouncing off of it. Due to our rocky soils, we used t-posts, along with metal pipe for corner posts and line posts. There is a strand of twist wire (not barbed) strung at ground level, too. Standard procedure around these parts, although most folks use barbed wire. I use smooth twist so my chooks would not hurt themselves if they scratch around the bottom of the fence. This was a fence guy job, not DIY, in our case, but so far, the money was well-spent.
I've added a strand of electric tape along the top and along the bottom of the fence (about 7" off the ground), on the OUTSIDE of the fence, using the yellow plastic extenders found at
Tractor Supply. Our charger is plugged into an outlet in the barn, but I also use solar fence chargers for horse pasture on other parts of the property.
I also attached an "apron" of some field fence we had left over from another project. This is hooked onto the bottom of the no-climb, below the lowest hot tape strand, the entire way around, and extends out about 16", laying on the ground. I'm hoping it will at least discourage digging critters.
My husband tells me that even if a raccoon climbing the fence manages to avoid touching the lowest hot tape strand, he will likely encounter the top strand and get zapped because he'll be in contact with hot tape + fence + t-posts + the ground. The concept of electrons and their like escape me, so I'm taking his word on this
I'm also making sure that the grass is cut next to and around the fence perimeter, both inside and out. I figure that my chooks have a better chance of evading lurking predators if they have a clear field of view.
The weakest link in my setup is protection from avian predators, but my chooks have a barn, plus a large variety of objects to hide underneath throughout the barnyard if they are fortunate enough to see a predator in the sky. Fingers crossed. Your mileage may vary.