What you need:
Before you design your device, you'll need to characterize how much your particular brand of polystyrene sheets shrinks. Expect it to be about 2-2.5 times.
If you're using the polystyrene for the device itself, you'll want to either score the sheet in the form of your channels or use a laser cutter to cut out the channels. The scored channels will shrink and become deeper and narrower when the sheet is heated. If you want deeper channels, you can cut all the way through the sheet. The scoring can be done by hand with a needle or on a desktop mill...if the stage of your desktop mill is perfectly flat. I have yet to accomplish this with the Roland in the shop. One side always ends up getting cut deeper than the other.
If you're using the polystyrene as the mold, just draw up the channels you want on your computer and print them out onto the sheets. Be careful and let the printer rest between prints to avoid overheating the sheet and prematurely shrinking it. Multiple prints can be done if you want taller features. When heated, the ink particles will aggregate and form narrower, taller versions of the features you printed.
Which ever method you choose, you then shrink the sheets in the oven at about 350F. They will curl up dramatically but will usually flatten out after a few minutes.
With the printed mold method, you can get a somewhat rounded profile by letting it cool and then heating it again for a while.
If you want to make multilayer devices with the device method, you have two choices. You can either make the layers separately and then assemble them or do it all at once in the oven. For the former, I've found that running bolts through them is a reasonable method. Glue gets messy. For the former, align the layers before heating and superglue the corners together. Give it a little longer in the oven than you normally would. The layers will melt together. The device at the top of the page was made this way.