Yes, there is. For FreeBSD, dummynet might be the answer. However, most people use Linux these days instead of FreeBSD. You can in Linux use tc -- see the rate control part of the link. tc with netem can also add constant or variable latency to packets.
Do consider, however, that real networks have high latency in addition to low bandwidth. So, you might want to emulate latency in addition to limited bandwidth as well. Otherwise you aren't testing your application well enough.
If you use FreeBSD or Linux, you don't need to change the switch configuration to obtain the limited bandwidth. It can be done on the host where the application program runs. Unfortunately, if you run the application on Windows, I don't have a solution for you. In that case, you need to see if the switch has rate limiting options. Not all switches do.