Grammatical function for this expression " when she was a girl of twenty

"when she was a girl of twenty" is a prepositional phrase. It functions as an adverbial phrase, modifying the verb "was" by indicating the time or condition in which she was a girl.

The expression "when she was a girl of twenty" functions as an adverbial clause of time. It provides information about when an action or event took place. In this case, it indicates the time at which she was a girl, specifically when she was twenty years old.