And I again think that Gwynnja is right.
Ok, I know that it has been speculated in some threads that it is related to a new resolution passing through a 'yes' vote, but no evidence was posted in such threads and the posters posting this information were not those who look into the code. It was just based on ingame experience. In other threads another theory was suggested:
You get 20 turns of 5 unhappiness for each resolution that you defy (and would have passed with a no-vote). Votes occur each 7 turns (both values at normal game speed).
Note that 20 turns of unhappiness is very similar to voting yes after 3 voting periods (21 turns). This would explain the rise of the 'vote yes theory' while it actually is related to a 20 turn period.
This '20 turn period' theory is supported by the following values from the GlobalDefines.xml file:
<Define>
<DefineName>DEFY_RESOLUTION_POP_ANGER</DefineName>
<iDefineIntVal>5</iDefineIntVal>
</Define>
<Define>
<DefineName>DEFY_RESOLUTION_ANGER_DIVISOR</DefineName>
<iDefineIntVal>20</iDefineIntVal>
</Define>
I have no supporting information from python or the CvGameCoreDLL.dll file.
But note the similarity to these values also from the GlobalDefines.xml file which define game mechanics that we already know:
<Define>
<DefineName>HURRY_POP_ANGER</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
<Define>
<DefineName>HURRY_ANGER_DIVISOR</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>
<Define>
<DefineName>CONSCRIPT_POP_ANGER</DefineName>
<iDefineIntVal>3</iDefineIntVal>
</Define>
<Define>
<DefineName>CONSCRIPT_ANGER_DIVISOR</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>