This function should be used by default in order to calculate the thermodynamic state record used as input by many functions.
Example:
parameter Medium.AbsolutePressure p = 3e5; parameter Medium.Temperature T = 290; Medium.Density rho; equation rho = Medium.density(setState_pTX(p, T, fill(0, Medium.nX)));
Please note, that in contrast to setState_phX, setState_dTX and setState_psX this function can not calculate properties in the two-phase region since pressure and temperature are dependent variables. A guard function will be called if the temperature difference to the phase boundary is lower than 1K or the pressure difference to the critical pressure is lower than 1000 Pa.