Back in the days, casting was done through experience off course and trial and error. Today’s manufactorings techniques require more control of the process and predictable results:
Poriosity, shrinkage, speed of cooling, but also the way of inserting the melted material into the mold (gravity, injecting) etc. etc.
This can be done in simulation software like this: