usnistgov / teqp

A highly efficient, flexible, and accurate implementation of thermodynamic EOS powered by automatic differentiation
https://pages.nist.gov/teqp-docs/en/latest/index.html
Other
49 stars 12 forks source link

Allow no composition derivatives in get_ATrhoXi_runtime #144

Closed ianhbell closed 1 month ago

ianhbell commented 1 month ago

See https://github.com/usnistgov/teqp/blob/ecfcd29b378a6a348e28f0adfcba8747be2c44f7/include/teqp/derivs.hpp#L261-L279

For you @Matthew-Boyd

Matthew-Boyd commented 1 month ago

Could you enable X(0,0,0) too? This would simplify calculating the reduced Helmholtz using dimensionless parameters by not having to back-calculate them from T and rho (via casts to get Tr and rhor).

ianhbell commented 1 month ago

Yeah, one sec. I vaguely recall there was a reason why that was a bad idea, but I don't remember what it was. Maybe it was elsewhere now that I think about it.

ianhbell commented 1 month ago

I needed a separate approach for 0,0,0, but I sorted it. You should be good to go