Inventors on patent regarding research results
First of all, your legislation is what counts. Patent law differs substantially between legislations. The remainder of my answer is based on the situation in Germany - but similar rules may exist for your legislation.


  Is this an unspoken rule at many universities that advisors and co-workers are also inventors on a patent


IANAL, and I'm not even totally sure about the situation in Germany, but I'd look for spelled out rules in


the "employee invention law" (Arbeitnehmererfindungsgesetz)
if you are employee as well as PhD student: your work contract or the relevant collective wage agreement 
you may have signed a contract for your PhD that has relevant clauses, e.g. stating that any invention you invent is treated as "academic invention" regardless of whether you are also employee of the university or not.
If you are PhD student but not employee (e.g. paid by a scholarship), things may be totally different. 
If you are in a research institute which is not part of a university, rules again can be different (industrial invention rules instead of academic invention could apply) 


I found a web site dedicated to "inventor's compensation" (in German and for Germany). 
They explain rules to estimate how much the invention the inventor's own invention and how much the company contributed (influenced e.g. by whether you used the university lab + instruments, and by your profession: how much of an inventor you are expected to be due to your profession and job).
This website explains that for you as well as for your (supposed) co-inventors, a point value (according more or less to a check list plus some common sense) should be calculated, and the percentages of co-inventorship are then calculated as percentages of the sum of all co-inventors' point values.