A trip tank is a typical cylindrical or rectangular tank (in a Vertical position). The trip tank storage or receive drilling fluid (depends on which operations you did: pulling out of the hole or tripping into the hole).
The trip tank is used not only for drill pipe or drill collar but also can be used to monitor the filling of the well (when you pull out any kind of tool from the borehole). Another function of the trip tank is used to monitor the displacement of each tubular/tool ran into the borehole. In some operations, the hole can be monitored with the trip tank when there’s no tool/tubular is into the borehole (for example, when you logging operations you can watch if the hole is taking or over displacing fluids).
The TT (trip tank) must have 2 types of measurements (mechanical and optical/electronic/sonar type), that’s mean, when you are using the TT you must know how the fluid level is inside the TT.
Typical TT have 20-40 bbls of capacity (depends on each drilling contractors. but you can find useful information in the API specs or IADC specs bulletins)
The trip tank is located at the mud pits, near the shale shakers, it is used when the drill pipe is pulled out of the wellbore, because the drill pipe ocupies a volume inside the hole, and that volume needs to be replaced so the well is always filled with mud to mantain pressure as you said previously.
Drilling contrator use the trip tank to know the volume occupied by the steel (drill pipe + drill collar) to add in the well when they puuled out and to detect any kick off.
Trip Tanks are often circulated over the hole while tripping and loss are monitored usually electronically from the driller’s console. Every 5 stands the calculations have to be quickly made to make sure the hole is taking the proper amount of fluid. Not filling properly would indicate a gas kick or swabbing the hole as well as a few other possibilities. A small tank (trip tank) is used because it is easier to get a more accurate reading than if you left the flow line lined up on the pit system.