I agree with the other posters that for money needed in the short-term (and 2 yrs counts as short-term) a savings account is what you need. You've already found a good one. Kudos!
That said, if you anticipate having any extra money on hand that you won't need for living expenses in those two years, I would add that grad school is a great time to make deposits in a ROTH IRA because your income (if any) is low, so you are below the income limits and can still contribute. Hopefully going to grad school will eventually land you in a position where your income is too high to make ROTH IRA contributions, so the sooner you start investing, the more years you'll be able to put money into a ROTH IRA over the course of your life (I'm leaving out the possibility of a backdoor ROTH IRA, which isn't a possibility for everyone) and the more money total you'll be able to have sit in that account to grow for decades. And if things really get tight, you can withdraw the principal (but not the interest) from a ROTH IRA penalty-free.
If you don't have a ROTH IRA already, I would suggest taking $1000 of your $40k and opening a ROTH IRA at Vanguard. That is the minimum you need to open an ROTH IRA account with them (you'll be able to buy target date funds). Once you have that account open, you can make smaller, additional deposits as you are able, up to the annual contribution limit (currently $6000). And for me at least, having made that one-time big payment and opening the account greatly lowered the mental barrier to making future contributions.