There exists 3 types of domesticated animals cows, sheep and pigs. Each one have a different fodder requirement and eat a specific amount of food per time. I managed to do some experiments to figure out exactly how the starvation and fodder worked as well. These are the full findings.
This image shows the animals stats.

The red bar indicates the hunger level of the cow. Currently it has 93% hunger. The pink bar on the right of the red bar indicates the health of the animal. If this bar drops below 100% it will reduce the quality of the cow. All the cows stats will lower except for few rare instances. These instances are the breeding stats and the wool gotten from sheep, more on this later.
For simplicity I will call them the red bar and the pink bar. Its also worth to note that the red bar can be increased by giving the animal food and that the pink bar can never recover ones its dropped. There force its vital to make sure to never drop the pink bar. An animal will slowly lose the red bar or rather lose hunger till it will require food. If at this point there isn't food in reach the pink bar will drop. The red bar will drop at a fixed exact rate. These are the exact numbers I got from experiments.
Cows drop 1% red bar per 6000 seconds or 100 min
Sheep drop 1% red bar per 12000 seconds or 200 min
Pigs drop 1% red bar per 13000 seconds or 216.6 min
This means that each animal will lose 1% hunger per time interval. This time interval is fixed per animal and ticks at a fixed and constant rate. There is a small randomness of 10-20 seconds added on top of the listed times above, but that can also be caused by server lag or other random events.
Each listed animal can also become pregnant and affect the outcome of food eaten per time interval. The time intervals do not alter but rather the amount.
Cows, sheep and pigs all start to drop 10% red bar when pregnant instead of 1%.
The pink bar drops when the red bar have dropped lower then 9% of its value. This will lower the pink bar by 1% if its a non pregnant animal and 2% if its pregnant. This means at 100% pink bar it will lower by 1% if the red bar drops to 90%. This also means that if the pink bar is at 50% nothing will happen if the red bar drops to 90%, at this state the animal must starve to 40% red bar before the 50% drops.
Animals can eat food either by eating grass, moor or heath in a 3x3 server grid around the center grid they are standing inside of or by eating from a food trough located inside the same 3x3 server grids and be in range of the animal. This means that troughs only exert there dominance in at 3x3 server grid mechanic described in this link similar to beehives.
Food (carrot, beetroot, seed or other types of fodder) can be placed inside a trough and fed to the animals. After an animal drops to 90% it will check for food. If it finds food it will eat it. If it cant find the food its red bar will drop to 90% hunger and reduce the pink bar by 1%. Pregnant animals will do the same but much more aggressively. They will require constant source of food as they will drop below 90% after a single time interval and will check for food. Similarly if they find it they will eat the food or drop 2% pink bar if they cant.
All animals gain 3% red bar per single piece of food regardless of food type or animal state.
From that a simple conclusion can be made.
This means a trough holds:
200 Units of food * 3% = 600% red bar
Each time interval reduces each animal according to its internal food timer and when required will eat from the trough if one is close enough.
A simple table showing how long a single full trough lasts.
Non-Pregnant:
cow: 600% * 100min = 60000min or 41.67 days
sheep: 120000min or 83.33 days
pig: 130000min or 90.28 days
Pregnant:
cow: 60% * 100min = 6000min or 4.167 days
sheep: 12000min or 8.33 days
pig: 13000min or 9.028 days
From there any quantity can be calculated for larger pens.
Its also worth to note that its possible to see if an animal is pregnant or non pregnant if the red bar is at a state below 97%. This is because animals only eat at 90% and when they eat they eat until they are as close to 100% as possible. When non-pregnated the red bar can go below 97% but when the cow is pregnant they will instantly drop 10% and wont ever drop below 97% hunger as they will constantly refill back up as close to 100% as possible.
This math validates also the same method of producing quality zero items. The pink bar softcaps the stats of the animals. All stats are directly linked to the pink bar except for wool, breeding stats and quantity stats. The quantity of meet is not affected but in the outcome of wool and milk production it can be tricky as the pink bar sometimes affects it and other instances it doesn't.
An example:
At 100% pink bar the cow in the image above gives
170 quality meat
178 quality milk
177 quality hide / bones
168 quantity of meat
171 quantity of milk
195 breeding quality
If the pink bar drops to 55% the affected stats basically become.
170 * .55 = 93.5 rounded to 93Q quality meat
178 > 97Q quality milk
177 > 97Q quality hide / bones
168 > 168 quantity of meat
171 > 171 quantity of milk
195 > 195 breeding quality
A quality 10 animal can therefor produce Q0 materials when the pink bar drops below 10%.
10Q * .09 > 0Q
It takes 100min * 90% > 9000min or 6.25days for cows to drop to Q0
It takes 200min * 90% > 18000min or 12.5days for sheep to drop to Q0
If an animal drops to 0% hunger it will die the next time it request food and cant find it. Basically if the animal reaches -1% hunger it dies. This makes Q0 production very tricky as constant and long term monitoring must be made over the starving animals. Specially when making Q0 milk cows.
An image of the experiment. The trough was monitored and checked when the animal emptied the trough with 1 piece of food. Then a new piece of food was placed in the trough and check when it was emptied again.
