When should a child know who their biological father is?

Situation:

A married couple started the process of artificial insemination two months ago and the woman is successful pregnant. The sperm donor selected was one with similar features to not create confusion in the man's family. The child will still be the woman's bio child but not the man's. Due to his condition, he's unable to ever father a child. Basically never. He has already accepted the reality, agreed to AI and love/raise the baby as his.

The child will obviously call him dad. When should the child be told the truth about his dad not being his bio father?

When should a child know who their biological father is?
Post Opinion