Any penalty would need to be pre-agreed upon at the time of booking.
I think you mean damages

)) but I'm wondering if a methodology for working them out could also be acceptable rather than the fixed sum?
Penalty clauses are, of course, prohibited in contract and any such clause will be deemed null and void.
Any clause purporting to be an estimation of damages will have to be assessed as to whether it is out of all proportion to the loss acutally suffered (= penalty) or whether it is in fact a genuine attempt to estimate the loss (in which case it will be liquidated damaged).
Asking for $16000 (as in Dave N's example if it were to ever occur) may well be considered a penalty. But there are all sort of issues associated with this, just one of which is establishing the existance of a contract and a clause which says the passenger must pay in the event all flight sectors are not taken.
If there is no such clause then the airline could still bring an action for breach. But again, on what basis would it be doing do and loss could it show?
One way perhaps that this might form part of the contract is if there is a clause somewhere saying that the fares rules form part of the contract and conditions of carriage. That seems possible.
I you can satisfy all of the above, then one of the determining features of a penalty is that is should have the intention of coercing the defaulting party into completing the agreement. You can see how the threat to collect $16000 could be seen as such.
However, what is the benefit/loss to the airline??