A couple of things to note:
1a. When Foote bombarded Fort Henry, it was half under water, being flooded by the Tennessee,
1b. It was badly situated, being too low and not taking advantage of higher ground.
1c. It was never completed.
1d. IIRC none of the batteries there had any rifles.
1e. Foote attacked with all 6 River-Class ironclads that he had in his command.
Still it took hours before Fort Henry was reduced and Grant could just walk in.
At Fort Donaldson
2a. The fort was completed and had a better configuration, using the higher ground available.
2b. The CSA had a single (IIRC) 9lb. rifle, the only cannon to do any damage to the ironclads.
2c. Foote was not on-hand, having being wounded at Henry by a hit on the pilothouse of his boat.
2d. Only four of the ironclads were present at Donaldson, plus a couple of wooden gunboats firing at long-range as to not get within range of Donaldson's batteries.
2e. Although all of the ironclads were eventually 'knocked out' at Donaldson, far from being sunk, by plunging fire from the 9lb-er rifle hitting the un-armored decks and damaging the engines, the engagement ran for several hours (I'd have to look it up to say how many, but I'm too lazy ATM:neener
My points are
3a. How effective a fort was at engaging naval targets was mainly dependent upon the type of weapons available compared to the armor. Smooth-bores just din't do the trick, they just bounce off the armor.
3b. Just one rifle, like at Donaldson, firing at a rate of about one round every two minutes, does not have a heck of a lot of time to engage a boat doing it's best to pass by as quickly as possible and not get caught up in a fire-fight, meaning armored boats should be able to push past a fort like Donaldson almost with impunity, where as wooded boats would probably take a beating, as every cannon in the fort would be effective to some extent,
3c. I would have to look-up where in Shelby Foote's The American Civil War it is stated, but basically the lesson learned about an engagement between armored war-ships mounting powerful naval cannons vs older infantry cannons build really to engage infantry on the field was that the fort lost. Numerous examples reside in the history books. Farragut made numerous examples of this lesson. Remember, his cannons outnumbered by far those in the forts he attacked.
What made the great difference was
4a. The ships attacking harbors and forts were steam-ships. They were not restricted by the wind anymore and could position themselves to where they wanted to be, and maneuver at will.
4b. The navy, having always been the technology freaks, were keen to mount the most powerful guns they could on their most modern warships. They were big and heavy ships (for the time) and were not bobbing about like corks in a bucket. Were not talking about battles the open-seas, but on rivers, harbors, bays and inlets where the water is very smooth.
4c. The ship's crews were highly trained on the average and could engage land targets probably better than the other way around. Remember, they trained to fire from a moving gun-platform. The artillerymen manning the coastal defenses of the time probably had very little to no opportunity to practice on moving targets.
I'm not saying that ships should always win in a battle between shore mounted batteries and ship mounted, but that the factors which make a difference should be taken into account, which at the moment does not appear to be the case.
If I understand correctly, all cannons, be they 6lb.ers or Rodmans or Dahlgrens are all fudged into one factor regardless of the target, and all targets are fudged together into one factor regardless of gun-type. Armor and penetration play no role in it at all other than to treat armored vessels as if they had more hit-points, which is not realistic. They don't. It is just much harder to make a hit effective, because it must penetrate the ship's armor to have effect. Once it does penetrate it's effectiveness is the same as if the ship were not armored at all.