Ok,consider two ships in combat for 2 minutes at a range of 500. If we say the ship with beams can cause 4dps (systems set to 100%), it will deal 480 damage.
The ship firing 8 homing torpedoes would also deal a maximum 480 damage.
Extend the time to 2 minutes and 30 seconds, the ship with primary beam will deal 600 damage. Unless the ship firing 8 homing torpedoes converts energy to torps, it will still only deal a maximum of 480 damage in that time. If it does convert energy to torps, it will only serve to decrease the time that it can be in combat.
If you reduce the time in combat, the damage dealt by both ships decreases. So if you are in combat for a minute, the homing torpedoes would cause 360 damage (or 480 if you had pre-loaded two torps before the combat began). For beams you’d get 240 damage.
Increasing the distance out to 1k, so that beams can still hit, means the torpedoes dps is reduced and therefore fewer can hit the target within the time limit.
Of course, over 1k, beams will do 0 damage whereas torpedoes can still do up to 480 damage (depending on the length of time spent in combat.
I think, it should be possible to draw up a table and even graph the damage to show all this. Of course, it would all be dependent on the many variables involved (distance, time, power to settings) and would be further impacted by the crew and how they perform. Everything so far assumes the homings are loaded at the exact same time, fire instantly and reloaded.