I understand that the Western Front could be incredibly diverse but I had a couple questions about the general layout of trenches along the Western front. How long were most stretches of trenches? What was the population density of these trenches? Thank you for the answers.
This question has quite a lot of variables. First, divest yourself of the idea of a contiguous line stretching, as is so often quoted "From Switzerland to the North Sea." True, the lines of demarcation ran that far, but trenches can only be built where 1: It is possible to construct them, and 2: the ground is important to defend. So that, with point 1, other things, rivers, roads, hills and forests, quaint little villages kept getting in the way. These, if in conflict with point 2 would be defended otherwise- by destroying bridges, siting artillery to fire upon open roads, placing a series of independent redoubts in broken country; either occupying and fortifying a village, or making it inaccessible otherwise. Belgium’s low water table and France’s chalky sub-soil presented their own challenges to trench building.
The French, particularly at the beginning of the stalemate, built redoubt style defenses- posts not necessarily connected, some being large enough for platoon size (35-45 men) occupation. Historian Maj. G Corrigan describes the opposing defensive philosophies well. The French had assigned so much importance to their offensive ideology that any entrenchment was viewed as temporary shelter for use prior to jumping off in an advance. Little care or effort was assigned to their construction or maintenance. It was believed to do so would indicate to the men that a long halt was being affected and would therefore drain the offensive spirit. Germans “on the other hand...were on someone else’s territory and, once the Schlieffen plane failed, were content to stay on the defensive while the Allies tried again and again to evict them.” The British appraisal, Corrigan notes, was a compromise of the two. They would have to win the war by advancing against the enemy, but could not do that until they had the strength of numbers required. Until such time, the men would be protected within well built trenches.
It was these defenses that Canadians first occupied in the Ypres Salient in the Spring of 1915.
It was difficult ground and no proper trench line existed. “The line resolved itself into a series of strong points.” This disposition had the effect to isolate the Battalion’s companies from one another. Gen Young notes that this was “the result of having to occupy a French style trench system based on platoon sized, forward facing redoubts connected with shallow communications trenches.” Major Osborne described his company’s disposition: “The arrangements here were somewhat different than on former occasions. Two platoons only were kept in the first line trench, while the remaining two were kept in reserve at Battalion Advance Headquarters. In addition the position of the Company Commander was not in the trenches, but in a dugout about two hundred and fifty yards to the rear, and connected to the main trench by a communication trench.” He continues “Our section consisted of two redoubts about 30 or 40 yards apart and connected by an earthen screen about 3 feet high.”
British doctrine called for more of a solid firing line than the French model, and contemporary military manuals illustrate how deep, wide and lengthy trenches should be made.
Population density of trenches would also vary accordingly, and it would be difficult to put a figure of X men to Y yards of front. At the beginning of trench warfare, both sides maintained that a strong firing line be maintained at all times. However, it was learned that putting the majority of available men in the forward most lines wasn't tactically prudent. Increasing the number of machine guns available at the small unit level meant that smaller numbers of men could be relied upon to hold sectors previously maintained by larger numbers of ordinary riflemen.
The Germans really perfected this notion with the idea of "Elastic Defense" that is, keeping a minimum amount of men forward, not holding the forward lines at all cost, which had been the notion heretofore, allowing an enemy advance to outstrip its supporting artillery and lose momentum to then be repulsed by specially trained counterattack units.
In the spring of 1918, the Germans had launched a last-ditch general offensive in the west. Supplemented by troops lately moved from the east after Russia’s capitulation and begun before the Americans could take to the field in force, the “Kaiser’s Battle” had stretched, but not broken the Allied lines. Materially exhausted, by summer, the Germans retained a defensive stance where they had penetrated; prepared to fall back on the well-constructed Hindenburg Line of concrete machine gun bunkers, jungles of barbed wire and anti-tank ditches.
As formidable as it was, the Hindenburg Line amounted to not much more than a shock absorber. By design, the forward defenses would slow down and break up the momentum of any attack into fractured and isolated units. These then could be easily overwhelmed by local reserves, beyond the reach of supportive Allied artillery, but well within the range of their own guns. Overall, the Hindenburg Line “proved far too formidable for the humble term trench warfare to remain appropriate….This was defensive warfare raised to a new plane. It appeared invulnerable.”
I'd invite you to read "Mud, Blood and Poppycock" by Gordon Corrigan, whom I have quoted above for the structure and routine of trench life, as well as Brigadier Sir Richard Holmes book "The Western Front" which is a concise history of the war and its conditions.
As well, several posts of my own WWI blog, "If Ye Break Faith" from which much of this answer has been made, deal with the formation of the Western Front, and certain aspects of trench construction. You will find in these posts proper footnotes to source material, much of which is available in the public domain online.
Hope this helps, and do please let me know if you wish to have any clarification made on the points discussed above.