The irradiation of 176Yb with deuterons offers a promising pathway for the production of the theranostic radionuclide 177Lu. To optimize this process, calculations integrating deuteron transport, isotope production, and decay have been performed. In pure 176Yb, the undesired production of 174g+mLu occurs at higher deuteron energies, corresponding to a distribution slightly shallower than that of 177Lu. Hence, 174g+mLu can be effectively filtered out by employing either a low-energy deuteron beam or stacked foils. The utilization of stacked foils enables the production of 177Lu using a high-energy linear accelerator. Another unwanted isotope, 176mLu, is produced roughly at the same depth as 177Lu, but its concentration can be significantly reduced by selecting an appropriate post-irradiation processing time, owing to its relatively short half-life. The modeling approach extended to the mapping of yields as a function of irradiation time and post-irradiation processing time. An optimized processing time window was identified. The study demonstrates that a high-energy deuteron beam can be employed to produce 177Lu with high specific activity exceeding 3000 GBq/mg. The effect of different purity levels (ranging from 98% to 100%) was also discussed. The impurity levels have a slight impact. The modeling demonstrates the feasibility of obtaining 177Lu with a specific activity > 3000 GBq/mg and radionuclidic purity > 99.5% when using a commercially available 176Yb target of 99.6% purity.