Affect is a domain of psychology that includes attitudes, emotions, interests, and values. My own affect influenced the choice of topics for my dissertation. After examining asteroid interiors and the Moon’s thermal evolution, I discuss the role of affect in online science education. I begin with asteroids, which are collections of smaller objects held together by gravity and possibly cohesion. These “rubble-pile” objects may experience the Brazil Nut Effect (BNE). When a collection of particles of similar densities, but of different sizes, is shaken, smaller particles will move parallel to the local gravity vector while larger objects will do the opposite. Thus, when asteroids are shaken by impacts, they may experience the BNE as possibly evidenced by large boulders seen on their surfaces. I found while the BNE is plausible on asteroids, it is confined to only the outer layers. The Moon, which formed with a Lunar Magma Ocean (LMO), is the next topic of this work. The LMO is due to the Moon forming rapidly after a giant impact between the proto-Earth and another planetary body. The first 80% of the LMO solidified rapidly at which point a floatation crust formed and slowed solidification of the remaining LMO. Impact bombardment during this cooling process, while an important component, has not been studied in detail. Impacts considered here are from debris generated during the formation of the Moon. I developed a thermal model that incorporates impacts and find that impacts may have either expedited or delayed LMO solidification. Finally, I return to affect to consider the differences in attitudes towards science between students enrolled in fully-online degree programs and those enrolled in traditional, in-person degree programs. I analyzed pre- and post-course survey data from the online astrobiology course Habitable Worlds. Unlike their traditional program counterparts, students enrolled in online programs started the course with better attitudes towards science and also further changed towards more positive attitudes during the course. Along with important conclusions in three research fields, this work aims to demonstrate the importance of affect in both scientific research and science education.