You're going to need more info than "40 inches long" for the port. You need to know the exact measurements of the port in order to tune it correctly. And as far as the box goes, if you're doing a simple rectangular shape, just experiment with some dimensions and use the formula LxWxH until you get it close to your requirements. Otherwise, if you're going with some funky shape, you can either wing it with a guestimate or make a sturdy mockup and then place a plastic bag (make sure there's no holes in it) and fill it water. Keep track of the amount of water you use and once it's full you'll know the exact volume. Either way, make it a tad larger than the recommendation to compensate for the sub displacement.
__________________
I got a dig bick. You this read wrong. You read that wrong too.