Are there halachot of aveilut for a grandchild who loses a grandparent?
A grandfather is not one of the close relatives to which the halachos of aveilus apply.
However, it is customary to apply certain restrictions of mourning (not washing with hot water; not changing clothes; not going out to communal functions; changing one’s place in shul) until the first Shabbos after the passing.
May Hashem console the family.
See Kesuvos 53, where R. Akiva’s opinion is that a person must mourn for his grandparents, but this is not the halachic ruling. The Gemara in Moed Katan (20b) writes that a person must mourn together with close relatives (that he would mourn for), meaning that when a father is mourning for his father, the son (and grandson) would also have to mourn (the Gemara cites a dispute concerning which circumstances this applies to). However, many rishonim, including Ramban (Toras Ha’adam 40), Rosh (M.K. 3:35), Hagahos Maimonios (Eivel 2:4), write that the reason for this is out of respect for the mourner, and in our days, mourners forgo this oglibation of respect (as brought in Kessef Mishnah, Eivel 2:4). Rashba (1:138) also writes that a grandson need not mourn for his grandfather, but see Terumas Hadeshen (291) who is more stringent (see below).
Shulchan Aruch (Yoreh De’ah 374:6) rules that a close relative mourns together with his relative (e.g. a son/daughter with his/her father on the grandfather’s passing), whereas Rema cites (from Tur) the custom of leniency in this regard, adding (from Hagahos Maimonios) that anybody who is stringent in this matter is min ha-matmihin (outlandish). Yet, he adds (from Terumas Hadeshen) that some take on “partial mourning,” such as not changing clothes and washing, during the first days of mourning, until the first Shabbos. Shach and Taz cite the ruling of Bach, who writes that a grandson should not go out to meals (and the like) until the first Shabbos after passing.
Gesher Hachayim (p. 183) and Chochmas Adam (161:5) rule, in accordance with the above, that a grandson (or other distant relative) is not obligated to mourn together with his close relatives, yet it is customary to take on some practice of mourning, until the first Shabbos.
Note that Rema adds that it is although it is not obligatory, one who wishes to take on the full mourning together with his close relative is not prevented from doing so. See also Shach (this would mean only a full mourning) and Aruch Hashulchan (a person may not accept this mourning upon himself even for leniencies, such as not studying Torah).