It will vary, but to give you a benchmark, you can use this Brewer's Friend Calculator to play with the variables of amount of grain, gravity and volume of beer.
For example, if I plug in 100 liters as the volume, 1.050 as the measured gravity (this isn't really important - it just calculates pre-boil efficiency), and choose 25kg of American Pilsner malt, it tells me that this corresponds to 65% efficiency, which is typical for some systems.
So in round figures, 25kg for 100 liters - that's 0.25kg malt per liter.
Just to check if it's in the ballpark, I compare it to my recent brews, I use typically use 8kg for 40 liters of 1.050 SG (ca. 4.3%) beer, which is 0.2kg malt per liter.
This week, I'm going to brew a 14% Imperial Stout, with 25kg of grain for 40l of beer, so that's 0.625kg malt per liter.
The biggest contributors to how much malt you need is the desired starting gravity and brewhouse efficiency. Using different grains don't make a huge amount of difference - those grains with low yields are typically only a small part of the grain bill.
You ask when you'd deviate from this. The amount of grain per volume of beer depends upon many factors:
- brewhouse efficiency (which covers all the losses from the minute you acquire the grain until it's in the bottle.)
- desired abv of the brew (higher abv requires more grain)
This glosses over many details, but that's the essence of it - the brewhouse efficiency determines how well you used the grain, so lower efficiency requires more grain, and with a higher starting gravity, you of course need more grain for the given batch size.
I see from your profile you're a developer - I feel you might be trying to be too systematic about this. To know how much grain you need, it's best to follow an existing recipe, one where the mash efficiency is around 70%. That will give both the quantity of grain and the recipe yield.