I'm working on an excell spreadsheet that when you punch in a few values, designs a box for you. I just need to know the two following equations, if anyone can help me:

1) end correction values: flared external port and rounded internal walls, as well as port next to box wall values
2) oprt correction values for angles/molding in the corners to help smoothe airflow