Question

3. (6 pts) The van der Waals equation is useful for relating pressure (P in atm) to molar volume ( L/mol) of a non-ideal gas at a certain temperature (7 in

Kelvins): RT a P=v=bV² In this equation, a and bare van der Waals constants that are available in various reference sources and R is the ideal gas constant [=0.08206 L-atm/K-mol]. Create a VBA user-defined function called vanderwaals(a,b,T,V) that outputs the pressure (in atm) for a given gas with van der Waals constants a and b at temperature T (in K) with molar volume V. For nitrogen (a = 1.408 and b = 0.03913) at T = 500 K when = 0.5 L/mol, use your vanderwaals function to determine the exerted pressure (P).