Do computers play in ordinary human grandmaster chess tournaments with time limits at 40 moves in two hours etc? If so how do they fare?
No, they don't, because it wouldn't be fair. According to Wikipedia:
A recent top chess engine, Rybka, has an estimated Elo rating of about 3200 (when running on an up-to-date PC, as computed by SSDF).
This is about 500-600 points higher than an average grandmaster (rating 2600-2700). This would be the same rating difference as between a grandmaster and a top club player (2000-2200) - it is a totally different playing category.
According to how the ELO rating is set up, the expected score of a 2600 grandmaster vs. a 3200 computer is 3% - i.e. when they play 100 games, the grandmaster is expected to draw only 6 games. This is way too low to be interesting.
This used to be the case from the sixties, when the first chess computers entered the scene, with the playing strength of a beginner, until the nineties, when computers became too strong for the normal grandmasters.
Then followed a phase of man-machine matches until maybe 10 years ago when results like Hydra-Adams, 5.5-0.5, made it abundantly clear that even the strongest human chess players cannot compete with chess computers.
Nowadays even engines on unspecialised and relatively modest hardware (like a smartphone) are playing beyond human capabilities.
Nowadays, human vs. computer matches or tournaments where a computer participates among human players don't exist because the difference in strength became too big.
In the past, the situation was different and a couple of matches were organized. The match Kasparov - Deep Blue in 1997 is of course the most famous one. On this wikipedia page you can find a nice overview of the human vs. computer matches.
"Mixed tournaments" (humans and computers) were a lot rarer. The only one I can remember is the Dutch championship in 2000, where Fritz participated. It shared the 3rd place with 7/11 and a performance around 2600.
However, it should be added that GM Van der Sterren and IM Bosboom resigned after move 1 and 4 respectively, as a sign of protest against the participation of the machine. So, discarding these games, Fritz scored 5/9, with a performance of 2500+ (my estimation, I didn't check it).