I want to simulate a bike chain with two gears but I don't know how can i define the relation (mate) between chain and gears.
Would simply constraining the "loop" of the chain around the center lines of the gears work?
I guess this depends on how you have your chain model/assembly constrained first. This can all be done pretty easily in Inventor, not sure how you'll have to do such in SW, sorry.
This may help too
use mechanical mates, not only standard mates
Your going to need to make some construction drawings to get this to work. Put points at the pivot points of the links (on the center line) Also draw the path in your assembly that you want it to follow. You will have to mate each point to the path. This takes care of the chain part.
Use the belt/pulley tool to get the ratio of the two gears correct (hide the simulated belt once done. (if you do this first, this will create the path mentioned above).
You'll have to mess with the animation tool to make the chain and the gears look like they are turning together.